diff mbox series

net: ethernet: ti: cpsw: fix extra rx interrupt

Message ID 20191205151817.1076-1-grygorii.strashko@ti.com
State Superseded
Headers show
Series net: ethernet: ti: cpsw: fix extra rx interrupt | expand

Commit Message

Grygorii Strashko Dec. 5, 2019, 3:18 p.m. UTC
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.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>

---
Hi

This is an old issue, but I can't specify Fixes tag. And, unfortunatelly,
it can't be backported as is even in v5.4.

 drivers/net/ethernet/ti/cpsw_priv.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.17.1

Comments

David Miller Dec. 5, 2019, 8:42 p.m. UTC | #1
From: Grygorii Strashko <grygorii.strashko@ti.com>

Date: Thu, 5 Dec 2019 17:18:17 +0200

> This is an old issue, but I can't specify Fixes tag.


This is never true, there is always an appropriate Fixes: tag
even it means specifying the tag that created Linus's GIT repo.

> And, unfortunatelly,

> it can't be backported as is even in v5.4.


This I always don't understand.

You must elaborate and specify a Fixes: tag.
diff mbox series

Patch

diff --git a/drivers/net/ethernet/ti/cpsw_priv.c b/drivers/net/ethernet/ti/cpsw_priv.c
index b833cc1d188c..707d5eb480ce 100644
--- a/drivers/net/ethernet/ti/cpsw_priv.c
+++ b/drivers/net/ethernet/ti/cpsw_priv.c
@@ -100,8 +100,8 @@  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]);