Hi,

 

There is a doubt with the working of e1000e driver -
1.9.5-NAPI-intel-2012-02-29 version. We are seeing a non-zero value of
65355 being returned for speed_hi  for the ethtool_cmd structure for the
ioctl ETHTOOL_GSET. when the interface is up it returns zero for
speed_hi. For setting the Ethernet speed/duplex we first query the
driver with the ioctl ETHTOOL_GSET and change only the speed and duplex
values in the ethtool_cmd structure and leave the rest(speed_hi) as is
and invoke the ioctl ETHTOOL_SSET. We don't see this issue with the
older driver version - 1.0.2-k2 . I have looked at the function
e1000_get_settings in the newer driver version, where the following code
seems to cause the problem.

 

speed = -1;

ecmd->duplex = -1;

 

if (netif_running(netdev)) {

                if (netif_carrier_ok(netdev)) {

                        speed = adapter->link_speed;

                        ecmd->duplex = adapter->link_duplex - 1;

                }

        } else {

                u32 status = er32(STATUS);

                if (status & E1000_STATUS_LU) {

                        if (status & E1000_STATUS_SPEED_1000)

                                speed = SPEED_1000;

                        else if (status & E1000_STATUS_SPEED_100)

                                speed = SPEED_100;

                        else

                                speed = SPEED_10;

 

                        if (status & E1000_STATUS_FD)

                                ecmd->duplex = DUPLEX_FULL;

                        else

                                ecmd->duplex = DUPLEX_HALF;

                }

        }

 

ethtool_cmd_speed_set(ecmd, speed);

 

In the above code fragment speed is defined as u32 and set to -1 which
means 4294967295. When the control doesn't enter the either of above
if-else branch. speed will be 4294967295. So when
ethtool_cmd_speed_set() gets called, speed and hi_speed both gets set to
65535. 

In the driver version 1.0.2-k2, the code is different and
ethtool_cmd_speed_set() is not used to set the speed values.

Can you please let me know if this behavior is right and if not should I
raise a bug to get it fixed.


Regards

Shashidhara

 

 

 

 

 

 


Information transmitted by this e-mail is proprietary to MphasiS, its 
associated companies and/ or its customers and is intended 
for use only by the individual or entity to which it is addressed, and may 
contain information that is privileged, confidential or 
exempt from disclosure under applicable law. If you are not the intended 
recipient or it appears that this mail has been forwarded 
to you without proper authority, you are notified that any use or dissemination 
of this information in any manner is strictly 
prohibited. In such cases, please notify us immediately at 
[email protected] and delete this mail from your records.
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
E1000-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit 
http://communities.intel.com/community/wired

Reply via email to