* Re: [patch 1/1] r8169 driver: corega support [not found] <200610202144.k9KLid8a003945@shell0.pdx.osdl.net> @ 2006-10-20 22:44 ` Francois Romieu 2006-10-21 13:52 ` Darren Salt 0 siblings, 1 reply; 4+ messages in thread From: Francois Romieu @ 2006-10-20 22:44 UTC (permalink / raw) To: akpm; +Cc: hchacha, jeff, Darren Salt, syed.azam, netdev akpm@osdl.org <akpm@osdl.org> : [Corega adapter support] It's queued in the r8169 branch at: git://electric-eye.fr.zoreil.com/home/romieu/linux-2.6.git r8169 I have sent Jeff a pull request for it (and I'll probably send one more for the patch below). Darren, can you check if the patch below fixes you link detection issue ? >From 6c94bf2ee2c932418bfe95d18460fb503f549659 Mon Sep 17 00:00:00 2001 From: Francois Romieu <romieu@fr.zoreil.com> Date: Fri, 20 Oct 2006 23:10:14 +0200 Subject: [PATCH] r8169: perform a PHY reset before any other operation at boot time Realtek's 8139/810x (0x8136) PCI-E comes with a touchy PHY. A big heavy reset seems to calm it down. Fix for http://bugzilla.kernel.org/show_bug.cgi?id=7378. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> --- drivers/net/r8169.c | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index c2c9a86..e3d0679 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -1442,6 +1442,23 @@ 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)) { + printk(KERN_INFO "%s: PHY reset done.\n", dev->name); + break; + } + msleep(1); + } + 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; @@ -1470,6 +1487,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)) -- 1.4.2.3 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [patch 1/1] r8169 driver: corega support 2006-10-20 22:44 ` [patch 1/1] r8169 driver: corega support Francois Romieu @ 2006-10-21 13:52 ` Darren Salt 2006-10-21 20:15 ` Francois Romieu 0 siblings, 1 reply; 4+ messages in thread From: Darren Salt @ 2006-10-21 13:52 UTC (permalink / raw) To: akpm, romieu; +Cc: hchacha, jeff, syed.azam, netdev [-- Attachment #1: Type: text/plain, Size: 831 bytes --] I demand that Francois Romieu may or may not have written... > akpm@osdl.org <akpm@osdl.org> : > [Corega adapter support] > It's queued in the r8169 branch at: > git://electric-eye.fr.zoreil.com/home/romieu/linux-2.6.git r8169 > I have sent Jeff a pull request for it (and I'll probably send one > more for the patch below). > Darren, can you check if the patch below fixes you link detection > issue ? It does, but the patch causes the module to report that the reset failed even after reporting that it's done. A fix for this is attached. -- | Darren Salt | linux or ds at | nr. Ashington, | Toon | RISC OS, Linux | youmustbejoking,demon,co,uk | Northumberland | Army | + Generate power using sun, wind, water, nuclear. FORGET COAL AND OIL. Life is what happens when you're busy making other plans. [-- Attachment #2: r8169-PHY-reset-report-fix.patch --] [-- Type: text/plain, Size: 492 bytes --] Avoid reporting that the PHY reset has failed when it's just succeeded. Signed-off-by: Darren Salt <linux@youmustbejoking.demon.co.uk> diff a/drivers/net/r8169.c b/drivers/net/r8169.c --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -1452,7 +1452,7 @@ static void rtl8169_release_board(struct for (i = 0; i < 100; i++) { if (!tp->phy_reset_pending(ioaddr)) { printk(KERN_INFO "%s: PHY reset done.\n", dev->name); - break; + return; } msleep(1); } ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch 1/1] r8169 driver: corega support 2006-10-21 13:52 ` Darren Salt @ 2006-10-21 20:15 ` Francois Romieu 2006-10-22 15:14 ` Darren Salt 0 siblings, 1 reply; 4+ messages in thread From: Francois Romieu @ 2006-10-21 20:15 UTC (permalink / raw) To: Darren Salt; +Cc: akpm, hchacha, jeff, syed.azam, netdev Darren Salt <linux@youmustbejoking.demon.co.uk> : [...] > It does, but the patch causes the module to report that the reset failed even > after reporting that it's done. A fix for this is attached. Oops. Ok with the one below ? r8169: perform a PHY reset before any other operation at boot time Realtek's 8139/810x (0x8136) PCI-E comes with a touchy PHY. A big heavy reset seems to calm it down. Fix for http://bugzilla.kernel.org/show_bug.cgi?id=7378. Signed-off-by: Francois Romieu <romieu@fr.zoreil.com> Signed-off-by: Darren Salt <linux@youmustbejoking.demon.co.uk> --- drivers/net/r8169.c | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c index c2c9a86..03c0dc5 100644 --- a/drivers/net/r8169.c +++ b/drivers/net/r8169.c @@ -1442,6 +1442,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; @@ -1470,6 +1486,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)) -- 1.4.2.3 ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [patch 1/1] r8169 driver: corega support 2006-10-21 20:15 ` Francois Romieu @ 2006-10-22 15:14 ` Darren Salt 0 siblings, 0 replies; 4+ messages in thread From: Darren Salt @ 2006-10-22 15:14 UTC (permalink / raw) To: romieu; +Cc: akpm, hchacha, jeff, syed.azam, netdev I demand that Francois Romieu may or may not have written... > Darren Salt <linux@youmustbejoking.demon.co.uk> : > [...] >> It does, but the patch causes the module to report that the reset failed >> even after reporting that it's done. A fix for this is attached. > Oops. Ok with the one below? Yes. [snip patch] -- | Darren Salt | linux or ds at | nr. Ashington, | Toon | RISC OS, Linux | youmustbejoking,demon,co,uk | Northumberland | Army | + Output less CO2 => avoid massive flooding. TIME IS RUNNING OUT *FAST*. Wagner's music is better than it sounds. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-10-22 15:17 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <200610202144.k9KLid8a003945@shell0.pdx.osdl.net>
2006-10-20 22:44 ` [patch 1/1] r8169 driver: corega support Francois Romieu
2006-10-21 13:52 ` Darren Salt
2006-10-21 20:15 ` Francois Romieu
2006-10-22 15:14 ` Darren Salt
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).