linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: ethernet: ti: cpsw: fix extra rx interrupt
@ 2019-12-05 15:18 Grygorii Strashko
  2019-12-05 20:42 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Grygorii Strashko @ 2019-12-05 15:18 UTC (permalink / raw)
  To: netdev, David S . Miller
  Cc: Sekhar Nori, linux-kernel, linux-omap, Grygorii Strashko

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(-)

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]);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-12-06 12:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-05 15:18 [PATCH] net: ethernet: ti: cpsw: fix extra rx interrupt Grygorii Strashko
2019-12-05 20:42 ` David Miller
2019-12-06 12:28   ` Grygorii Strashko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).