All of lore.kernel.org
 help / color / mirror / Atom feed
* r8169.c broke for me from 2.6.20.4 to 2.6.21
@ 2007-04-30  5:31 Jelle Foks
  2007-04-30  7:16 ` Francois Romieu
  0 siblings, 1 reply; 5+ messages in thread
From: Jelle Foks @ 2007-04-30  5:31 UTC (permalink / raw)
  To: romieu, netdev

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 down
ADDRCONF(NETDEV_UP): link is not ready
ADDRCONF(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,



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-05-27 22:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <4636A499.6020709@foks.8m.com>
2007-05-02 22:31 ` r8169.c broke for me from 2.6.20.4 to 2.6.21 Francois Romieu
2007-05-03  4:10   ` Jelle Foks
2007-05-27 22:32     ` Francois Romieu
2007-04-30  5:31 Jelle Foks
2007-04-30  7:16 ` Francois Romieu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.