r6040: only disable RX interrupt if napi_schedule_prep is successful
authorMichael Thalmeier <Michael.Thalmeier@sigmatek.at>
Fri, 15 Jul 2011 01:28:26 +0000 (01:28 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 Jul 2011 15:10:33 +0000 (08:10 -0700)
When receiving the first RX interrupt before the internal call
to napi_schedule_prep is successful the RX interrupt gets disabled
and is never enabled again as the poll function never gets executed.

Signed-off-by: Michael Thalmeier <Michael.Thalmeier@sigmatek.at>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/r6040.c

index 200a363c3bf59ac47d5da56e762486af6572b252..0ffec46084416958db7d7b9b756c859aa416e7d0 100644 (file)
@@ -677,9 +677,11 @@ static irqreturn_t r6040_interrupt(int irq, void *dev_id)
                if (status & RX_FIFO_FULL)
                        dev->stats.rx_fifo_errors++;
 
-               /* Mask off RX interrupt */
-               misr &= ~RX_INTS;
-               napi_schedule(&lp->napi);
+               if (likely(napi_schedule_prep(&lp->napi))) {
+                       /* Mask off RX interrupt */
+                       misr &= ~RX_INTS;
+                       __napi_schedule(&lp->napi);
+               }
        }
 
        /* TX interrupt request */