mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-05 21:44:23 -04:00
net: stmmac: explain the phylink_speed_down() call in stmmac_release()
The call to phylink_speed_down() looks odd on the face of it. Add a comment to explain why this call is there. phylink_speed_up() is always called in __stmmac_open(), and already has a comment. Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Link: https://patch.msgid.link/E1umsfV-008vKv-1O@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
committed by
Jakub Kicinski
parent
6a9a6ce962
commit
5e5b39aa6f
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user