In multi-MSI mode (DMA_BUS_MODE INTM mode 1) the normal RX/TX completion events are signalled on the per-channel interrupts, but abnormal DMA channel events can be signalled on the common MAC interrupt. This was measured here for RBU; the other abnormal events (RPS, FBE, ...) are expected to use the same line. stmmac_mac_interrupt() only handles the common MAC events: it neither reads nor clears the DMA channel status, and it always returns IRQ_HANDLED. Once such an event is raised, the level-triggered MAC interrupt therefore stays asserted and the CPU taking it is stuck in an endless interrupt storm. Commit 1b9707e6f1a9 ("net: stmmac: enable RPS and RBU interrupts") made this easy to hit, as RBU is raised whenever the RX ring runs dry. On the Allwinner A733 (GMAC210, Radxa Cubie A7A) a bidirectional iperf3 test hangs the board within about a minute: right before the hang the eth0:mac count jumps from 0 to over 118000 in about 1.4 s while the channel 0 status reads 0x44c5 (AIS and RBU set). Service the DMA channel status from the MAC interrupt handler too, as the shared interrupt handler does. With this change the same test runs for 600 s at 912/673 Mbit/s; eth0:mac fires 718 times, matching the rx_buf_unav_irq counter, about one per second. Fixes: 1b9707e6f1a9 ("net: stmmac: enable RPS and RBU interrupts") Signed-off-by: Paulo José Rolim Braga Filho Assisted-by: Claude:claude-opus-5-5 [Claude Code] --- Tested only on the Allwinner A733 (dwmac-sun55i, GMAC210). The change also affects the other users of STMMAC_FLAG_MULTI_MSI_EN (dwmac-intel, dwmac-s32, dwmac-loongson, dwmac-motorcomm); testing on that hardware would be welcome. drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 9ded31150..cda02730f 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -6466,6 +6466,13 @@ static irqreturn_t stmmac_mac_interrupt(int irq, void *dev_id) /* To handle Common interrupts */ stmmac_common_interrupt(priv); + /* With per-channel interrupts, abnormal DMA channel events such as + * RBU can still be signalled on this line: service the DMA channel + * status like the shared interrupt handler does, otherwise the level + * interrupt is never cleared. + */ + stmmac_dma_interrupt(priv); + return IRQ_HANDLED; } -- 2.54.1