From: Nicolai Buchwitz <nb@tipi-net.de>
To: "Théo Lebrun" <theo.lebrun@bootlin.com>
Cc: Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Conor Dooley <conor.dooley@microchip.com>,
Sergio Prado <sergio.prado@e-labworks.com>,
netdev@vger.kernel.org, Dom Cobley <popcornmix@gmail.com>
Subject: Re: [PATCH net] net: macb: don't disable an IRQ wake that was never enabled
Date: Tue, 24 Nov 2026 07:12:49 +0100 [thread overview]
Message-ID: <36b47d8ba8e6c52ac3ccdeea0f057e06@tipi-net.de> (raw)
In-Reply-To: <DN2R8R6SGV27.DU4IEVFTHBC0@bootlin.com>
Hi Théo
On 23.11.2026 18:09, Théo Lebrun wrote:
> Hello Nicolai & Dom,
>
> On Mon Nov 23, 2026 at 4:38 PM CET, Nicolai Buchwitz wrote:
>> @@ -6589,7 +6590,11 @@ static int __maybe_unused macb_suspend(struct
>> device *dev)
>> }
>> spin_unlock_irqrestore(&bp->lock, flags);
>>
>> - enable_irq_wake(bp->queues[0].irq);
>> + err = enable_irq_wake(bp->queues[0].irq);
>> + if (err)
>> + netdev_warn(netdev, "Unable to enable IRQ %d as a wake source
>> (error %d)\n",
>> + bp->queues[0].irq, err);
>> + bp->pm_data.irq_wake_enabled = !err;
>> }
>
> Your error handling is surprising to me: if we get asked to be a wakeup
> source and fail doing so, we should refuse and error out. This will in
> turn abort the system-wide suspend.
>
> The risk is that we might be the only wakeup source. We'd sleep for a
> really long time.
Agreed. This also would match the WAKE_ARP check, which already aborts
suspend. We could arm the IRQ before touching the hardware and return
the
error, so the flag goes away too?
>
> What's the behavior on the platform you noticed the issue? I can think
> of two reasons that still make it work:
> - you have another wakeup source or
Yes, the bootloader / rtc alarm / power button. The GIC is off as it is
on
rp1 too, which is in reset I guess. This makes WoL IMHO impoissible.
> - some other interrupt (PCI related) is your wakeup path.
>
> In my mind, we should instead propagate the enable_irq_wake() error in
> macb_suspend().
>
> To go even further, we could move the enable_irq_wake() into
> macb_set_wol() to report early to userspace that WoL isn't supported.
There is another downstream patch I plan to upstream, which sets
MACB_CAPS_NO_WOL
for rp1. As this in kinda feature I planned for net-next and just fix
the bug in net
>
> Lastly, if this is indeed a PCI related topic, then we need to
> special-case the enable_irq_wake() call. From my LLM report, many PCI
> MAC drivers only call device_set_wakeup_enable() at the set_wol
> request. Then everything is handled at the bus level at suspend: a
> pci_enable_wake() call made if the device is on the wakeup path.
macb is a platform device behind rp1, which is a mfd. PCIe is down in S3
anyway?
> [...]
Thanks,
Nicolai
next prev parent reply other threads:[~2026-11-24 6:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-23 15:38 [PATCH net] net: macb: don't disable an IRQ wake that was never enabled Nicolai Buchwitz
2026-11-23 17:09 ` Théo Lebrun
2026-11-24 6:12 ` Nicolai Buchwitz [this message]
2026-11-24 10:20 ` Théo Lebrun
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=36b47d8ba8e6c52ac3ccdeea0f057e06@tipi-net.de \
--to=nb@tipi-net.de \
--cc=andrew+netdev@lunn.ch \
--cc=conor.dooley@microchip.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=popcornmix@gmail.com \
--cc=sergio.prado@e-labworks.com \
--cc=theo.lebrun@bootlin.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.