sky2 auto negotiation PHY errata
Subsystems (2)
This patch does the Marvell errata before auto negotiation (from drivers/phy/marvell.c). The Yukon II chips have an internal version of the same PHY, so perhaps this errata is necessary for them as well.
For test only, but it may fix some of the hangs. It seems to fix the PHY lockups I saw yesterday on Mac Mini.
--- drivers/net/sky2.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)
drivers/net/sky2.c +8 -0
@@ -387,6 +387,14 @@ static void sky2_phy_init(struct sky2_hwif (sky2->autoneg ==AUTONEG_ENABLE ) {if (sky2_is_copper (hw)) { +/* Errata setup */ +gm_phy_write (hw, port,PHY_MARV_PAGE_ADDR ,0x1f ); +gm_phy_write (hw, port,PHY_MARV_PAGE_DATA ,0x200c ); +gm_phy_write (hw, port,PHY_MARV_PAGE_ADDR ,5 ); +gm_phy_write (hw, port,PHY_MARV_PAGE_DATA ,0 ); +gm_phy_write (hw, port,PHY_MARV_PAGE_DATA ,0x100 ); + +if (sky2->advertising & ADVERTISED_1000baseT_Full) ct1000 |=PHY_M_1000C_AFD ;if (sky2->advertising & ADVERTISED_1000baseT_Half)
Signature · 1 line
1.4.1
You need the flow control fix and the tx_timeout fix posted for 2.6.20 (stable) and current git tree.
Quoted 21 lines · Stephen Hemminger
This patch does the Marvell errata before auto negotiation (from
drivers/phy/marvell.c). The Yukon II chips have an internal version of the same PHY, so perhaps this errata is necessary for them as well.For test only, but it may fix some of the hangs. It seems to fix the PHY lockups I saw yesterday on Mac Mini.
--- drivers/net/sky2.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-)drivers/net/sky2.c +1
-0@@ -387,6 +387,14 @@ static void sky2_phy_init(struct sky2_hwif (sky2->autoneg ==AUTONEG_ENABLE ) {if (sky2_is_copper (hw)) { +/* Errata setup */
drivers/net/sky2.c static void sky2_phy_init(struct sky2_hw · line 400
Quoted 10 lines
drivers/net/sky2.c +7
-0+gm_phy_write (hw, port,PHY_MARV_PAGE_ADDR ,0x1f ); +gm_phy_write (hw, port,PHY_MARV_PAGE_DATA ,0x200c ); +gm_phy_write (hw, port,PHY_MARV_PAGE_ADDR ,5 ); +gm_phy_write (hw, port,PHY_MARV_PAGE_DATA ,0 ); +gm_phy_write (hw, port,PHY_MARV_PAGE_DATA ,0x100 ); + +if (sky2->advertising & ADVERTISED_1000baseT_Full) ct1000 |=PHY_M_1000C_AFD ;if (sky2->advertising & ADVERTISED_1000baseT_Half)
With this and the
- sky2->flow_mode = FC_BOTH;
+ sky2->flow_mode = FC_NONE;
patch applied to the vanilla 2.6.20 kernel, behavior changed from whole system locks up about once per 4 days to module locks up once per 4 days. Neither case has any log messages. Current behavior is "fixed" by a rmmod/modprobe sequence. Old behavior requires a hard reset.
Never had an issue with the vendor sk98lin driver.
lspci:
02:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8053 PCI-E Gigabit Ethernet Controller (rev 15) 03:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8053 PCI-E Gigabit Ethernet Controller (rev 15)
Only 1 controller is in use, and is connected to a Gb switch, though I also saw issues earlier when hooked to a 100Mb switch. Motherboard is an ASUS P5AD2-E-Premium. I have not tried any of the kernel/module command line parameters suggested in various sky2 threads.
Just FYI.
Signature · 1 line
Rob
Quoted 2 lines · Stephen Hemminger
You need the flow control fix and the
tx_timeoutfix posted for 2.6.20 (stable) and current git tree.
sky2 1.13 has been far better than 1.10; there have been no system hangs or permanent sky2 failures. However, the following two incidents were in syslog:
Feb 27 07:08:21 btd kernel: Linux version 2.6.20.sky2.1.13-btd3 ([email protected]) (gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)) #1 SMP PREEMPT Tue Feb 27 00:07:34 MST 2007 Feb 27 07:08:21 btd kernel: sky2 0000:04:00.0: v1.13 addr 0xfa9fc000 irq 17 Yukon-EC (0xb6) rev 2 Feb 27 07:08:21 btd kernel: sky2 eth0: addr 00:1a:92:23:52:4d Feb 27 07:08:21 btd kernel: sky2 0000:03:00.0: v1.13 addr 0xfa8fc000 irq 16 Yukon-EC (0xb6) rev 2 Feb 27 07:08:21 btd kernel: sky2 eth1: addr 00:1a:92:23:4b:a6 Feb 27 07:08:21 btd kernel: sky2 eth0: enabling interface Feb 27 07:08:21 btd kernel: sky2 eth0: ram buffer 48K Feb 27 07:08:21 btd kernel: sky2 eth0: Link is up at 1000 Mbps, full duplex, flow control both Feb 27 19:48:34 btd kernel: sky2 0000:04:00.0: v1.13 addr 0xfa9fc000 irq 17 Yukon-EC (0xb6) rev 2 Feb 27 19:48:34 btd kernel: sky2 eth0: addr 00:1a:92:23:52:4d Feb 27 19:48:34 btd kernel: sky2 0000:03:00.0: v1.13 addr 0xfa8fc000 irq 16 Yukon-EC (0xb6) rev 2 Feb 27 19:48:34 btd kernel: sky2 eth1: addr 00:1a:92:23:4b:a6 Feb 27 19:48:34 btd kernel: sky2 eth0: enabling interface Feb 27 19:48:34 btd kernel: sky2 eth0: ram buffer 48K Feb 27 19:48:34 btd kernel: sky2 eth0: Link is up at 1000 Mbps, full duplex, flow control both
Feb 28 19:06:57 btd kernel: NETDEV WATCHDOG: eth0: transmit timed out Feb 28 19:06:57 btd kernel: sky2 eth0: tx timeout Feb 28 19:06:57 btd kernel: sky2 eth0: transmit ring 133 .. 110 report=133 done=133 Feb 28 19:06:57 btd kernel: sky2 eth0: disabling interface Feb 28 19:06:57 btd kernel: sky2 eth0: enabling interface Feb 28 19:06:57 btd kernel: sky2 eth0: ram buffer 48K Feb 28 19:07:00 btd kernel: sky2 eth0: Link is up at 1000 Mbps, full duplex, flow control both
Mar 4 13:58:31 btd kernel: NETDEV WATCHDOG: eth0: transmit timed out Mar 4 13:58:31 btd kernel: sky2 eth0: tx timeout Mar 4 13:58:31 btd kernel: sky2 eth0: transmit ring 353 .. 330 report=353 done=353 Mar 4 13:58:31 btd kernel: sky2 eth0: disabling interface Mar 4 13:58:31 btd kernel: sky2 eth0: enabling interface Mar 4 13:58:31 btd kernel: sky2 eth0: ram buffer 48K Mar 4 13:58:34 btd kernel: sky2 eth0: Link is up at 1000 Mbps, full duplex, flow control both
I only noticed the second of the two.
Signature · 1 line
Rob