Re: [PATCH net-next] net: phy: add wol config options in phy device

From: Andrew Lunn
Date: Sun May 05 2024 - 21:29:03 EST


> One quick question.
> some of the options (ex. WAKE_PHY, WAKE_MAGIC etc) support on PHY and other
> options (ex. WAKE_UCAST, WAKE_MAGICSECURE etc) on MAC of Ethernet device.
>
> Suppose, user configure the combination (i.e. wol gu) option,
> Is PHY flag should hold combination option or only PHY supported option ?

I don't think it actually matters. The user is going to end up
invoking the PHY set wol. The PHY will setup what it can. On resume
you are going to call the PHYs set wol function again. It should do
the same as it did the first time. So if the PHY ignored WAKE_UCAST
and WAKE_MAGICSECURE the first time, it should also ignore them the
second time.

> Ok. I will change.
> May be in phy_init_hw( ) function is better place to re-config the WOL

You should first answer Russell question. It could be a totally
different scheme might come of of the discussion with Russell.

Andrew