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

Maxime Chevallier maxime.chevallier at bootlin.com
Fri Nov 8 05:16:17 AEDT 2024


Hello Andrew,

On Thu, 7 Nov 2024 18:49:00 +0100
Andrew Lunn <andrew at lunn.ch> wrote:

> > +	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:

> > +	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


More information about the Linuxppc-dev mailing list