Subject: Re: [PATCH net] net: phy: reconfigure PHY WOL in resume if WOL option still enabled

From: Andrew Lunn <[email-masked]>
Date: Thu, 8 Jul 2021 03:23:37 +0200

On Thu, Jul 08, 2021 at 08:42:53AM +0800, [email-masked] wrote:
> From: Mohammad Athari Bin Ismail <[email-masked]>
> 
> When the PHY wakes up from suspend through WOL event, there is a need to
> reconfigure the WOL if the WOL option still enabled. The main operation
> is to clear the WOL event status. So that, subsequent WOL event can be
> triggered properly.
> 
> This fix is needed especially for the PHY that operates in PHY_POLL mode
> where there is no handler (such as interrupt handler) available to clear
> the WOL event status.

I still think this architecture is wrong.

The interrupt pin is wired to the PMIC. Can the PMIC be modelled as an
interrupt controller? That would allow the interrupt to be handled as
normal, and would mean you don't need polling, and you don't need this
hack.

	Andrew