Re: [PATCH net-next] net: phy: dp8382x: keep WOL setting across suspends
From: POPESCU Catalin
Date: Thu Mar 07 2024 - 03:30:43 EST
On 07.03.24 00:04, Andrew Lunn wrote:
> This email is not from Hexagon’s Office 365 instance. Please be careful while clicking links, opening attachments, or replying to this email.
>
>
> On Wed, Mar 06, 2024 at 06:14:46PM +0100, Catalin Popescu wrote:
>> Unlike other ethernet PHYs from TI, PHY dp83822x has WOL enabled
>> at reset.
> This is rather odd behaviour. Is this stated in the datasheet?
Yes. I've checked all TI ethernet PHYs datasheets that are supported by
linux and they all, but dp8382x, have WOL disabled by default. Hence,
dp83822.c is the only driver that forcefully disable WOL at init.
>
>> @@ -572,11 +584,17 @@ static int dp83826_config_init(struct phy_device *phydev)
>> return ret;
>> }
>>
>> + if (dp83822->wol_enabled)
>> + return 0;
>> return dp8382x_disable_wol(phydev);
>> }
>>
>> static int dp8382x_config_init(struct phy_device *phydev)
>> {
>> + struct dp83822_private *dp83822 = phydev->priv;
>> +
>> + if (dp83822->wol_enabled)
>> + return 0;
>> return dp8382x_disable_wol(phydev);
> Since it is rather odd behaviour, there might be some BIOSes which
> disable WoL. So i would not rely on it being enabled by
> default. Explicitly enable it.
I see, I'll make the change.
>
> Andrew
>
> ---
> pw-bot: cr