Re: [PATCH net V2 2/2] net: lan743x: support WOL in MAC even when PHY does not

From: Andrew Lunn
Date: Thu Apr 25 2024 - 10:14:06 EST


> If PHY handles the magic packet or phy activity (i.e. WAKE_MAGIC or WAKE_PHY), our PCI11x1x's MAC will handle only interrupt (MDINT from PHY). Not MAC's magic packet.
> In this case do we really call phy_speed_down( ) ?

phy_speed_down() is orthogonal to who does the wake. Packets are
packets. phy_speed_down() does not change that. All it does it drop
the link to a slower speed. And slower speed means less power
consumption. A PHY operating at 10Mbps uses about 1W less power than a
PHY operating at 1G. The numbers will depend on the PHY, but you get
the idea. Plus the link peer will also save a similar amount out
power....

If the MAC is needed for WoL, because the PHY does not support the
needed modes, you probably also save power with the MAC running at
10Mbps. Its clocks probably tick slower, etc.

But there is a trade off. When resuming, you want to go back to the
full speed link. And that takes time, a little over 1 second. So you
need to decide, do you want to prioritise minimum power consumption
when suspended, or fast resume?

Andrew