Re: [PATCH net-next 2/3] net: phy: broadcom: Add support for Wake-on-LAN

From: Florian Fainelli
Date: Mon May 08 2023 - 15:12:11 EST


On 5/8/23 12:09, Andrew Lunn wrote:
Because the Wake-on-LAN configuration can be set long before the system
is actually put to sleep, we cannot have an interrupt service routine to
clear on read the interrupt status register and ensure that new packet
matches will be detected.

Hi Florian

I assume the interrupt is active low, not an edge. And it will remain
active until it is cleared? So on resume, don't you need to clear it?
Otherwise it is already active when entering the next suspend/resume
cycle.

The interrupt is indeed a level low driven interrupt. The interrupt is acknowledged by reading the WOL_INT_STATUS during bcm54xx_config_init() which executes during ->probe() and ->resume() and which is a clear on read register, this is also necessary to charge the device with the wake-up event.
--
Florian