[PATCH RFC net-next 5/7] net: stmmac: use core wake IRQ support
Andrew Lunn
andrew at lunn.ch
Mon Jul 28 10:12:08 PDT 2025
> - if (wol->wolopts) {
> - device_set_wakeup_enable(priv->device, 1);
> - /* Avoid unbalanced enable_irq_wake calls */
> - if (priv->wol_irq_disabled)
> - enable_irq_wake(priv->wol_irq);
> - priv->wol_irq_disabled = false;
> - } else {
> - device_set_wakeup_enable(priv->device, 0);
> - /* Avoid unbalanced disable_irq_wake calls */
> - if (!priv->wol_irq_disabled)
> - disable_irq_wake(priv->wol_irq);
> - priv->wol_irq_disabled = true;
> - }
> + device_set_wakeup_enable(priv->device, !!wol->wolopts);
It might be worth mentioning in the commit message that
device_set_wakeup_enable() does not care about unbalanced calls to
enable/disable. This obviously caused issues in the past with
enable_irq_wake()/disable_irq_wake().
Andrew
More information about the linux-arm-kernel
mailing list