r8169.c broke for me from 2.6.20.4 to 2.6.21
Subsystems (2)
Hello,
When I upgraded from 2.6.20.4 to 2.6.21, the r8169 kept thinking that the link was down, while with 2.6.20.4, the link was detected at 10Mbit/s.
This is on a (I admit, probably out-of-spec) cable to a Gbit switch from the r8169 on the mainboard of an AOpen XC Cube EX761.
With 2.6.20.4, the 'link' goes through these states when I boot:
r8169: eth1: link downADDRCONF(NETDEV_UP): link is not readyADDRCONF(NETDEV_CHANGE): link becomes ready
r8169: eth1: link up
And then it works (at 10Mbit). With 2.6.21, the link stays down.
When I revert rtl8169_xmii_reset_enable() to the code from the driver in 2.6.20.4 (see the diff below), then it works again, with the same behaviour as with 2.6.20.4.
My guess is that the 2.6.20.4 code resets the mii in a way that allows the chip to see a link on my (bad) cable, and the 2.6.21 code does not...
Jelle.
--- linux-2.6.21/drivers/net/r8169.c 2007-04-25 23:08:32.000000000 -0400
+++ linux-2.6.21-jelle/drivers/net/r8169.c 2007-04-30
01:25:59.000000000 -0400
@@ -574,8 +574,10 @@
{
unsigned int val;- val = mdio_read(ioaddr, MII_BMCR) | BMCR_RESET; - mdio_write(ioaddr, MII_BMCR, val & 0xffff); + mdio_write(ioaddr, MII_BMCR, BMCR_RESET); + val = mdio_read(ioaddr, MII_BMCR);
+/* val = mdio_read(ioaddr, MII_BMCR) | BMCR_RESET;*/
+/* mdio_write(ioaddr, MII_BMCR, val & 0xffff);*/
}
static void rtl8169_check_link_status(struct net_device *dev,
Jelle Foks <[email protected]> :
[...]
Quoted 5 lines
When I upgraded from 2.6.20.4 to 2.6.21, the r8169 kept thinking that the link was down, while with 2.6.20.4, the link was detected at 10Mbit/s.
This is on a (I admit, probably out-of-spec) cable to a Gbit switch from the r8169 on the mainboard of an AOpen XC Cube EX761.
Grmblmbl...
Quoted 7 lines
With 2.6.20.4, the 'link' goes through these states when I boot:
r8169: eth1: link down
ADDRCONF(NETDEV_UP): link is not readyADDRCONF(NETDEV_CHANGE): link becomes ready
r8169: eth1: link up
Quoted 5 lines
And then it works (at 10Mbit). With 2.6.21, the link stays down.
When I revert
rtl8169_xmii_reset_enable()to the code from the driver in 2.6.20.4 (see the diff below), then it works again, with the same behaviour as with 2.6.20.4.
[snip]
This patch alone is known to change things but it does not work everywhere :o/
Can you:
- send the output of a 'lspci -vvx'
- send the output of mii-tool including hex dump of the registers with 2.6.20.4 and 2.6.21
- try 2.6.21 + http://www.fr.zoreil.com/people/francois/misc/20070430-2.6.21-r8169-test.patch
Signature · 3 lines
Ueimor Anybody got a battery for my Ultra 10 ?