Skip to content

Commit 9423361

Browse files
haukedavem330
authored andcommitted
net: lantiq: Disable IRQs only if NAPI gets scheduled
The napi_schedule() call will only schedule the NAPI if it is not already running. To make sure that we do not deactivate interrupts without scheduling NAPI only deactivate the interrupts in case NAPI also gets scheduled. Signed-off-by: Hauke Mehrtens <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent c582a7f commit 9423361

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

drivers/net/ethernet/lantiq_xrx200.c

+5-3
Original file line numberDiff line numberDiff line change
@@ -345,10 +345,12 @@ static irqreturn_t xrx200_dma_irq(int irq, void *ptr)
345345
{
346346
struct xrx200_chan *ch = ptr;
347347

348-
ltq_dma_disable_irq(&ch->dma);
349-
ltq_dma_ack_irq(&ch->dma);
348+
if (napi_schedule_prep(&ch->napi)) {
349+
__napi_schedule(&ch->napi);
350+
ltq_dma_disable_irq(&ch->dma);
351+
}
350352

351-
napi_schedule(&ch->napi);
353+
ltq_dma_ack_irq(&ch->dma);
352354

353355
return IRQ_HANDLED;
354356
}

0 commit comments

Comments
 (0)