Thread (17 messages) 17 messages, 3 authors, 2024-11-07

Re: [PATCH net-next 4/7] net: freescale: ucc_geth: Fix WOL configuration

From: Maxime Chevallier <maxime.chevallier@bootlin.com>
Date: 2024-11-07 18:16:19
Also in: linuxppc-dev, lkml

Hello Andrew,

On Thu, 7 Nov 2024 18:49:00 +0100
Andrew Lunn [off-list ref] wrote:
quoted
+	if (phydev)
+		phy_ethtool_get_wol(phydev, wol);
+
 	if (qe_alive_during_sleep())
 		wol->supported |= WAKE_MAGIC;  
So get WoL will return whatever methods the PHY supports, plus
WAKE_MAGIC is added because i assume the MAC can do that. So depending
on the PHY, it could be the full list:
quoted
+	if (wol->wolopts & WAKE_PHY)
+		ret = phy_ethtool_set_wol(phydev, wol);  
Here, the code only calls into the PHY for WAKE_PHY, when in fact the
PHY could be handling WAKE_UCAST, WAKE_MCAST, WAKE_ARP etc.

So these conditions are wrong. It could we be that X years ago when
this code was added only WAKE_PHY and WAKE_MAGIC existed?
Ah that's right indeed. So yeah my changes aren't enough, I'll go over
that patch again.

Thanks for spotting this,

Maxime
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help