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 <[EMAIL PROTECTED]>


--- sky2.orig/drivers/net/sky2.c        2006-02-21 09:14:34.000000000 -0800
+++ sky2/drivers/net/sky2.c     2006-02-21 09:15:04.000000000 -0800
@@ -1895,6 +1895,17 @@
 
        sky2_write32(hw, STAT_CTRL, SC_STAT_CLR_IRQ);
 
+       /*
+        * Kick the STAT_LEV_TIMER_CTRL timer.
+        * This fixes my hangs on Yukon-EC (0xb6) rev 1.
+        * The if clause is there to start the timer only if it has been
+        * configured correctly and not been disabled via ethtool.
+        */
+       if (sky2_read8(hw, STAT_LEV_TIMER_CTRL) == TIM_START) {
+               sky2_write8(hw, STAT_LEV_TIMER_CTRL, TIM_STOP);
+               sky2_write8(hw, STAT_LEV_TIMER_CTRL, TIM_START);
+       }
+
        hwidx = sky2_read16(hw, STAT_PUT_IDX);
        BUG_ON(hwidx >= STATUS_RING_SIZE);
        rmb();

--

-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to