aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/sky2.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r--drivers/net/sky2.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index 768ed47da9bd..b75b48e83970 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -1811,11 +1811,8 @@ static void sky2_tx_clean(struct net_device *dev)
1811 netif_tx_unlock_bh(dev); 1811 netif_tx_unlock_bh(dev);
1812} 1812}
1813 1813
1814static void sky2_tx_reset(struct sky2_port* sky2) 1814static void sky2_tx_reset(struct sky2_hw *hw, unsigned port)
1815{ 1815{
1816 unsigned port = sky2->port;
1817 struct sky2_hw *hw = sky2->hw;
1818
1819 /* Disable Force Sync bit and Enable Alloc bit */ 1816 /* Disable Force Sync bit and Enable Alloc bit */
1820 sky2_write8(hw, SK_REG(port, TXA_CTRL), 1817 sky2_write8(hw, SK_REG(port, TXA_CTRL),
1821 TXA_DIS_FSYNC | TXA_DIS_ALLOC | TXA_STOP_RC); 1818 TXA_DIS_FSYNC | TXA_DIS_ALLOC | TXA_STOP_RC);
@@ -1877,8 +1874,6 @@ static int sky2_down(struct net_device *dev)
1877 && port == 0 && hw->dev[1] && netif_running(hw->dev[1]))) 1874 && port == 0 && hw->dev[1] && netif_running(hw->dev[1])))
1878 sky2_write8(hw, SK_REG(port, GMAC_CTRL), GMC_RST_SET); 1875 sky2_write8(hw, SK_REG(port, GMAC_CTRL), GMC_RST_SET);
1879 1876
1880 sky2_tx_reset(sky2);
1881
1882 sky2_write8(hw, SK_REG(port, RX_GMF_CTRL_T), GMF_RST_SET); 1877 sky2_write8(hw, SK_REG(port, RX_GMF_CTRL_T), GMF_RST_SET);
1883 1878
1884 /* Force any delayed status interrrupt and NAPI */ 1879 /* Force any delayed status interrrupt and NAPI */
@@ -1903,6 +1898,8 @@ static int sky2_down(struct net_device *dev)
1903 /* turn off LED's */ 1898 /* turn off LED's */
1904 sky2_write16(hw, B0_Y2LED, LED_STAT_OFF); 1899 sky2_write16(hw, B0_Y2LED, LED_STAT_OFF);
1905 1900
1901 sky2_tx_reset(hw, port);
1902
1906 sky2_tx_clean(dev); 1903 sky2_tx_clean(dev);
1907 sky2_rx_clean(sky2); 1904 sky2_rx_clean(sky2);
1908 1905