Bug#457971: ethtool: fails to detect or set duplex correctly (tg3)
tags 457971 moreinfo
thanks On Thu, Dec 27, 2007 at 10:57:40AM -0500, Greg Wooledge wrote: > Package: ethtool > Version: 5-1 > Severity: normal > > Fails to detect the current duplex setting: > > img2:~# mii-tool eth0 > eth0: 100 Mbit, full duplex, link ok > img2:~# ethtool eth0 | grep -i duplex > Duplex: Half > > (mii-tool's output is correct.) > > Fails to set the duplex correctly: > > img2:~# ethtool -s eth0 duplex full > img2:~# mii-tool eth0 > eth0: no autonegotiation, 100baseTx-HD, link ok > img2:~# ethtool eth0 | grep -i duplex > Duplex: Half > > Performing an actual transfer of data from this host to another host > reveals that, indeed, the interface is operating at the wrong duplex > setting. > > The "ethtool -s eth0 duplex full" test seems to have caused these kernel > messages (for whatever that's worth): > > Dec 27 10:45:49 img2 kernel: tg3: eth0: Link is down. > Dec 27 10:45:51 img2 kernel: tg3: eth0: Link is up at 100 Mbps, half duplex. > Dec 27 10:45:51 img2 kernel: tg3: eth0: Flow control is off for TX and off for RX. > > Hardware information: > > img2:/var/log# dmesg | egrep 'tg3|eth0' > tg3.c:v3.65 (August 07, 2006) > eth0: Tigon3 [partno(N/A) rev 4201 PHY(5750)] (PCI Express) 10/100/1000BaseT Ethernet 00:1b:78:39:80:33 > eth0: RXcsums[1] LinkChgREG[0] MIirq[0] ASF[1] Split[0] WireSpeed[1] TSOcap[1] > eth0: dma_rwctrl[76180000] dma_mask[64-bit] Hi, The next release of Debian (6.0, code name Squeeze) will be based on 2.6.32. Please test the current 2.6.32 from unstable/testing and tell us whether the problem persists. If so, we should report it upstream to the kernel.org developers. The 2.6.32 kernel is available from packages.debian.org and can be installed in both Debian stable, testing and unstable installations. Thanks, Moritz -- To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org Archive: 20100530124149.GE2398@galadriel.inutil.org">http://lists.debian.org/20100530124149.GE2398@galadriel.inutil.org |
Bug#457971: ethtool: fails to detect or set duplex correctly (tg3)
On Sun, May 30, 2010 at 02:41:49PM +0200, Moritz Muehlenhoff wrote:
> Hi, > The next release of Debian (6.0, code name Squeeze) will be based > on 2.6.32. Please test the current 2.6.32 from unstable/testing and tell > us whether the problem persists. If so, we should report it upstream > to the kernel.org developers. Some time after I filed this bug report, I learned that it requires a non-obvious invocation to make ethtool actually set the duplex. Instead of "ethtool -s eth0 duplex full" one must type out all of "ethtool -s autoneg off speed 100 duplex full" to get it to work. Here are my results on 2.6.32. I commented out the duplex-setting commands in /etc/network/interfaces and rebooted on the new kernel. img2:~# uname -a Linux img2 2.6.32-3-686 #1 SMP Thu Feb 25 06:14:20 UTC 2010 i686 GNU/Linux img2:~# mii-tool eth0 eth0: no autonegotiation, 100baseTx-HD, link ok This is normal for this machine. The way the network switch is set up, autonegotiation detects the speed correctly (100) but the duplex incorrectly (should be full, detects half). (I actually did a few mii-tool and ethtool commands prior to this, so you're not seeing the *completely* virgin mii-tool output. Sorry about that. But it's very similar, I promise.) Next, trying to set the duplex: img2:~# mii-tool -F 100baseTx-FD eth0 img2:~# mii-tool eth0 eth0: no autonegotiation, 100baseTx-HD, link ok img2:~# ethtool eth0 | grep -i duplex Duplex: Half mii-tool no longer works to set the duplex on 2.6.32. OK, fair enough. img2:~# ethtool -s eth0 duplex full Cannot set new settings: Invalid argument not setting duplex This error is new, and very welcome. If the invocation is incorrect, I'd rather be told there's an error. (It might be nice if it said something like "You must include `autoneg off' and `speed' when setting `duplex'", but that's wishlist material.) img2:~# ethtool -s eth0 autoneg off speed 100 duplex full img2:~# mii-tool eth0 eth0: 100 Mbit, full duplex, link ok img2:~# ethtool eth0 | grep -i duplex Duplex: Full With the full invocation, ethtool is able to set the duplex correctly, and report it correctly; mii-tool is also able to report it correctly, even though it failed to set it. Speed-testing with FTP: ... 226 Transfer complete. 2903540 bytes sent in 0.83 secs (3431.0 kB/s) So the duplex is in fact correct. -- To UNSUBSCRIBE, email to debian-kernel-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org Archive: 20100601135940.GZ1542@eeg.ccf.org">http://lists.debian.org/20100601135940.GZ1542@eeg.ccf.org |
Bug#457971: ethtool: fails to detect or set duplex correctly (tg3)
On Tue, 2010-06-01 at 09:59 -0400, Greg Wooledge wrote:
> On Sun, May 30, 2010 at 02:41:49PM +0200, Moritz Muehlenhoff wrote: > > Hi, > > The next release of Debian (6.0, code name Squeeze) will be based > > on 2.6.32. Please test the current 2.6.32 from unstable/testing and tell > > us whether the problem persists. If so, we should report it upstream > > to the kernel.org developers. > > Some time after I filed this bug report, I learned that it requires > a non-obvious invocation to make ethtool actually set the duplex. > Instead of "ethtool -s eth0 duplex full" one must type out all of > "ethtool -s autoneg off speed 100 duplex full" to get it to work. If you want to turn autoneg off, you must say so explicitly. However, the fact that specifying only speed or only duplex has no effect when autoneg is on *is* a bug in ethtool. It should result in restricting the advertised modes. > Here are my results on 2.6.32. I commented out the duplex-setting > commands in /etc/network/interfaces and rebooted on the new kernel. > > img2:~# uname -a > Linux img2 2.6.32-3-686 #1 SMP Thu Feb 25 06:14:20 UTC 2010 i686 GNU/Linux > img2:~# mii-tool eth0 > eth0: no autonegotiation, 100baseTx-HD, link ok > > This is normal for this machine. The way the network switch is set up, > autonegotiation detects the speed correctly (100) but the duplex > incorrectly (should be full, detects half). > > (I actually did a few mii-tool and ethtool commands prior to this, so > you're not seeing the *completely* virgin mii-tool output. Sorry about > that. But it's very similar, I promise.) > > Next, trying to set the duplex: > > img2:~# mii-tool -F 100baseTx-FD eth0 > img2:~# mii-tool eth0 > eth0: no autonegotiation, 100baseTx-HD, link ok > img2:~# ethtool eth0 | grep -i duplex > Duplex: Half > > mii-tool no longer works to set the duplex on 2.6.32. OK, fair enough. Some Ethernet drivers can cope with you controlling the link using mii-tool, but others will be confused by this. I would generally advise that you use only ethtool to control the link. > img2:~# ethtool -s eth0 duplex full > Cannot set new settings: Invalid argument > not setting duplex > > This error is new, and very welcome. If the invocation is incorrect, I'd > rather be told there's an error. (It might be nice if it said something > like "You must include `autoneg off' and `speed' when setting `duplex'", > but that's wishlist material.) [...] Actually ethtool is just reporting the error returned by the driver (EINVAL, usually explained as 'Invalid argument'). This is not a change in ethtool, and there is unfortunately no way for a driver to communicate exactly what is invalid. I'll reassign this back to ethtool, as it should never ignore command- line arguments. (In fact, as ethtool maintainer, I was already aware of the bug and have planned to fix it.) Ben. -- Ben Hutchings Once a job is fouled up, anything done to improve it makes it worse. |
| All times are GMT. The time now is 07:27 AM. |
VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.