summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrygorii Strashko <grygorii.strashko@ti.com>2019-12-06 14:28:20 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-21 10:42:22 +0100
commit4939f3c32e0a44b8809a1d6974f84f25ca99e598 (patch)
tree5b838aa6adb14fa902bdad3af2e2bd40b6b30972
parentb979958ec304e331881882c5481c4066659343b0 (diff)
downloadlinux-4939f3c32e0a44b8809a1d6974f84f25ca99e598.tar.gz
linux-4939f3c32e0a44b8809a1d6974f84f25ca99e598.tar.bz2
linux-4939f3c32e0a44b8809a1d6974f84f25ca99e598.zip
net: ethernet: ti: cpsw: fix extra rx interrupt
[ Upstream commit 51302f77bedab8768b761ed1899c08f89af9e4e2 ] Now RX interrupt is triggered twice every time, because in cpsw_rx_interrupt() it is asked first and then disabled. So there will be pending interrupt always, when RX interrupt is enabled again in NAPI handler. Fix it by first disabling IRQ and then do ask. Fixes: 870915feabdc ("drivers: net: cpsw: remove disable_irq/enable_irq as irq can be masked from cpsw itself") Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/net/ethernet/ti/cpsw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/ti/cpsw.c b/drivers/net/ethernet/ti/cpsw.c
index 892b06852e15..687f0c20b47f 100644
--- a/drivers/net/ethernet/ti/cpsw.c
+++ b/drivers/net/ethernet/ti/cpsw.c
@@ -773,8 +773,8 @@ static irqreturn_t cpsw_rx_interrupt(int irq, void *dev_id)
{
struct cpsw_common *cpsw = dev_id;
- cpdma_ctlr_eoi(cpsw->dma, CPDMA_EOI_RX);
writel(0, &cpsw->wr_regs->rx_en);
+ cpdma_ctlr_eoi(cpsw->dma, CPDMA_EOI_RX);
if (cpsw->quirk_irq) {
disable_irq_nosync(cpsw->irqs_table[0]);