From: Andrew Lunn <andrew@lunn.ch>
To: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
Cc: Heiner Kallweit <hkallweit1@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>,
linux-arm-kernel@lists.infradead.org,
linux-stm32@st-md-mailman.stormreply.com,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
netdev@vger.kernel.org, Paolo Abeni <pabeni@redhat.com>
Subject: Re: [PATCH RFC net-next 7/7] net: stmmac: explain the phylink_speed_down() call in stmmac_release()
Date: Mon, 28 Jul 2025 19:29:09 +0200 [thread overview]
Message-ID: <b612eaee-17f2-4cab-bc37-a1cb9560ffe1@lunn.ch> (raw)
In-Reply-To: <E1ugQ38-006KDX-RT@rmk-PC.armlinux.org.uk>
On Mon, Jul 28, 2025 at 04:46:02PM +0100, Russell King (Oracle) wrote:
> The call to phylink_speed_down() looks odd on the face of it. Add a
> comment to explain why this call is there.
>
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> ---
> drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index f44f8b1b0efa..0da5c29b8cb0 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -4138,8 +4138,13 @@ static int stmmac_release(struct net_device *dev)
> struct stmmac_priv *priv = netdev_priv(dev);
> u32 chan;
>
> + /* If the PHY or MAC has WoL enabled, then the PHY will not be
> + * suspended when phylink_stop() is called below. Set the PHY
> + * to its slowest speed to save power.
> + */
> if (device_may_wakeup(priv->device))
> phylink_speed_down(priv->phylink, false);
> +
Is there a corresponding phylink_speed_up() somewhere else? Does that
need a similar comment?
Andrew
next prev parent reply other threads:[~2025-07-28 17:29 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-28 15:45 [PATCH RFC net-next 0/7] net: stmmac: EEE and WoL cleanups Russell King (Oracle)
2025-07-28 15:45 ` [PATCH RFC net-next 1/7] net: stmmac: remove unnecessary checks in ethtool eee ops Russell King (Oracle)
2025-07-28 17:03 ` Andrew Lunn
2025-07-28 15:45 ` [PATCH RFC net-next 2/7] net: stmmac: remove write-only mac->pmt Russell King (Oracle)
2025-07-28 17:04 ` Andrew Lunn
2025-07-28 15:45 ` [PATCH RFC net-next 3/7] net: stmmac: remove redundant WoL option validation Russell King (Oracle)
2025-07-28 17:06 ` Andrew Lunn
2025-07-28 15:45 ` [PATCH RFC net-next 4/7] net: stmmac: remove unnecessary "stmmac: wakeup enable" print Russell King (Oracle)
2025-07-28 17:06 ` Andrew Lunn
2025-07-28 15:45 ` [PATCH RFC net-next 5/7] net: stmmac: use core wake IRQ support Russell King (Oracle)
2025-07-28 17:12 ` Andrew Lunn
2025-07-28 15:45 ` [PATCH RFC net-next 6/7] net: stmmac: add helpers to indicate WoL enable status Russell King (Oracle)
2025-07-28 17:28 ` Andrew Lunn
2025-07-28 17:54 ` Russell King (Oracle)
2025-07-29 8:43 ` [Linux-stm32] " Gatien CHEVALLIER
2025-07-29 9:03 ` Russell King (Oracle)
2025-07-29 9:14 ` Russell King (Oracle)
2025-07-29 15:31 ` Russell King (Oracle)
2025-07-29 12:45 ` Russell King (Oracle)
2025-07-29 13:10 ` Gatien CHEVALLIER
2025-07-29 14:44 ` Russell King (Oracle)
2025-07-29 15:34 ` Gatien CHEVALLIER
2025-07-29 16:35 ` Russell King (Oracle)
2025-07-29 17:27 ` Andrew Lunn
2025-07-29 18:19 ` Russell King (Oracle)
2025-07-29 22:01 ` Florian Fainelli
2025-07-28 15:46 ` [PATCH RFC net-next 7/7] net: stmmac: explain the phylink_speed_down() call in stmmac_release() Russell King (Oracle)
2025-07-28 17:19 ` Andrew Lunn
2025-07-28 17:29 ` Andrew Lunn [this message]
2025-07-29 8:47 ` Russell King (Oracle)
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=b612eaee-17f2-4cab-bc37-a1cb9560ffe1@lunn.ch \
--to=andrew@lunn.ch \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rmk+kernel@armlinux.org.uk \
/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;
as well as URLs for NNTP newsgroup(s).