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>
        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);