diff options
author | Stephen Hemminger <shemminger@linux-foundation.org> | 2007-12-07 18:22:15 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-12-14 15:25:47 -0500 |
commit | 798fdd07fcc131f396e521febb4a7d42559bf4b5 (patch) | |
tree | e143d3ff270a9f92480461d44d111621293ab8a6 | |
parent | da8cadb31b82c9d41fc593c8deab6aa20b162d6b (diff) |
sky2: RX lockup fix
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.
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
-rw-r--r-- | drivers/net/sky2.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 6197afb3ed83..a74fc11a6482 100644 --- 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) | |||
822 | 822 | ||
823 | sky2_write32(hw, SK_REG(port, RX_GMF_CTRL_T), rx_reg); | 823 | sky2_write32(hw, SK_REG(port, RX_GMF_CTRL_T), rx_reg); |
824 | 824 | ||
825 | /* Flush Rx MAC FIFO on any flow control or error */ | 825 | if (hw->chip_id == CHIP_ID_YUKON_XL) { |
826 | sky2_write16(hw, SK_REG(port, RX_GMF_FL_MSK), GMR_FS_ANY_ERR); | 826 | /* Hardware errata - clear flush mask */ |
827 | sky2_write16(hw, SK_REG(port, RX_GMF_FL_MSK), 0); | ||
828 | } else { | ||
829 | /* Flush Rx MAC FIFO on any flow control or error */ | ||
830 | sky2_write16(hw, SK_REG(port, RX_GMF_FL_MSK), GMR_FS_ANY_ERR); | ||
831 | } | ||
827 | 832 | ||
828 | /* Set threshold to 0xa (64 bytes) + 1 to workaround pause bug */ | 833 | /* Set threshold to 0xa (64 bytes) + 1 to workaround pause bug */ |
829 | reg = RX_GMF_FL_THR_DEF + 1; | 834 | reg = RX_GMF_FL_THR_DEF + 1; |