[PATCH] r8169 fix regression on ASUS motherboards (updated again)

From: Mark Lord
Date: Thu Nov 08 2007 - 09:16:22 EST


Francois Romieu wrote:

Ok, I have pushed the patch below for Jeff to pull at korg.

From 1dd7681bc2ff171341ea5cae957f8ecb5c0c102e Mon Sep 17 00:00:00 2001
From: Mark Lord <mlord@xxxxxxxxx>
Date: Thu, 8 Nov 2007 01:03:04 +0100
Subject: [PATCH] r8169: revert 7da97ec96a0934319c7fbedd3d38baf533e20640 (partly)

Various symptoms depending on the .config options:
- the card stops working after some (short) time
- the card does not work at all
- the card disappears (nothing in lspci/dmesg)

A real power-off is needed to recover the card.

Signed-off-by: Mark Lord <mlord@xxxxxxxxx>
Signed-off-by: Francois Romieu <romieu@xxxxxxxxxxxxx>
---
drivers/net/r8169.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/r8169.c b/drivers/net/r8169.c
index 9dbab3f..a37cf82 100644
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -1328,6 +1328,7 @@ static void rtl_hw_phy_config(struct net_device *dev)
break;
case RTL_GIGA_MAC_VER_11:
case RTL_GIGA_MAC_VER_12:
+ break;
case RTL_GIGA_MAC_VER_17:
rtl8168b_hw_phy_config(ioaddr);
break;
..

Stop the presses: Another person has now reported back to me.
This guy has the VER_17 chip inside a notebook, and the same problem.

So the unified fix for all of these is to just get rid of rtl8168b_hw_phy_config(),
as that code is all that is really different from 2.6.23 (where all is okay).

Updated patch below.

* * * * *

Fix r8169B regression on ASUS motherboards (and MSI, and..)

Third/final iteration.
This replaces the earlier versions of this patch.
This one fixes *all* versions of r6169 *B* variant,
restoring the init code back to what it was in 2.6.23.

The r8169 ethernet driver worked fine in 2.6.23, but fails
in 2.6.24-rc* for the onboard ethernet of some ASUS (MAC_VER_11)
and MSI (MAC_VER_12) motherboards, and also for some notebooks
(MAC_VER_17) that use this chip.

Various symptoms depending on the .config options:
- the card stops working after some (short) time
- the card does not work at all
- the card disappears (nothing in lspci/dmesg)

A real power-off is needed to recover the card.

This patch fixes it again.

Signed-off-by: Mark Lord <mlord@xxxxxxxxx>

--- linux-2.6.24-rc2/drivers/net/r8169.c 2007-11-06 22:56:24.000000000 -0500
+++ linux/drivers/net/r8169.c 2007-11-08 09:05:08.000000000 -0500
@@ -1247,13 +1247,6 @@
}
static void rtl8168b_hw_phy_config(void __iomem *ioaddr)
{
- struct phy_reg phy_reg_init[] = {
- { 0x1f, 0x0000 },
- { 0x10, 0xf41b },
- { 0x1f, 0x0000 }
- };
-
- rtl_phy_write(ioaddr, phy_reg_init, ARRAY_SIZE(phy_reg_init));
}

static void rtl8168cp_hw_phy_config(void __iomem *ioaddr)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/