]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
net: stmmac: Fix unbalanced IRQ wake disable warning on single irq case
authorNĂ­colas F. R. A. Prado <nfraprado@collabora.com>
Fri, 1 Nov 2024 21:17:29 +0000 (17:17 -0400)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 7 Nov 2024 09:04:13 +0000 (10:04 +0100)
Commit a23aa0404218 ("net: stmmac: ethtool: Fixed calltrace caused by
unbalanced disable_irq_wake calls") introduced checks to prevent
unbalanced enable and disable IRQ wake calls. However it only
initialized the auxiliary variable on one of the paths,
stmmac_request_irq_multi_msi(), missing the other,
stmmac_request_irq_single().

Add the same initialization on stmmac_request_irq_single() to prevent
"Unbalanced IRQ <x> wake disable" warnings from being printed the first
time disable_irq_wake() is called on platforms that run on that code
path.

Fixes: a23aa0404218 ("net: stmmac: ethtool: Fixed calltrace caused by unbalanced disable_irq_wake calls")
Signed-off-by: NĂ­colas F. R. A. Prado <nfraprado@collabora.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20241101-stmmac-unbalanced-wake-single-fix-v1-1-5952524c97f0@collabora.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c

index 208dbc68aaf9d4a650f167a76d1ef223d5eb6aec..7bf275f127c9d750418db8b4fdb6e650a53dc644 100644 (file)
@@ -3780,6 +3780,7 @@ static int stmmac_request_irq_single(struct net_device *dev)
        /* Request the Wake IRQ in case of another line
         * is used for WoL
         */
+       priv->wol_irq_disabled = true;
        if (priv->wol_irq > 0 && priv->wol_irq != dev->irq) {
                ret = request_irq(priv->wol_irq, stmmac_interrupt,
                                  IRQF_SHARED, dev->name, dev);