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 <hauke@hauke-m.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Hauke Mehrtens 2020-09-12 21:36:29 +02:00 committed by David S. Miller
parent c582a7fea9
commit 9423361da5
1 changed files with 5 additions and 3 deletions

View File

@ -345,10 +345,12 @@ static irqreturn_t xrx200_dma_irq(int irq, void *ptr)
{ {
struct xrx200_chan *ch = ptr; struct xrx200_chan *ch = ptr;
ltq_dma_disable_irq(&ch->dma); if (napi_schedule_prep(&ch->napi)) {
ltq_dma_ack_irq(&ch->dma); __napi_schedule(&ch->napi);
ltq_dma_disable_irq(&ch->dma);
}
napi_schedule(&ch->napi); ltq_dma_ack_irq(&ch->dma);
return IRQ_HANDLED; return IRQ_HANDLED;
} }