Thread (14 messages) 14 messages, 4 authors, 2025-03-06

Re: [PATCH RFC net-next 3/5] net: stmmac: simplify phylink_suspend() and phylink_resume() calls

flat view

From: Russell King (Oracle) <linux@armlinux.org.uk>
Date: 2025-02-27 19:41:24
Also in: netdev

On Thu, Feb 27, 2025 at 05:45:35PM +0100, Andrew Lunn wrote:
quoted
@@ -7927,13 +7925,9 @@ int stmmac_resume(struct device *dev)
 	}
 
 	rtnl_lock();
-	if (device_may_wakeup(priv->device) && priv->plat->pmt) {
-		phylink_resume(priv->phylink);
-	} else {
-		phylink_resume(priv->phylink);
-		if (device_may_wakeup(priv->device))
-			phylink_speed_up(priv->phylink);
-	}
+	phylink_resume(priv->phylink);
+	if (device_may_wakeup(priv->device) && !priv->plat->pmt)
+		phylink_speed_up(priv->phylink);
 	rtnl_unlock();
 
 	rtnl_lock();
Unrelated to this patch, but unlock() followed by lock()? Seems like
some more code which could be cleaned up?
Indeed, this vanishes in the next patch due to phylink_resume()
moving later.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help