[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210507154624.31186614@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Fri, 7 May 2021 15:46:24 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Joakim Zhang <qiangqing.zhang@....com>,
"andrew@...n.ch" <andrew@...n.ch>
Cc: "peppe.cavallaro@...com" <peppe.cavallaro@...com>,
"alexandre.torgue@...com" <alexandre.torgue@...com>,
"joabreu@...opsys.com" <joabreu@...opsys.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"f.fainelli@...il.com" <f.fainelli@...il.com>,
"Jisheng.Zhang@...aptics.com" <Jisheng.Zhang@...aptics.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
dl-linux-imx <linux-imx@....com>
Subject: Re: [PATCH V4 net] net: stmmac: Fix MAC WoL not working if PHY does
not support WoL
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.
> https://www.spinics.net/lists/netdev/msg733531.html
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?
> > > static int stmmac_set_wol(struct net_device *dev, struct
> > > ethtool_wolinfo *wol) {
> > > + u32 support = WAKE_MAGIC | WAKE_UCAST | WAKE_MAGICSECURE |
> > > +WAKE_BCAST;
> >
> > Why this list?
>
> Please see comments from Andrew: https://lore.kernel.org/netdev/YIgBJQi1H+f2VGWf@lunn.ch/T/#m00f11a84c1c43b3b4047dffcdfce57d534565a96
> "What PHYs do implement is WAKE_MAGIC, WAKE_MAGICSEC, WAKE_UCAST, and WAKE_BCAST. So there is a clear overlap with what the MAC can do."
>
> So this list is cover all the WoL sources both PHY and STMMAC.
I don't think that's what Andrew meant, although again, I'm not 100%
sure of expected WoL semantics.
Powered by blists - more mailing lists