The 'irq_disabled' variable indicates the current state of the RX IRQ and is used by the RX NAPI handler to determine whether the IRQ should be enabled. Currently, 'irq_disabled' is set before actually disabling the IRQ by invoking disable_irq_nosync(). In an SMP environment, this leads to a race condition wherein the processor taking the interrupt sets 'irq_disabled' while another processor executing a previous instance of the RX NAPI handler sees 'irq_disabled' set and invokes enable_irq() before the RX IRQ is actually disabled by disable_irq_nosync(). This results in the following warning: Unbalanced enable for IRQ ... Fix this by disabling the RX IRQ using disable_irq_nosync() before setting 'irq_disabled'. Fixes: da70d184a8c3 ("net: ethernet: ti: am65-cpsw: Introduce multi queue Rx") Fixes: 47bfc4d128de ("net: ti: am65-cpsw-nuss: fix RX IRQ state after .ndo_stop()") Cc: Signed-off-by: Siddharth Vadapalli --- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c index 5924db6be3fe..8785ab40f157 100644 --- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c +++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c @@ -1570,8 +1570,8 @@ static irqreturn_t am65_cpsw_nuss_rx_irq(int irq, void *dev_id) { struct am65_cpsw_rx_flow *flow = dev_id; - flow->irq_disabled = true; disable_irq_nosync(irq); + flow->irq_disabled = true; napi_schedule(&flow->napi_rx); return IRQ_HANDLED; -- 2.51.1