net: ethernet: ti: cpsw: fix extra rx interrupt
Subsystems (3)
PATCH v2 1/1 net: ethernet: ti: cpsw: fix extra rx interrupt
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.
---
Hi
It requires manual backporting if selected for stable. I can prepare separate patch for 5.4 if needed.
drivers/net/ethernet/ti/cpsw_priv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/ti/cpsw_priv.c +1 -1
@@ -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 ]);
Signature · 1 line
2.17.1
David Miller
maintainerFrom: Grygorii Strashko <[email protected]>
Date: Fri, 6 Dec 2019 14:28:20 +0200
Quoted 9 lines
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 <[email protected]>
Applied and queued up for -stable.