BPF List
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "James Hilliard" <james.hilliard1@gmail.com>
Cc: linux-sunxi@lists.linux.dev, bpf@vger.kernel.org
Subject: Re: [PATCH net v4 09/15] net: stmmac: track datapath and power ownership across failed reopening
Date: Sun, 27 Sep 2026 15:50:04 +0000	[thread overview]
Message-ID: <20260927155004.DE0A61F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260926-submit-stmmac-reset-fixes-v1-v4-9-ec1c0250b3c9@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] net: stmmac: IRQ storm and permanent disablement due to IRQ_NONE return on wakeup
--

commit d1c65d817aaf24471fe20e2504c91eda25ba350f
Author: James Hilliard <james.hilliard1@gmail.com>

net: stmmac: track datapath and power ownership across failed reopening

This patch tracks datapath and power ownership for stmmac interfaces across
failed reopening attempts. It separates core sleep cleanup from platform
and clock restoration, adding guards to skip accessing unpowered MMIO
registers via a hw_unavailable flag.

> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index c4ba97d57b47e..22a65c1c16810 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
[ ... ]
> @@ -6377,6 +6571,12 @@ static irqreturn_t stmmac_interrupt(int irq, void *dev_id)
>  	struct net_device *dev = (struct net_device *)dev_id;
>  	struct stmmac_priv *priv = netdev_priv(dev);
>  
> +	if (READ_ONCE(priv->hw_unavailable)) {
> +		if (priv->irq_wake)
> +			pm_wakeup_event(priv->device, 0);
> +		return IRQ_NONE;
> +	}
> +
>  	/* Check if adapter is up */
>  	if (test_bit(STMMAC_DOWN, &priv->state))
>  		return IRQ_HANDLED;

[Severity: High]
When the device is suspended with Wake-on-LAN enabled, will returning
IRQ_NONE here cause an interrupt storm?

If a magic packet wakes the system, it asserts the MAC's level-triggered
interrupt line. During the resume_noirq phase, the generic IRQ subsystem
unmasks the interrupt line and this handler is called.

Because hw_unavailable is still true until the later system resume callback
phase, this code returns IRQ_NONE without acknowledging the interrupt at the
MAC hardware or masking the IRQ line. For a level-triggered shared interrupt,
this causes the interrupt controller to immediately re-trigger, creating
an infinite IRQ storm that permanently disables the IRQ line.

[ ... ]
> @@ -6399,6 +6599,12 @@ static irqreturn_t stmmac_mac_interrupt(int irq, void *dev_id)
>  	struct net_device *dev = (struct net_device *)dev_id;
>  	struct stmmac_priv *priv = netdev_priv(dev);
>  
> +	if (READ_ONCE(priv->hw_unavailable)) {
> +		if (priv->irq_wake)
> +			pm_wakeup_event(priv->device, 0);
> +		return IRQ_NONE;
> +	}
> +
>  	/* Check if adapter is up */
>  	if (test_bit(STMMAC_DOWN, &priv->state))
>  		return IRQ_HANDLED;

[Severity: High]
Does this dedicated MAC interrupt handler suffer from the same IRQ storm
issue as stmmac_interrupt above when returning IRQ_NONE during a wakeup
event?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260926-submit-stmmac-reset-fixes-v1-v4-0-ec1c0250b3c9@gmail.com?part=9

  reply	other threads:[~2026-09-27 15:50 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-26 15:48 [PATCH net v4 00/15] net: stmmac: preserve datapath state across MTU and resume failures James Hilliard
2026-09-26 15:48 ` [PATCH net v4 01/15] net: stmmac: unwind the WoL IRQ after a safety IRQ request failure James Hilliard
2026-09-26 15:48 ` [PATCH net v4 02/15] net: stmmac: reuse the MDIO reset GPIO on resume James Hilliard
2026-09-30  4:51   ` netdev-bot+sashiko
2026-09-26 15:48 ` [PATCH net v4 03/15] net: phylink: allow stopping a suspended instance James Hilliard
2026-09-30  4:51   ` netdev-bot+sashiko
2026-09-26 15:48 ` [PATCH net v4 04/15] xsk: freeze deferred pool teardown during system sleep James Hilliard
2026-09-30  4:51   ` netdev-bot+sashiko
2026-09-26 15:49 ` [PATCH net v4 05/15] net: stmmac: serialize and retain PHC configuration across reset James Hilliard
2026-09-27 15:50   ` sashiko-bot
2026-09-30  4:51   ` netdev-bot+sashiko
2026-09-26 15:49 ` [PATCH net v4 06/15] net: stmmac: leave the datapath running for normal-size MTU changes James Hilliard
2026-09-26 15:49 ` [PATCH net v4 07/15] net: stmmac: unwind partially allocated DMA configurations James Hilliard
2026-09-30  4:51   ` netdev-bot+sashiko
2026-09-26 15:49 ` [PATCH net v4 08/15] net: stmmac: keep DMA configurations at stable addresses James Hilliard
2026-09-30  4:51   ` netdev-bot+sashiko
2026-09-26 15:49 ` [PATCH net v4 09/15] net: stmmac: track datapath and power ownership across failed reopening James Hilliard
2026-09-27 15:50   ` sashiko-bot [this message]
2026-09-30  4:51   ` netdev-bot+sashiko
2026-09-26 15:49 ` [PATCH net v4 10/15] net: stmmac: use the tracked datapath restart for XSK pool changes James Hilliard
2026-09-30  4:51   ` netdev-bot+sashiko
2026-09-26 15:49 ` [PATCH net v4 11/15] net: stmmac: restore TC offloads before restarting DMA James Hilliard
2026-09-30  4:51   ` netdev-bot+sashiko
2026-09-26 15:49 ` [PATCH net v4 12/15] xsk: allow drivers to retain DMA mappings independently of pools James Hilliard
2026-09-26 15:49 ` [PATCH net v4 13/15] net: stmmac: retain DMA memory until hardware shutdown completes James Hilliard
2026-09-27 15:50   ` sashiko-bot
2026-09-30  4:51   ` netdev-bot+sashiko
2026-09-26 15:49 ` [PATCH net v4 14/15] net: stmmac: prepare device-local DMA interrupt quiescence James Hilliard
2026-09-30  4:52   ` netdev-bot+sashiko
2026-09-26 15:49 ` [PATCH net v4 15/15] net: stmmac: retain DMA resources across MTU changes James Hilliard
2026-09-27 15:50   ` sashiko-bot
2026-09-30  4:52   ` netdev-bot+sashiko
2026-09-26 16:00 ` [PATCH net v4 00/15] net: stmmac: preserve datapath state across MTU and resume failures Maxime Chevallier

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=20260927155004.DE0A61F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=james.hilliard1@gmail.com \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=sashiko-reviews@lists.linux.dev \
    /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