Once the RX ring is exhausted, the RX DMA enters the suspend state and no more Receive Interrupts can be generated: incoming frames are kept in the MTL RX FIFO and are dropped once it overflows. The RX DMA only resumes after software refills the ring and updates the RX tail pointer, which is done by the RX NAPI poll (stmmac_rx_refill()). Commit 1b9707e6f1a9 ("net: stmmac: enable RPS and RBU interrupts") enabled the RBU interrupt for dwmac4, but the interrupt handler only updates the statistics counter without scheduling the RX NAPI. The RX NAPI is therefore never invoked, stmmac_rx_refill() never runs, and the RX path hangs forever once the ring has been exhausted. Schedule the RX NAPI when the RBU interrupt is received, aligning the dwmac4 behaviour with XGMAC (commit 6338488356d2 ("net: stmmac: xgmac: Add RBU handling in DMA interrupt")). This can be observed on a GMAC4 based platform with Split Header (SPH) enabled under high TCP RX pressure, where the slower RX refill path lets the RX ring run dry. Tested with Split Header (SPH) enabled, running a large file download over TCP: - Without this change, the RX path hangs permanently once the RX ring is exhausted: the RX tail pointer is never updated again and the DMA channel status register latches the RBU bit, while the TX path keeps running. - With this change, each RBU interrupt is handled and the RX path recovers by itself. e.g. 3 RBU events within 6 ms during a download peak, each one self-recovered (the RX tail pointer resumes advancing right after), with no further RBU events afterwards. Signed-off-by: David Wu --- drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c index a0249715fafa..929aa77ce247 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c @@ -153,8 +153,10 @@ int dwmac4_dma_interrupt(struct stmmac_priv *priv, void __iomem *ioaddr, /* ABNORMAL interrupts */ if (unlikely(intr_status & DMA_CHAN_STATUS_AIS)) { - if (unlikely(intr_status & DMA_CHAN_STATUS_RBU)) + if (unlikely(intr_status & DMA_CHAN_STATUS_RBU)) { x->rx_buf_unav_irq++; + ret |= handle_rx; + } if (unlikely(intr_status & DMA_CHAN_STATUS_RPS)) x->rx_process_stopped_irq++; if (unlikely(intr_status & DMA_CHAN_STATUS_ETI)) -- 2.25.1