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.c25
1 files changed, 9 insertions, 16 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
index daf961ab68bc..3550c5dcd93c 100644
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -1151,14 +1151,7 @@ stopped:
1151 1151
1152 /* reset the Rx prefetch unit */ 1152 /* reset the Rx prefetch unit */
1153 sky2_write32(hw, Y2_QADDR(rxq, PREF_UNIT_CTRL), PREF_UNIT_RST_SET); 1153 sky2_write32(hw, Y2_QADDR(rxq, PREF_UNIT_CTRL), PREF_UNIT_RST_SET);
1154 1154 mmiowb();
1155 /* Reset the RAM Buffer receive queue */
1156 sky2_write8(hw, RB_ADDR(rxq, RB_CTRL), RB_RST_SET);
1157
1158 /* Reset Rx MAC FIFO */
1159 sky2_write8(hw, SK_REG(sky2->port, RX_GMF_CTRL_T), GMF_RST_SET);
1160
1161 sky2_read8(hw, B0_CTST);
1162} 1155}
1163 1156
1164/* Clean out receive buffer area, assumes receiver hardware stopped */ 1157/* Clean out receive buffer area, assumes receiver hardware stopped */
@@ -1825,12 +1818,6 @@ static int sky2_down(struct net_device *dev)
1825 if (netif_msg_ifdown(sky2)) 1818 if (netif_msg_ifdown(sky2))
1826 printk(KERN_INFO PFX "%s: disabling interface\n", dev->name); 1819 printk(KERN_INFO PFX "%s: disabling interface\n", dev->name);
1827 1820
1828 /* Disable port IRQ */
1829 imask = sky2_read32(hw, B0_IMSK);
1830 imask &= ~portirq_msk[port];
1831 sky2_write32(hw, B0_IMSK, imask);
1832 sky2_read32(hw, B0_IMSK);
1833
1834 /* Force flow control off */ 1821 /* Force flow control off */
1835 sky2_write8(hw, SK_REG(port, GMAC_CTRL), GMC_PAUSE_OFF); 1822 sky2_write8(hw, SK_REG(port, GMAC_CTRL), GMC_PAUSE_OFF);
1836 1823
@@ -1870,8 +1857,6 @@ static int sky2_down(struct net_device *dev)
1870 1857
1871 sky2_write32(hw, RB_ADDR(txqaddr[port], RB_CTRL), RB_RST_SET); 1858 sky2_write32(hw, RB_ADDR(txqaddr[port], RB_CTRL), RB_RST_SET);
1872 1859
1873 sky2_rx_stop(sky2);
1874
1875 sky2_write8(hw, SK_REG(port, RX_GMF_CTRL_T), GMF_RST_SET); 1860 sky2_write8(hw, SK_REG(port, RX_GMF_CTRL_T), GMF_RST_SET);
1876 sky2_write8(hw, SK_REG(port, TX_GMF_CTRL_T), GMF_RST_SET); 1861 sky2_write8(hw, SK_REG(port, TX_GMF_CTRL_T), GMF_RST_SET);
1877 1862
@@ -1881,6 +1866,14 @@ static int sky2_down(struct net_device *dev)
1881 sky2_write32(hw, STAT_ISR_TIMER_CNT, 0); 1866 sky2_write32(hw, STAT_ISR_TIMER_CNT, 0);
1882 sky2_read8(hw, STAT_ISR_TIMER_CTRL); 1867 sky2_read8(hw, STAT_ISR_TIMER_CTRL);
1883 1868
1869 sky2_rx_stop(sky2);
1870
1871 /* Disable port IRQ */
1872 imask = sky2_read32(hw, B0_IMSK);
1873 imask &= ~portirq_msk[port];
1874 sky2_write32(hw, B0_IMSK, imask);
1875 sky2_read32(hw, B0_IMSK);
1876
1884 synchronize_irq(hw->pdev->irq); 1877 synchronize_irq(hw->pdev->irq);
1885 napi_synchronize(&hw->napi); 1878 napi_synchronize(&hw->napi);
1886 1879