netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Tyser <ptyser@xes-inc.com>
To: shemminger@linux-foundation.org
Cc: netdev@vger.kernel.org
Subject: [PATCH] sky2: RX lockup fix
Date: Wed, 05 Dec 2007 12:51:03 -0600	[thread overview]
Message-ID: <1196880663.2816.149.camel@localhost.localdomain> (raw)

Hello,
I'm using a Marvell 88E8062 on a custom PPC64 blade and ran into RX
lockups while validating the sky2 driver.  The receive MAC FIFO would
become stuck during testing with high traffic.  One port of the 88E8062
would lockup, while the other port remained functional.  Re-inserting
the sky2 module would not fix the problem - only a power cycle would.

I looked over Marvell's most recent sk98lin driver and it looks like
they had a "workaround" for the Yukon XL that the sky2 doesn't have yet.
The sk98lin driver disables the RX MAC FIFO flush feature for all
revisions of the Yukon XL.

According to skgeinit.c of the sk98lin driver, "Flushing must be enabled
(needed for ASF see dev. #4.29), but the flushing mask should be
disabled (see dev. #4.115)".  Nice.   I implemented this same change in
the sky2 driver and verified that the RX lockup I was seeing was
resolved.


I didn't see the problem mentioned in the netdev list, so I've included
a patch against the
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 tree
which disables RX flushing for the Yukon XL chips.

Please CC replies to me as I am not subscribed to the list.

Thanks,
Peter Tyser


Signed-off-by: Peter Tyser <ptyser@xes-inc.com>

--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -822,8 +822,13 @@ static void sky2_mac_init(struct sky2_hw *hw,
unsigned port)
 
 	sky2_write32(hw, SK_REG(port, RX_GMF_CTRL_T), rx_reg);
 
-	/* Flush Rx MAC FIFO on any flow control or error */
-	sky2_write16(hw, SK_REG(port, RX_GMF_FL_MSK), GMR_FS_ANY_ERR);
+	if (hw->chip_id == CHIP_ID_YUKON_XL) {
+		/* Hardware errata - clear flush mask */
+		sky2_write16(hw, SK_REG(port, RX_GMF_FL_MSK), 0);
+	} else {
+		/* Flush Rx MAC FIFO on any flow control or error */
+		sky2_write16(hw, SK_REG(port, RX_GMF_FL_MSK), GMR_FS_ANY_ERR);
+	}
 
 	/* Set threshold to 0xa (64 bytes) + 1 to workaround pause bug  */
 	reg = RX_GMF_FL_THR_DEF + 1;



             reply	other threads:[~2007-12-05 19:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-05 18:51 Peter Tyser [this message]
2007-12-05 21:40 ` [PATCH] sky2: RX lockup fix Stephen Hemminger
2007-12-06  0:18   ` Peter Tyser
2007-12-06  3:52     ` Stephen Hemminger
2007-12-06 16:14       ` Peter Tyser
2007-12-07 23:22         ` Stephen Hemminger
2007-12-14 20:26           ` Jeff Garzik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1196880663.2816.149.camel@localhost.localdomain \
    --to=ptyser@xes-inc.com \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).