Re: tg3 v3.123 in 100Mbps Full-Duplex mode with autoneg off

From: Michael Chan
Date: Thu Jan 17 2013 - 14:05:47 EST


On Thu, 2013-01-17 at 17:59 +0100, Marcin Miotk wrote:
> root@XXXXXX ~ # cat miitool_non_working_3.4.11
> Using SIOCGMIIPHY=0x8947
> eth1: 100 Mbit, full duplex, no link
> registers for MII PHY 1:
> 2100 7949 0020 6340 0041 0000 0004 2001
> 0000 0000 0000 0000 0000 0000 0000 3000
> 0001 2000 0000 0000 0000 0000 0000 4000
> 7277 1000 0000 ffff 2801 0000 0000 0000
> product info: vendor 00:08:18, model 52 rev 0
> basic mode: 100 Mbit, full duplex
> basic status: no link
> capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
> advertising: 10baseT-FD

Autoneg is disabled, so the advertising register that is advertising
only 10Mbps Full Duplex should not matter. What matters is that
register 0 has set it to 100Mbps Full Duplex.
>
>
> What looks suspicious here is the last line of mii-tool output:
> 'advertising: 10baseT-FD', while only 100baseTx-FD is set on a switch.
> 'mii-tool -vvv eth1' on working 3.0.9 gives output like below:
>
> root@XXX ~ # cat miitool_working_3.0.9
> Using SIOCGMIIPHY=0x8947
> eth1: 100 Mbit, full duplex, link ok
> registers for MII PHY 1:
> 2100 794d 0020 6340 0501 0000 0004 2001
> 0000 0000 0000 0000 0000 0000 0000 3000
> 0001 0301 0000 0000 0000 0000 0000 4000
> 7277 0504 0000 ffff 2801 0000 0000 0000
> product info: vendor 00:08:18, model 52 rev 0
> basic mode: 100 Mbit, full duplex
> basic status: link ok
> capabilities: 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
> advertising: 100baseTx-FD flow-control
>
In the working case, register 0 where it matters is the same (autoneg
disabled and 100Mbps Full Duplex). Register 4 happens to advertise the
same 100 Mbps Full duplex forced speed, and apparently your link partner
cares about that, which is very strange because autoneg is disabled.

There apparently has been a change in behavior in the tg3 code, but
again it should not matter. The 3.7 kernel that I tested on behaved the
same as your non-working case but it worked for me. I guess I can try
to restore the original behavior. I'll need time to look through all
the changes.




--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/