Subject: Re: [PATCH V4 net] net: stmmac: Fix MAC WoL not working if PHY does not support WoL

From: Jisheng Zhang <[email-masked]>
Date: Sat, 8 May 2021 17:05:29 +0800

On Fri, 7 May 2021 15:46:24 -0700 Jakub Kicinski wrote:

> 
> 
> On Fri, 7 May 2021 10:59:12 +0000 Joakim Zhang wrote:
> > > On Thu,  6 May 2021 13:06:58 +0800 Joakim Zhang wrote:  
> > > > Both get and set WoL will check device_can_wakeup(), if MAC supports
> > > > PMT, it will set device wakeup capability. After commit 1d8e5b0f3f2c ("net:
> > > > stmmac: Support WOL with phy"), device wakeup capability will be
> > > > overwrite in stmmac_init_phy() according to phy's Wol feature. If phy
> > > > doesn't support WoL, then MAC will lose wakeup capability.  
> > >
> > > Let's take a step back. Can we get a minimal fix for losing the config in
> > > stmmac_init_phy(), and then extend the support for WoL for devices which do
> > > support wake up themselves?  
> >
> > Sure, please review the V1, I think this is a minimal fix, then we
> > can extend this as a new feature.

I lost the v1 patch in my email inbox, but I found it by searching it in
web and reviewed v1. If going this way(a minimal fix then make improvements
in net-next) feel free to add below reviewed-by tag for the v1 patch:

Reviewed-by: Jisheng Zhang <[email-masked]>

> 
> Something like that, yes (you can pull the get_wol call into the same
> if block).
> 
> Andrew, would that be acceptable to you? As limited as the either/or
> approach is it should not break any existing users, and the fix needs
> to go to longterm 5.10. We could make the improvements in net-next?
>