diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/sky2.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 21aeb0c91fa6..af9739c1ef5f 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
@@ -1736,7 +1736,6 @@ static int sky2_poll(struct net_device *dev0, int *budget) | |||
1736 | u16 hwidx; | 1736 | u16 hwidx; |
1737 | u16 tx_done[2] = { TX_NO_STATUS, TX_NO_STATUS }; | 1737 | u16 tx_done[2] = { TX_NO_STATUS, TX_NO_STATUS }; |
1738 | 1738 | ||
1739 | sky2_write32(hw, STAT_CTRL, SC_STAT_CLR_IRQ); | ||
1740 | hwidx = sky2_read16(hw, STAT_PUT_IDX); | 1739 | hwidx = sky2_read16(hw, STAT_PUT_IDX); |
1741 | BUG_ON(hwidx >= STATUS_RING_SIZE); | 1740 | BUG_ON(hwidx >= STATUS_RING_SIZE); |
1742 | rmb(); | 1741 | rmb(); |
@@ -1754,8 +1753,6 @@ static int sky2_poll(struct net_device *dev0, int *budget) | |||
1754 | hw->st_idx = (hw->st_idx + 1) % STATUS_RING_SIZE; | 1753 | hw->st_idx = (hw->st_idx + 1) % STATUS_RING_SIZE; |
1755 | prefetch(hw->st_le + hw->st_idx); | 1754 | prefetch(hw->st_le + hw->st_idx); |
1756 | 1755 | ||
1757 | BUG_ON(le->link >= hw->ports || !hw->dev[le->link]); | ||
1758 | |||
1759 | BUG_ON(le->link >= 2); | 1756 | BUG_ON(le->link >= 2); |
1760 | dev = hw->dev[le->link]; | 1757 | dev = hw->dev[le->link]; |
1761 | if (dev == NULL || !netif_running(dev)) | 1758 | if (dev == NULL || !netif_running(dev)) |
@@ -1821,12 +1818,13 @@ static int sky2_poll(struct net_device *dev0, int *budget) | |||
1821 | } | 1818 | } |
1822 | 1819 | ||
1823 | exit_loop: | 1820 | exit_loop: |
1821 | sky2_write32(hw, STAT_CTRL, SC_STAT_CLR_IRQ); | ||
1824 | mmiowb(); | 1822 | mmiowb(); |
1825 | 1823 | ||
1826 | sky2_tx_check(hw, 0, tx_done[0]); | 1824 | sky2_tx_check(hw, 0, tx_done[0]); |
1827 | sky2_tx_check(hw, 1, tx_done[1]); | 1825 | sky2_tx_check(hw, 1, tx_done[1]); |
1828 | 1826 | ||
1829 | if (work_done < to_do) { | 1827 | if (sky2_read16(hw, STAT_PUT_IDX) == hw->st_idx) { |
1830 | /* need to restart TX timer */ | 1828 | /* need to restart TX timer */ |
1831 | if (is_ec_a1(hw)) { | 1829 | if (is_ec_a1(hw)) { |
1832 | sky2_write8(hw, STAT_TX_TIMER_CTRL, TIM_STOP); | 1830 | sky2_write8(hw, STAT_TX_TIMER_CTRL, TIM_STOP); |