summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Jan Bajkowski <olek2@wp.pl>2021-06-09 00:21:07 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2021-06-23 15:42:42 +0300
commit5cea03aef609d84c5ac023e366c6629e66b405cf (patch)
tree64971416e725b81d17fd0c277004aced96b2df6a
parentdb5f4adc93bd028f2ccfbd6fc4fe67d1bc15c113 (diff)
downloadlinux-5cea03aef609d84c5ac023e366c6629e66b405cf.tar.xz
net: lantiq: disable interrupt before sheduling NAPI
[ Upstream commit f2386cf7c5f4ff5d7b584f5d92014edd7df6c676 ] 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: 9423361da523 ("net: lantiq: Disable IRQs only if NAPI gets scheduled ") Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl> Acked-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/net/ethernet/lantiq_xrx200.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/lantiq_xrx200.c b/drivers/net/ethernet/lantiq_xrx200.c
index 135ba5b6ae98..3da494df72f3 100644
--- a/drivers/net/ethernet/lantiq_xrx200.c
+++ b/drivers/net/ethernet/lantiq_xrx200.c
@@ -352,8 +352,8 @@ static irqreturn_t xrx200_dma_irq(int irq, void *ptr)
struct xrx200_chan *ch = ptr;
if (napi_schedule_prep(&ch->napi)) {
- __napi_schedule(&ch->napi);
ltq_dma_disable_irq(&ch->dma);
+ __napi_schedule(&ch->napi);
}
ltq_dma_ack_irq(&ch->dma);