Re: [PATCH net-next] net: phy: air_an8801: add WAKE_PHY Wake-on-LAN support

From: Andrew Lunn

Date: Tue Nov 03 2026 - 08:43:36 EST


On Mon, Nov 02, 2026 at 09:29:03PM +0800, Tommy Shih wrote:
> The AN8801R can wake up the system on a link change, but the driver
> only supports WAKE_MAGIC and always masks the link change event on
> suspend. Supporting WAKE_PHY allows the system to be woken up when
> the cable is plugged in or unplugged.
>
> Add WAKE_PHY support:
> - Keep the link change interrupt enabled, and only disable it on
> suspend when the PHY is set to wake up by magic packet only.
> - Report a wakeup event when a link change interrupt is seen with
> WAKE_PHY enabled.
> - Enable device wakeup when either WAKE_MAGIC or WAKE_PHY is set.

This is an interesting definition of WAKE_PHY.

Are there any other drivers which use change in link to trigger a
wake?

How are you using it? Is your device plugged into a manages switch and
you are making the managed switch down/up the link?

Is the hardware capable of waking just on link up? Is there any point
waking up if the link goes down?

Andrew