diff options
author | Stephen Hemminger <shemminger@osdl.org> | 2006-02-22 14:45:00 -0500 |
---|---|---|
committer | Francois Romieu <romieu@fr.zoreil.com> | 2006-02-22 19:24:04 -0500 |
commit | a8fd6266dafd564bae6758cb78c8c152e7d4115e (patch) | |
tree | 0a06bcd302199fa55f7a04958ab84c46f19c342e /drivers/net/sky2.c | |
parent | ff81fbbe321c3a468b6225c673ca57efa501fbed (diff) |
[PATCH] sky2: poke coalescing timer to fix hang
Need to restart the interrupt coalescing timer after clearing the interrupt,
to avoid races with interrupt timer and processing.
Patch from Carl-Daniel Halfinger
Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
Diffstat (limited to 'drivers/net/sky2.c')
-rw-r--r-- | drivers/net/sky2.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index cf7fd28d6776..629809433cb3 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
@@ -1895,6 +1895,17 @@ static int sky2_poll(struct net_device *dev0, int *budget) | |||
1895 | 1895 | ||
1896 | sky2_write32(hw, STAT_CTRL, SC_STAT_CLR_IRQ); | 1896 | sky2_write32(hw, STAT_CTRL, SC_STAT_CLR_IRQ); |
1897 | 1897 | ||
1898 | /* | ||
1899 | * Kick the STAT_LEV_TIMER_CTRL timer. | ||
1900 | * This fixes my hangs on Yukon-EC (0xb6) rev 1. | ||
1901 | * The if clause is there to start the timer only if it has been | ||
1902 | * configured correctly and not been disabled via ethtool. | ||
1903 | */ | ||
1904 | if (sky2_read8(hw, STAT_LEV_TIMER_CTRL) == TIM_START) { | ||
1905 | sky2_write8(hw, STAT_LEV_TIMER_CTRL, TIM_STOP); | ||
1906 | sky2_write8(hw, STAT_LEV_TIMER_CTRL, TIM_START); | ||
1907 | } | ||
1908 | |||
1898 | hwidx = sky2_read16(hw, STAT_PUT_IDX); | 1909 | hwidx = sky2_read16(hw, STAT_PUT_IDX); |
1899 | BUG_ON(hwidx >= STATUS_RING_SIZE); | 1910 | BUG_ON(hwidx >= STATUS_RING_SIZE); |
1900 | rmb(); | 1911 | rmb(); |