🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.kernel.netdev
2 messages
2 total messages Started by Igor Velkov Fri, 09 Oct 2026 20:17
[PATCH net v4] net: stmmac: dwmac1000: clear the RGMII status interrupt
#1484
Author: Igor Velkov
Date: Fri, 09 Oct 2026 20:17
59 lines
8831 bytes
Since commit 2e2c878a3141 ("net: stmmac: remove SGMII/RGMII/SMII
interrupt handling") nothing on the RGMII path reads GMAC_RGSMIIIS, so
RGSMIIIS stays pending behind GMAC_INT_MASK from the first link change
on. stmmac_resume() resets the MAC in stmmac_hw_setup(); the reset sets
GMAC_INT_MASK to 0 until dwmac1000_core_init() writes the mask again,
and the pending status storms the line:

  dwmac_dma_interrupt: unexpected status 04000000

A register dump at the first message on ODROID-HC4 showed it:

  core int_status 00000001 int_mask 00000000 pmt 00000000 rgsmiiis 0000000d

When the resume thread runs on the CPU that takes the MAC interrupt,
the storm starves it: a soft lockup, then a watchdog reset or a hang.

Read GMAC_RGSMIIIS in dwmac1000_irq_status() when the status is not
masked, as the driver did before 2e2c878a3141; the read clears it.

Wake-on-LAN resume from s2idle with the resume thread and the MAC
interrupt on one CPU: Helios64 (dwmac-rk), 7.3-rc6, soft-locked in 3 of
3 resumes without a fix and in 0 of 10 with this patch; it ran with an
out-of-tree dwmac-rk change that keeps the GMAC powered across suspend.
ODROID-HC4 (dwmac-meson8b): 0 of 10 with this patch, 2 of 2 without a
fix on a 7.3-rc5 build. irq_rgmii_n went up by one per resume.

Fixes: 2e2c878a3141 ("net: stmmac: remove SGMII/RGMII/SMII interrupt handling")
Assisted-by: LLM
Signed-off-by: Igor Velkov <iav@iav.lv>
---
v4:
- Clear RGSMIIIS in dwmac1000_irq_status() instead of disabling the
  interrupt line around stmmac_hw_setup() in stmmac_resume(), after
  Daniel Machon asked about a dwmac1000-only fix.
- Link to v3: https://lore.kernel.org/r/20261007031438.3179966-1-iav@iav.lv

 drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c
index d4ace3924891..66337cfd9824 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac1000_core.c
@@ -312,6 +312,12 @@ static int dwmac1000_irq_status(struct stmmac_priv *priv,
 	if (intr_status & (PCS_ANE_IRQ | PCS_LINK_IRQ))
 		stmmac_integrated_pcs_irq(priv, intr_status, x);
 
+	/* Reading RGSMIIIS clears the interrupt the MAC reset unmasks. */
+	if (intr_status & PCS_RGSMIIIS_IRQ) {
+		readl(ioaddr + GMAC_RGSMIIIS);
+		x->irq_rgmii_n++;
+	}
+
 	return ret;
 }
 
-- 
2.43.0
Re: [PATCH net v4] net: stmmac: dwmac1000: clear the RGMII status interrupt
#3584
Author: patchwork-bot+netdevbpf
Date: Thu, 15 Oct 2026 13:00
24 lines
6524 bytes
Hello:

This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Fri,  9 Oct 2026 23:17:09 +0300 you wrote:
> Since commit 2e2c878a3141 ("net: stmmac: remove SGMII/RGMII/SMII
> interrupt handling") nothing on the RGMII path reads GMAC_RGSMIIIS, so
> RGSMIIIS stays pending behind GMAC_INT_MASK from the first link change
> on. stmmac_resume() resets the MAC in stmmac_hw_setup(); the reset sets
> GMAC_INT_MASK to 0 until dwmac1000_core_init() writes the mask again,
> and the pending status storms the line:
> 
> [...]

Here is the summary with links:
  - [net,v4] net: stmmac: dwmac1000: clear the RGMII status interrupt
    https://git.kernel.org/netdev/net/c/aa07285705f8

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads