Bug 259841 - On RHEL 4 Update 5 ethtool-1.8-4 does not advertise all supported speeds for autonegotiation
Summary: On RHEL 4 Update 5 ethtool-1.8-4 does not advertise all supported speeds for ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: ethtool
Version: 4.5
Hardware: x86_64
OS: All
medium
low
Target Milestone: ---
: ---
Assignee: Jeff Garzik
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-08-28 12:21 UTC by Narendra K
Modified: 2018-10-19 20:11 UTC (History)
4 users (show)

Fixed In Version: 4.6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-02-25 16:14:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Changes made to ethtool.c (929 bytes, patch)
2007-08-28 12:25 UTC, Narendra K
no flags Details | Diff

Description Narendra K 2007-08-28 12:21:58 UTC
Description of problem: On RHEL 4 Update 5 ethtool-1.8-4 does not check for if 
speed wanted is 1000Mbps and sets the advertising_wanted incorrectly when 
setting autonegotiation without forcing.

Version-Release number of selected component (if applicable):
kernel version:2.6.9-55.ELsmp
ethtool version: 1.8 release: 4

How reproducible: always

Steps to Reproduce:
1. Walk through the ethtool.c souce
2. Observer the following code snippet
 
     if (autoneg_wanted == AUTONEG_ENABLE) {
           if (speed_wanted == SPEED_10 && duplex_wanted == DUPLEX_HALF)
               advertising_wanted = ADVERTISED_10baseT_Half;
           else if (speed_wanted == SPEED_10 &&
           duplex_wanted == DUPLEX_FULL)
               advertising_wanted = ADVERTISED_10baseT_Full;
           else if (speed_wanted == SPEED_100 &&
           duplex_wanted == DUPLEX_HALF)
                advertising_wanted = ADVERTISED_100baseT_Half;
           else if (speed_wanted == SPEED_100 &&
           duplex_wanted == DUPLEX_FULL)
               advertising_wanted = ADVERTISED_100baseT_Full;
    else
        /* auto negotiate without forcing */
        advertising_wanted = ADVERTISED_100baseT_Full | 
            ADVERTISED_100baseT_Half |
            ADVERTISED_10baseT_Full | 
            ADVERTISED_100baseT_Half;

}

  
Actual results: 
1.The code segment above does not check if speed_wanted == SPEED_1000.
2.Under autonegotiate without forcing section  ADVERTISED_100baseT_Half is set 
twice, ADVERTISED_10baseT_Half is not set and 1000Mbps is not considered at 
all.

Expected results: The above mentioned facts need to be considered when setting 
advertising_wanted field.

Additional info: This is not seen in ethtool-5 in RHEL5.

Comment 1 Narendra K 2007-08-28 12:25:56 UTC
Created attachment 176081 [details]
Changes made to ethtool.c

Comment 2 RHEL Program Management 2008-02-01 19:03:13 UTC
This request was evaluated by Red Hat Product Management for
inclusion, but this component is not scheduled to be updated in
the current Red Hat Enterprise Linux release. If you would like
this request to be reviewed for the next minor release, ask your
support representative to set the next rhel-x.y flag to "?".

Comment 3 Gary Case 2008-02-13 17:13:41 UTC
Dell would still like this issue to be addressed. Please consider fixing this in
the next update.

Comment 4 Jay Turner 2008-02-25 08:36:57 UTC
Appears this got fixed behind the scenes in RHEL4.6 which shipped with
ethtool-6-1 which includes the following:

        if ((autoneg_wanted == AUTONEG_ENABLE) && (advertising_wanted < 0)) {
                if (speed_wanted == SPEED_10 && duplex_wanted == DUPLEX_HALF)
                        advertising_wanted = ADVERTISED_10baseT_Half;
                else if (speed_wanted == SPEED_10 &&
                        advertising_wanted = ADVERTISED_10baseT_Half;
                else if (speed_wanted == SPEED_10 &&
                         duplex_wanted == DUPLEX_FULL)
                        advertising_wanted = ADVERTISED_10baseT_Full;
                else if (speed_wanted == SPEED_100 &&
                         duplex_wanted == DUPLEX_HALF)
                        advertising_wanted = ADVERTISED_100baseT_Half;
                else if (speed_wanted == SPEED_100 &&
                         duplex_wanted == DUPLEX_FULL)
                        advertising_wanted = ADVERTISED_100baseT_Full;
                else if (speed_wanted == SPEED_1000 &&
                         duplex_wanted == DUPLEX_HALF)
                        advertising_wanted = ADVERTISED_1000baseT_Half;
                else if (speed_wanted == SPEED_1000 &&
                         duplex_wanted == DUPLEX_FULL)
                        advertising_wanted = ADVERTISED_1000baseT_Full;
                else if (speed_wanted == SPEED_2500 &&
                         duplex_wanted == DUPLEX_FULL)
                        advertising_wanted = ADVERTISED_2500baseX_Full;
                else if (speed_wanted == SPEED_10000 &&
                         duplex_wanted == DUPLEX_FULL)
                        advertising_wanted = ADVERTISED_10000baseT_Full;
                else 
                        advertising_wanted = ADVERTISED_10000baseT_Full;
                else
                        /* auto negotiate without forcing,
                         * all supported speed will be assigned in do_sset()
                         */
                        advertising_wanted = 0;

        }

Can we close out this request now?


Note You need to log in before you can comment on or make changes to this bug.