>-----Original Message-----
>From: Anand Raj Manickam [mailto:[email protected]]
>Sent: Tuesday, March 26, 2013 9:25 AM
>To: Tantilov, Emil S
>Cc: Waskiewicz Jr, Peter P; [email protected]
>Subject: Re: [E1000-devel] False ethtool report on Link Detection
>
>On Tue, Mar 26, 2013 at 8:34 PM, Tantilov, Emil S
><[email protected]> wrote:
>>>-----Original Message-----
>>>From: Anand Raj Manickam [mailto:[email protected]]
>>>Sent: Tuesday, March 26, 2013 5:04 AM
>>>To: Waskiewicz Jr, Peter P
>>>Cc: [email protected]
>>>Subject: Re: [E1000-devel] False ethtool report on Link Detection
>>>
>>>On Tue, Mar 26, 2013 at 12:09 PM, Waskiewicz Jr, Peter P
>>><[email protected]> wrote:
>>>> On 3/25/2013 10:56 PM, Anand Raj Manickam wrote:
>>>>>
>>>>> I m using the e1000e driver for Intel 82574L chipset .

>>>>> When the cable is plugged in and Auto Negotiated , It reports as Link
>>>>> Detected as NO. I need to do a ifconfig up eth3 to get the Link
>>>>> Detected as YES .
>>
>> This is the correct behavior. The Link status in this case is reported by
>ethtool, not the driver:
>>
>> Look in net/core/ethtool.c in your kernel source:
>>
>> u32 ethtool_op_get_link(struct net_device *dev)
>> {
>>         return netif_carrier_ok(dev) ? 1 : 0;
>>
>> This behavior should be consistent across all drivers that provide this
>info. From what I can see struct ethtool_cmd which carries this information
>does not have a link member.
>>
>> Thanks,
>> Emil
>
>As per my debug , it seems to pick from netdev.c in driver
>e1000_mii_ioctl()

Unless you are using a different driver, e1000_mii_ioctl() is not called by 
ethtool, from what I can see in the code. You can check this if you put a 
printk in it and call ethtool ethX. This function would be called by mii-tool 
which should report the link as you expect.

>But realtek reports it right .. When the Link is plugged - ethtool
>reports Link Detected YES. even though the ifconfig eth3 down is set.

As I mentioned earlier in the case of ethtool we use the report from ethtool. 
If you want to detect the state of the link when the interface is down, don't 
use the "Link detected" field, look at the Speed/Duplex,that would give you a 
better idea about the state of the link.

Thanks,
Emil 

------------------------------------------------------------------------------
Own the Future-Intel&reg; Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest.
Compete for recognition, cash, and the chance to get your game 
on Steam. $5K grand prize plus 10 genre and skill prizes. 
Submit your demo by 6/6/13. http://p.sf.net/sfu/intel_levelupd2d
_______________________________________________
E1000-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit 
http://communities.intel.com/community/wired

Reply via email to