* Pull request for 'jg-20061103-00' tag
@ 2006-11-03 20:56 Francois Romieu
2006-11-06 8:01 ` Jeff Garzik
0 siblings, 1 reply; 3+ messages in thread
From: Francois Romieu @ 2006-11-03 20:56 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev
Please pull from tag 'jg-20061103-00' in repository
git://electric-eye.fr.zoreil.com/home/romieu/linux-2.6.git jg-20061103-00
to get the changes below.
Distance from 'upstream-fixes'
-----------------------------
17fddc34b36fc26aa8b5f130fe32b446d9d88fa2
Diffstat
--------
drivers/net/r8169.c | 22 ++++++++++++++++++++--
1 files changed, 20 insertions(+), 2 deletions(-)
Shortlog
--------
Francois Romieu:
r8169: perform a PHY reset before any other operation at boot time
Patch
-----
diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 27f90b2..50b753d 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -571,8 +571,8 @@ static void rtl8169_xmii_reset_enable(vo
{
unsigned int val;
- val = (mdio_read(ioaddr, MII_BMCR) | BMCR_RESET) & 0xffff;
- mdio_write(ioaddr, MII_BMCR, val);
+ mdio_write(ioaddr, MII_BMCR, BMCR_RESET);
+ val = mdio_read(ioaddr, MII_BMCR);
}
static void rtl8169_check_link_status(struct net_device *dev,
@@ -1406,6 +1406,22 @@ static void rtl8169_release_board(struct
free_netdev(dev);
}
+static void rtl8169_phy_reset(struct net_device *dev,
+ struct rtl8169_private *tp)
+{
+ void __iomem *ioaddr = tp->mmio_addr;
+ int i;
+
+ tp->phy_reset_enable(ioaddr);
+ for (i = 0; i < 100; i++) {
+ if (!tp->phy_reset_pending(ioaddr))
+ return;
+ msleep(1);
+ }
+ if (netif_msg_link(tp))
+ printk(KERN_ERR "%s: PHY reset failed.\n", dev->name);
+}
+
static void rtl8169_init_phy(struct net_device *dev, struct rtl8169_private *tp)
{
void __iomem *ioaddr = tp->mmio_addr;
@@ -1434,6 +1450,8 @@ static void rtl8169_init_phy(struct net_
rtl8169_link_option(board_idx, &autoneg, &speed, &duplex);
+ rtl8169_phy_reset(dev, tp);
+
rtl8169_set_speed(dev, autoneg, speed, duplex);
if ((RTL_R8(PHYstatus) & TBI_Enable) && netif_msg_link(tp))
--
Ueimor
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: Pull request for 'jg-20061103-00' tag
2006-11-03 20:56 Pull request for 'jg-20061103-00' tag Francois Romieu
@ 2006-11-06 8:01 ` Jeff Garzik
2006-11-06 21:46 ` Francois Romieu
0 siblings, 1 reply; 3+ messages in thread
From: Jeff Garzik @ 2006-11-06 8:01 UTC (permalink / raw)
To: Francois Romieu; +Cc: netdev, Andrew Morton
Francois Romieu wrote:
> Please pull from tag 'jg-20061103-00' in repository
>
> git://electric-eye.fr.zoreil.com/home/romieu/linux-2.6.git jg-20061103-00
>
> to get the changes below.
>
> Distance from 'upstream-fixes'
> -----------------------------
>
> 17fddc34b36fc26aa8b5f130fe32b446d9d88fa2
>
> Diffstat
> --------
>
> drivers/net/r8169.c | 22 ++++++++++++++++++++--
> 1 files changed, 20 insertions(+), 2 deletions(-)
>
> Shortlog
> --------
>
> Francois Romieu:
> r8169: perform a PHY reset before any other operation at boot time
This warrants much more testing than pushing into 2.6.19-rc4 would give
us, so I'm pulling it into #upstream.
In the past, with 10/100 hubs or ancient Cisco switches, we really
didn't want to reset the phy and restart autonegotiation, because that
might be problematic.
In any case, this is a behavior change that may solve problems... but
also needs testing to insure that it doesn't also cause problems.
Jeff
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Pull request for 'jg-20061103-00' tag
2006-11-06 8:01 ` Jeff Garzik
@ 2006-11-06 21:46 ` Francois Romieu
0 siblings, 0 replies; 3+ messages in thread
From: Francois Romieu @ 2006-11-06 21:46 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev, Andrew Morton
Jeff Garzik <jeff@garzik.org> :
[...]
> This warrants much more testing than pushing into 2.6.19-rc4 would give
> us, so I'm pulling it into #upstream.
>
> In the past, with 10/100 hubs or ancient Cisco switches, we really
> didn't want to reset the phy and restart autonegotiation, because that
> might be problematic.
>
> In any case, this is a behavior change that may solve problems... but
> also needs testing to insure that it doesn't also cause problems.
I don't have a single report of a 0x8136 user whose network adapter would
work out of the box without the patch. The sole users of a 0x8136 which I
have heard of need it. See the "r8169 mac address change" thread on l-k
last week. Those users should be able to workaround the issue on 2.6.19
with mii-tool (a bit sucky but...).
Regarding testing, see below.
I have done a quick grep through the l-k mailboxes of these last weeks to
see how much reports included the r8169 module (even in non-r8169 related
bugs of course):
200643: 1
200642: 0
200641: 1 (tainted, smp, preempt)
200640: 0
200639: 0
200638: 0
200637: 0
200636: 1 (Darren Salt, proud 0x8136 user)
200635: 0
200634: 0
200633: 1 (*doh* plain r8169 issue under oom)
Mid august here, i.e. 2 months and a half.
I'll ping known r8169 users, especially those who had link issues in
the past but I can not force them at gunpoint.
If 2.6.19 is more than 2 weeks away, we will probably trade two weeks
of close observation against two months of supplementary delay for no
real stability gain.
Well, MII likes to eat babies anyway. :o/
--
Ueimor
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-11-06 21:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-03 20:56 Pull request for 'jg-20061103-00' tag Francois Romieu
2006-11-06 8:01 ` Jeff Garzik
2006-11-06 21:46 ` Francois Romieu
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).