From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (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 756FE1C862C for ; Mon, 28 Jul 2025 17:29:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=156.67.10.101 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753723763; cv=none; b=S5gY3Hy8DCoL+A+/3sl5m9n3FpBXeksKJ5DP2fH2Miau6m2+dR/jLPMaST8ssbusnzI7KKaFNm8+Xlkz0XrBh3u7Z/1kC77Qd6pqSMghZXTGlKw6Kb0+Hh2aY4uPhIChTE+eCmMSbzTh8iV8BlSjo46MZhYLWOA4weA8j+GgfX8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753723763; c=relaxed/simple; bh=L5k+zygNmtIePA0hUeGUBw/IT0KXoABdFCmrGqaC25I=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=PTCifN+4C7O/I3elEMmIIqOnCoAVGCwC6EwSiPX81b7IGsAU+7ld8jt0nw4+GiLk44XzTsyJ75EShIiNvaP74ADmjJKdoormW3fCk8Cl0Qiw0fjoDN2ofGICPIgTghyQAG3JAbczuDn2U60dWnhSNIi7FplA7oi+sYvdTIYXeXw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b=YuYfw3ry; arc=none smtp.client-ip=156.67.10.101 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.b="YuYfw3ry" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=FNke7P0p2MkmqnbIedx8TUmpEi+fJFfmn41mD4GRN0c=; b=YuYfw3ryZeHrVLS46MwEIEeXRB eGP0ZB10wUTlicKTx0DfFocl/rtx4e4M9HQwCozwkytb2fEU/Omk+u0bj2jZGnwlOl/ZOVac/VJLc WwoIRheN+7Cw9GpQD+HJCcFEbqKlL+SD+UR18iY6U2i02wWRKoZJmCeAPVOvBbJjvbZ4=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1ugRev-0037SU-IO; Mon, 28 Jul 2025 19:29:09 +0200 Date: Mon, 28 Jul 2025 19:29:09 +0200 From: Andrew Lunn To: "Russell King (Oracle)" Cc: Heiner Kallweit , 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: Re: [PATCH RFC net-next 7/7] net: stmmac: explain the phylink_speed_down() call in stmmac_release() Message-ID: References: Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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) > --- > 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