From: Jelle Foks <jelle@foks.8m.com>
To: romieu@fr.zoreil.com, netdev@vger.kernel.org
Subject: r8169.c broke for me from 2.6.20.4 to 2.6.21
Date: Mon, 30 Apr 2007 01:31:23 -0400 [thread overview]
Message-ID: <46357F2B.2070806@foks.8m.com> (raw)
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,
next reply other threads:[~2007-04-30 5:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-30 5:31 Jelle Foks [this message]
2007-04-30 7:16 ` r8169.c broke for me from 2.6.20.4 to 2.6.21 Francois Romieu
[not found] <4636A499.6020709@foks.8m.com>
2007-05-02 22:31 ` Francois Romieu
2007-05-03 4:10 ` Jelle Foks
2007-05-27 22:32 ` Francois Romieu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46357F2B.2070806@foks.8m.com \
--to=jelle@foks.8m.com \
--cc=netdev@vger.kernel.org \
--cc=romieu@fr.zoreil.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).