From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 63154207DF7 for ; Mon, 28 Jul 2025 15:46:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=78.32.30.218 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753717615; cv=none; b=eiv0D6urrNjlQWN89sG+6Y01U9sXew/GyxQZZX5GtN9yRPCPnwJtGUVliS9tHBCZdW0xLAS/KihnyW4EHnXUky6wNfnt8REfuTJqJaBkh1crzCbSsSdfFIg5COpMGrYM4k4BEGjJsuGGlfxxJD7f/8H4nNoSFtluxpnGzUfFnMg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753717615; c=relaxed/simple; bh=1Xc1lJw154L7nBbCOnDn0yGzRN+s6fzK+V81e6LhzGY=; h=In-Reply-To:References:From:To:Cc:Subject:MIME-Version: Content-Disposition:Content-Type:Message-Id:Date; b=LUTP6pnm6cqDcQy86GNkWMyyx96fSA2kltUmQSW7jW3mhPTfkeN+nM3aKBSAJyBYtQOp6KO6OH2jqVZwhD7L4la4ev6UeRInqbK+LDiuATThiZWzIEO5wVmNz6QYKG6JqIUL8S758H6UboJJRLleLmrHKsYsZA29oanqiQYfk3w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk; spf=none smtp.mailfrom=armlinux.org.uk; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b=N2FoDpuK; arc=none smtp.client-ip=78.32.30.218 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="N2FoDpuK" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Date:Sender:Message-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=uknV8kFABnbg9sOVYofqLfBmUsHtQdNpXIke2XrC9CM=; b=N2FoDpuKGup3GsZwcHFrF+b/e8 lV42d1oNydb/bGE3Gt8hd38gwNfSBWfa1UNCDmVKpGH3MJ4DtIBU71u/ZEVAKauyZgKRoOiZECdY5 koC+MFfOpjwZpLjs/63UeT2KaOIPrWhoFPwjFdhKDKRvoyEILKN7lKvOwrglno51ONom56JR3O1Bv tWaRDUWTWzBa5vhSoo9MFE3tW/QfHABjOJW0RnnRQWQQEW3DjsO1aUNZFYPbtKrNjNmYFwSH+uxFw tZcAeJWKuEjeu+iKu5fSeJYplRfD9i4nSJvWYLo3zW6q+5RUz1uUVUoYKnyOzYR0ETjQupZJctVRH cm4c63uQ==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:40936 helo=rmk-PC.armlinux.org.uk) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1ugQ3q-0000VP-1T; Mon, 28 Jul 2025 16:46:46 +0100 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1ugQ38-006KDX-RT; Mon, 28 Jul 2025 16:46:02 +0100 In-Reply-To: References: From: "Russell King (Oracle)" To: Andrew Lunn , Heiner Kallweit Cc: Alexandre Torgue , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, Maxime Coquelin , netdev@vger.kernel.org, Paolo Abeni Subject: [PATCH RFC net-next 7/7] net: stmmac: explain the phylink_speed_down() call in stmmac_release() Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" Message-Id: Sender: Russell King Date: Mon, 28 Jul 2025 16:46:02 +0100 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) --- 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); + /* Stop and disconnect the PHY */ phylink_stop(priv->phylink); phylink_disconnect_phy(priv->phylink); -- 2.30.2