diff options
author | Mike McCormack <mikem@ring3k.org> | 2009-08-14 05:15:14 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-08-14 15:30:00 -0700 |
commit | 264bb4fab1a0952b4eef4df5b9e90bc050a2d1e6 (patch) | |
tree | b7546998044c84af5aa2432a0f80fcb833948b50 /drivers/net/sky2.c | |
parent | a510996bea68eec2feb7818e9a440bd840613a25 (diff) |
sky2: Reset tx train after interrupts disabled.
Reseting the tx chain too soon results in invalid tx queue positions
being delivered in the status queue. This also makes sure there's no
overlap between the cleanup done by sky2_tx_clean() and
sky2_tx_done().
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r-- | drivers/net/sky2.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 768ed47da9b..b75b48e8397 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c @@ -1811,11 +1811,8 @@ static void sky2_tx_clean(struct net_device *dev) netif_tx_unlock_bh(dev); } -static void sky2_tx_reset(struct sky2_port* sky2) +static void sky2_tx_reset(struct sky2_hw *hw, unsigned port) { - unsigned port = sky2->port; - struct sky2_hw *hw = sky2->hw; - /* Disable Force Sync bit and Enable Alloc bit */ sky2_write8(hw, SK_REG(port, TXA_CTRL), TXA_DIS_FSYNC | TXA_DIS_ALLOC | TXA_STOP_RC); @@ -1877,8 +1874,6 @@ static int sky2_down(struct net_device *dev) && port == 0 && hw->dev[1] && netif_running(hw->dev[1]))) sky2_write8(hw, SK_REG(port, GMAC_CTRL), GMC_RST_SET); - sky2_tx_reset(sky2); - sky2_write8(hw, SK_REG(port, RX_GMF_CTRL_T), GMF_RST_SET); /* Force any delayed status interrrupt and NAPI */ @@ -1903,6 +1898,8 @@ static int sky2_down(struct net_device *dev) /* turn off LED's */ sky2_write16(hw, B0_Y2LED, LED_STAT_OFF); + sky2_tx_reset(hw, port); + sky2_tx_clean(dev); sky2_rx_clean(sky2); |