Re: [REGRESSION][BISECTED] stmmac: suspend hangs since 1b9707e6f1a9 ("net: stmmac: enable RPS and RBU interrupts")
tresonic <[email protected]> Sat, 18 Jul 2026 00:23:23 +0200
| Newsgroups | dev.linux.lists.regressions,org.kernel.vger.netdev |
|---|---|
| Message-ID | <[email protected]> |
On 7/17/26 5:40 PM, Andrew Lunn wrote:
>> I tested the changes as you suggested and it seems DMA_CHAN_INTR_ENA_RPS in DMA_CHAN_INTR_ABNORMAL_4_10 broke it.
>> With this change on master suspend is working:
>>
>> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.h b/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.h
>> index 43b036d4e95b..e907142c9ee2 100644
>> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.h
>> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_dma.h
>> @@ -121,7 +121,6 @@ static inline u32 dma_chanx_base_addr(const struct dwmac4_addrs *addrs,
>> DMA_CHAN_INTR_ENA_TIE)
>>
>> #define DMA_CHAN_INTR_ABNORMAL_4_10 (DMA_CHAN_INTR_ENA_AIE_4_10 | \
>> - DMA_CHAN_INTR_ENA_RPS | \
>> DMA_CHAN_INTR_ENA_RBU | \
>> DMA_CHAN_INTR_ENA_FBE)
>> /* DMA default interrupt mask for 4.10a */
>
> OK, that narrows it down a bit.
>
> I made the guess it is an interrupt storm during suspend, because
> interrupts are not disabled. DMA_CHAN_INTR_ABNORMAL_4_10 is written to
> hardware in dwmac410_dma_init_channel(). However, i don't see anywhere
> these interrupts are clear? struct stmmac_dma_ops has an init_chan
> operation, but there is no opposite operation to reset a channel?
> There is however disable_dma_irq. Maybe DMA_CHAN_INTR_ENA_RPS can be
> cleared there?
>
> But i'm also having trouble finding where dwmac4_disable_dma_irq() is
> actually called. It is called from stmmac_disable_rx_queue() and
> stmmac_disable_tx_queue() but they only seem to be used in the XDP
> code.
>
> Are the DMAs being stopped during suspend? I don't know this driver
> well enough to answer that.
>
> Can you scatter some printk() around and see what actually happens on
> suspend. See if you can find somewhere to disable that one interrupt?
>
> Andrew
It seems your assumptions are correct. If i do
diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c b/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c
index a0249715fafa..487efc746b20 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac4_lib.c
@@ -129,6 +129,8 @@ void dwmac4_disable_dma_irq(struct stmmac_priv *priv, void __iomem *ioaddr,
const struct dwmac4_addrs *dwmac4_addrs = priv->plat->dwmac4_addrs;
u32 value = readl(ioaddr + DMA_CHAN_INTR_ENA(dwmac4_addrs, chan));
+ value &= ~DMA_CHAN_INTR_ENA_RPS;
+
if (rx)
value &= ~DMA_CHAN_INTR_ENA_RIE;
if (tx)
I can suspend and resume!
Could it be sufficient to just do this and reenable on dwmac4_enable_dma_irq?
tresonic