Skip to content

Commit

Permalink
r6040: only disable RX interrupt if napi_schedule_prep is successful
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michael Thalmeier authored and David S. Miller committed Jul 15, 2011
1 parent 62f2a3a commit 0d9b6e7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/net/r6040.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 0d9b6e7

Please sign in to comment.