Commit f2386cf7 authored by Aleksander Jan Bajkowski's avatar Aleksander Jan Bajkowski Committed by David S. Miller

net: lantiq: disable interrupt before sheduling NAPI

This patch fixes TX hangs with threaded NAPI enabled. The scheduled
NAPI seems to be executed in parallel with the interrupt on second
thread. Sometimes it happens that ltq_dma_disable_irq() is executed
after xrx200_tx_housekeeping(). The symptom is that TX interrupts
are disabled in the DMA controller. As a result, the TX hangs after
a few seconds of the iperf test. Scheduling NAPI after disabling
interrupts fixes this issue.

Tested on Lantiq xRX200 (BT Home Hub 5A).

Fixes: 9423361d ("net: lantiq: Disable IRQs only if NAPI gets scheduled ")
Signed-off-by: default avatarAleksander Jan Bajkowski <olek2@wp.pl>
Acked-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 504fd6a5
...@@ -352,8 +352,8 @@ static irqreturn_t xrx200_dma_irq(int irq, void *ptr) ...@@ -352,8 +352,8 @@ static irqreturn_t xrx200_dma_irq(int irq, void *ptr)
struct xrx200_chan *ch = ptr; struct xrx200_chan *ch = ptr;
if (napi_schedule_prep(&ch->napi)) { if (napi_schedule_prep(&ch->napi)) {
__napi_schedule(&ch->napi);
ltq_dma_disable_irq(&ch->dma); ltq_dma_disable_irq(&ch->dma);
__napi_schedule(&ch->napi);
} }
ltq_dma_ack_irq(&ch->dma); ltq_dma_ack_irq(&ch->dma);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment