From: tresonic <tresonic@mail.de>
To: Andrew Lunn <andrew@lunn.ch>
Cc: netdev@vger.kernel.org, regressions@lists.linux.dev,
rmk+kernel@armlinux.org.uk, kuba@kernel.org,
Maxime Chevallier <maxime.chevallier@bootlin.com>
Subject: Re: [REGRESSION][BISECTED] stmmac: suspend hangs since 1b9707e6f1a9 ("net: stmmac: enable RPS and RBU interrupts")
Date: Sat, 18 Jul 2026 00:23:23 +0200 [thread overview]
Message-ID: <8f6aca6d-6619-401c-bed7-8d42732d166a@mail.de> (raw)
In-Reply-To: <21068662-c44b-4266-b634-24e5eac8cd96@lunn.ch>
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
next prev parent reply other threads:[~2026-07-17 22:23 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-16 20:10 [REGRESSION][BISECTED] stmmac: suspend hangs since 1b9707e6f1a9 ("net: stmmac: enable RPS and RBU interrupts") tresonic
2026-07-16 21:47 ` Andrew Lunn
2026-07-17 7:18 ` tresonic
2026-07-17 15:40 ` Andrew Lunn
2026-07-17 22:23 ` tresonic [this message]
2026-07-17 22:34 ` tresonic
2026-07-18 0:16 ` Andrew Lunn
2026-07-18 7:35 ` tresonic
2026-07-18 13:11 ` Maxime Chevallier
2026-07-18 13:32 ` tresonic
2026-07-18 14:11 ` Andrew Lunn
2026-07-18 15:32 ` tresonic
2026-07-18 14:06 ` Andrew Lunn
2026-07-18 15:27 ` [PATCH] net: stmmac: dwmac4: mask interrupts before stopping DMA in suspend Luis Lang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8f6aca6d-6619-401c-bed7-8d42732d166a@mail.de \
--to=tresonic@mail.de \
--cc=andrew@lunn.ch \
--cc=kuba@kernel.org \
--cc=maxime.chevallier@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=regressions@lists.linux.dev \
--cc=rmk+kernel@armlinux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox