[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#525296: Cannot set tg3 interface to full duplex



On Fri, 2009-04-24 at 09:33 -0400, Greg Wooledge wrote:
> On Fri, Apr 24, 2009 at 12:29:23AM +0100, Ben Hutchings wrote:
> > Do you also expect to get a gigabit link or only 100 megabit?
> 
> The other end is set to 100/full.  That is what I want to set the NIC to.
> 
> > Please run "mii-tool -v eth0".
> 
> img2:~# uptime
>  08:37:59 up 1 min,  1 user,  load average: 0.28, 0.12, 0.04
> img2:~# uname -a
> Linux img2 2.6.26-2-686 #1 SMP Thu Mar 26 01:08:11 UTC 2009 i686 GNU/Linux
> img2:~# mii-tool -v eth0
> eth0: no autonegotiation, 100baseTx-HD, link ok
>   product info: vendor 00:08:18, model 24 rev 0
>   basic mode:   autonegotiation enabled
>   basic status: autonegotiation complete, link ok
>   capabilities: 1000baseT-HD 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
>   advertising:  100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control
>   link partner: 100baseTx-HD

As you can see, the other end only advertised 100BASE-T half-duplex, so
that was the only possible result of autonegotiation.

> > Is autonegotiation enabled at the other end of the link?
> 
> No.  The networking department here has a Policy of not using
> autonegotiation, ever.

My commiserations.  Do they know that 1000BASE-T does not work without
autonegotiation?

[...]
> I have been Googling intermittently for things like "Debian tg3 force
> full duplex" for years and I have NEVER found a straight answer to
> the relatively simple question of "How do you force a NIC to 100/full?"
> 
> I am not explicitly setting autonegotiation.  The driver module is
> probably doing so when it's loaded by udev or discover or magical
> leprechauns or whatever it is that Linux/Debian are using this year.

Which is absolutely the correct default for a multi-speed NIC.

[...]
> So, now, the REALLY final test:
> 
> img2:~# tail /etc/network/interfaces 
> 
> # The primary network interface
> allow-hotplug eth0
> #iface eth0 inet dhcp
> iface eth0 inet static
>         address 139.137.100.23
>         netmask 255.255.255.0
>         gateway 139.137.100.100
>         up ethtool -s eth0 autoneg off speed 100 duplex full
>         # up sleep 5; mii-tool -F 100baseTx-FD eth0

This is the sensible approach now.

In the current (unstable) package of ethtool I have added an ifupdown
hook so these settings can be specified in interfaces without explicitly
running ethtool.

[...]
> (Not that this will answer every question.  I'm sure it will still fail
> for lots of other people, because the correct answer seems to be something
> along the lines of "It depends on which driver your NIC uses.  You're
> probably screwed.  Try some other operating system and pray, or buy a
> different NIC and pray, or both.")

The ethtool command above should work for just about any Ethernet NIC
under Linux, though obviously some drivers have bugs.

Ben.

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: