[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <eaef1b1b-5366-430c-97dd-cf3b40399ac7@lunn.ch>
Date: Mon, 28 Jul 2025 19:28:01 +0200
From: Andrew Lunn <andrew@...n.ch>
To: "Russell King (Oracle)" <rmk+kernel@...linux.org.uk>
Cc: Heiner Kallweit <hkallweit1@...il.com>,
Alexandre Torgue <alexandre.torgue@...s.st.com>,
Andrew Lunn <andrew+netdev@...n.ch>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
linux-arm-kernel@...ts.infradead.org,
linux-stm32@...md-mailman.stormreply.com,
Maxime Coquelin <mcoquelin.stm32@...il.com>, netdev@...r.kernel.org,
Paolo Abeni <pabeni@...hat.com>
Subject: Re: [PATCH RFC net-next 6/7] net: stmmac: add helpers to indicate
WoL enable status
> +static inline bool stmmac_wol_enabled_mac(struct stmmac_priv *priv)
> +{
> + return priv->plat->pmt && device_may_wakeup(priv->device);
> +}
> +
> +static inline bool stmmac_wol_enabled_phy(struct stmmac_priv *priv)
> +{
> + return !priv->plat->pmt && device_may_wakeup(priv->device);
> +}
I agree this is a direct translation into a helper.
Reviewed-by: Andrew Lunn <andrew@...n.ch>
I'm guessing at some point you want to change these two
helpers. e.g. at some point, you want to try getting the PHY to do the
WoL, independent of !priv->plat->pmt?
> - if (device_may_wakeup(priv->device) && !priv->plat->pmt)
> + if (stmmac_wol_enabled_phy(priv))
> phylink_speed_down(priv->phylink, false);
This might be related to the next patch. But why only do speed down
when PHY is doing WoL? If the MAC is doing WoL, you could also do a
speed_down.
Andrew
Powered by blists - more mailing lists