Re: [PATCH net-next 2/2] net: bcmasp: Keep PHY link during WoL sleep cycle

Justin Chen
2026-04-28T23:44:36Z

On 4/28/26 3:23 PM, Andrew Lunn wrote:
> On Tue, Apr 28, 2026 at 03:08:58PM -0700, Justin Chen wrote:
>> We currently more or less restart all the HW on resume. Since we also
>> stop the PHY, it takes a while for the PHY link to be re-negotiated on
>> resume.
>
> So you are just interested in getting networking working faster. This
> is independent of WoL? Clearly, if you have WoL enabled you need to
> keep the PHY powered, but faster networking should be orthogonal to
> WoL.
>

The thought process was if we are keeping the PHY up for WoL, then
keeping the link will not cost us anything. But if WoL is disabled, then
we incur a power cost for keeping the PHY powered and PHY link up. So it
made sense to only enable this when WoL is enabled. But yes, I should
explain this in the commit message as to how WoL is related these changes.

Thanks,
Justin

>> - bcmasp_netif_deinit(dev);
>> + wake = device_may_wakeup(kdev) && intf->wolopts;
>>
>> - if (!intf->wolopts) {
>> + bcmasp_netif_deinit(dev, !wake);
>
> So given your commit message, this i don't understand. For the fast
> restarting of networking, it does not matter if WoL is enabled, or if
> the PHY is capable of waking the system.
>
> Andrew