netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFT] sky2 auto negotiation PHY errata
@ 2007-02-02 19:28 Stephen Hemminger
  2007-02-20 18:42 ` Rob Sims
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Hemminger @ 2007-02-02 19:28 UTC (permalink / raw)
  To: netdev, linux-kernel

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(-)

diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 822dd0b..4f04ffa 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -387,6 +387,14 @@ static void sky2_phy_init(struct sky2_hw
 
 	if (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)
-- 
1.4.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [RFT] sky2 auto negotiation PHY errata
  2007-02-02 19:28 [RFT] sky2 auto negotiation PHY errata Stephen Hemminger
@ 2007-02-20 18:42 ` Rob Sims
  2007-02-20 19:00   ` Stephen Hemminger
  0 siblings, 1 reply; 4+ messages in thread
From: Rob Sims @ 2007-02-20 18:42 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev

[-- Attachment #1: Type: text/plain, Size: 2228 bytes --]

On Fri, Feb 02, 2007 at 11:28:46AM -0800, Stephen Hemminger wrote:
> 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(-)
> 
> diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
> index 822dd0b..4f04ffa 100644
> --- a/drivers/net/sky2.c
> +++ b/drivers/net/sky2.c
> @@ -387,6 +387,14 @@ static void sky2_phy_init(struct sky2_hw
>  
>  	if (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)

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.
-- 
Rob

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFT] sky2 auto negotiation PHY errata
  2007-02-20 18:42 ` Rob Sims
@ 2007-02-20 19:00   ` Stephen Hemminger
  2007-03-05 14:23     ` Rob Sims
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Hemminger @ 2007-02-20 19:00 UTC (permalink / raw)
  To: Rob Sims; +Cc: netdev

You need the flow control fix and the tx_timeout fix posted for 2.6.20 (stable)
and current git tree. 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [RFT] sky2 auto negotiation PHY errata
  2007-02-20 19:00   ` Stephen Hemminger
@ 2007-03-05 14:23     ` Rob Sims
  0 siblings, 0 replies; 4+ messages in thread
From: Rob Sims @ 2007-03-05 14:23 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: netdev

[-- Attachment #1: Type: text/plain, Size: 2609 bytes --]

On Tue, Feb 20, 2007 at 11:00:53AM -0800, Stephen Hemminger wrote:
> You need the flow control fix and the tx_timeout fix 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 (root@btd.robsims.com) (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.
-- 
Rob

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-03-05 14:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-02 19:28 [RFT] sky2 auto negotiation PHY errata Stephen Hemminger
2007-02-20 18:42 ` Rob Sims
2007-02-20 19:00   ` Stephen Hemminger
2007-03-05 14:23     ` Rob Sims

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).