From: Florian Fainelli <florian.fainelli@broadcom.com>
To: Andrew Lunn <andrew@lunn.ch>,
"Russell King (Oracle)" <linux@armlinux.org.uk>
Cc: Gatien CHEVALLIER <gatien.chevallier@foss.st.com>,
Krzysztof Kozlowski <krzk@kernel.org>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Christophe Roullier <christophe.roullier@foss.st.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
Simon Horman <horms@kernel.org>,
Tristram Ha <Tristram.Ha@microchip.com>,
netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 1/4] dt-bindings: net: document st,phy-wol property
Date: Wed, 23 Jul 2025 11:13:28 -0700 [thread overview]
Message-ID: <69711c9c-b85b-4cd4-a5fe-2719b8e30438@broadcom.com> (raw)
In-Reply-To: <9f00a6cf-c441-4b4c-84ca-5c41e6f0a9d9@lunn.ch>
On 7/23/25 07:23, Andrew Lunn wrote:
>> We can't retrofit such detection into PHY drivers - if we do so, we'll
>> break WoL on lots of boards (we'd need to e.g. describe PMEB in DT for
>> RTL8211F PHYs. While we can add it, if a newer kernel that expects
>> PMEB to be described to allow WoL is run with an older DT, then that
>> will be a regression.) Thus, I don't see how we could retrofit PHY
>> WoL support detection to MAC drivers.
>
> WoL is a mess. I wounder on how many boards it actually works
> correctly? How often is it tested?
> > I actually think this is similar to pause and EEE. Those were also a
> mess, and mostly wrongly implemented. The solution to that was to take
> as much as possible out of the driver and put it into the core,
> phylink.
>
> We probably want a similar solution. The MAC driver indicates its WoL
> capabilities to phylink. The PHY driver indicates its capabilities to
> phylink. phylink implements all the business logic, and just tells the
> PHY what it should enable, and stay awake. phylink tells the MAC what
> is should enable, and that it should stay awake.
We would need both a phylib and a phylink set of helpers because not all
of the drivers need to be converted to phylink.
>
> Is this going to happen? Given Russell limited availability, i guess
> not. It needs somebody else to step up and take this on. Are we going
> to break working systems? Probably. But given how broken this is
> overall, how much should we actually care? We can just fix up systems
> as they are reported broken.
Please just refrain from making such statements, it really just does not
help, and if you have no direct hands on experience with Wake-on-LAN, it
becomes purely gratuitous. I agree that there is a lack of adequate
consistency and guidelines for developers to implement Wake-on-LAN
properly, but I don't agree with the message and the way it is
delivered. It's just completely antagonistic to people like me and my
colleagues who have spent a great deal of time implementing Wake-on-LAN
for actively used systems, and I am talking hundred of millions of STBs
deployed each of them doing hundreds of system suspend/resume involving
Wake-on-LAN per day.
>
> I also think WoL, pause and EEE is a space we should have more tests
> for. To fully test WoL and pause you need a link partner, but i
> suspect you can do some basic API tests without one. WoL you
> definitely need a link partner. So this makes testing a bit more
> difficult. But that should not stop the community from writing such
> tests and making them available for developers to use.
The tests are in premise very simple, but you need a link partner and
you need to be ideally on the same physical network and you need to have
a system that supports system wide wake-up, or if nothing else s2idle.
Then you need a secondary wake-up source like a RTC or GPIO in order to
ensure that there is an upper bound on when you timeout for not
receiving a proper wake-on-LAN trigger.
It's not clear to me what needs to be contributed to the community, but
essentially the pseudo code is something like:
- wait for DUT to boot
for each support Wake-on-LAN mode:
- configure wake-on-LAN on DUT
- snapshot /sys/*/wakeup_count for the MAC/PHY device
- enter standby with e.g.: rtcwake -s <TIMEOUT> -m mem
- send Wake-on-LAN trigger from external device
- ensure DUT woke-up before <TIMEOUT> and check that /sys/*wakeup_count
is +1 compared to the previous snapshot
--
Florian
next prev parent reply other threads:[~2025-07-23 18:13 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-21 11:14 [PATCH net-next 0/4] net: add WoL from PHY support for stm32mp135f-dk Gatien Chevallier
2025-07-21 11:14 ` [PATCH net-next 1/4] dt-bindings: net: document st,phy-wol property Gatien Chevallier
2025-07-21 11:30 ` Krzysztof Kozlowski
2025-07-21 12:10 ` Gatien CHEVALLIER
2025-07-21 12:16 ` Krzysztof Kozlowski
2025-07-21 12:54 ` Gatien CHEVALLIER
2025-07-21 13:18 ` Andrew Lunn
2025-07-21 15:56 ` Gatien CHEVALLIER
2025-07-21 17:07 ` Andrew Lunn
2025-07-21 18:08 ` Florian Fainelli
2025-07-22 9:08 ` Gatien CHEVALLIER
2025-07-22 13:40 ` Andrew Lunn
2025-07-22 20:20 ` Russell King (Oracle)
2025-07-22 20:30 ` Florian Fainelli
2025-07-22 20:59 ` Andrew Lunn
2025-07-22 21:39 ` Russell King (Oracle)
2025-07-22 22:00 ` Russell King (Oracle)
2025-07-22 22:57 ` Russell King (Oracle)
2025-07-23 14:02 ` Andrew Lunn
2025-07-23 14:23 ` Andrew Lunn
2025-07-23 18:13 ` Florian Fainelli [this message]
2025-07-23 8:50 ` Gatien CHEVALLIER
2025-07-23 8:53 ` Gatien CHEVALLIER
2025-07-23 9:25 ` Russell King (Oracle)
2025-07-23 9:20 ` Russell King (Oracle)
2025-07-23 14:35 ` Gatien CHEVALLIER
2025-07-22 9:13 ` Russell King (Oracle)
2025-07-22 7:32 ` Russell King (Oracle)
2025-07-22 9:10 ` Gatien CHEVALLIER
2025-07-21 11:14 ` [PATCH net-next 2/4] net: stmmac: stm32: add WoL from PHY support Gatien Chevallier
2025-07-21 11:14 ` [PATCH net-next 3/4] net: phy: smsc: fix and improve WoL support Gatien Chevallier
2025-07-21 11:28 ` Russell King (Oracle)
2025-07-21 12:23 ` Gatien CHEVALLIER
2025-07-21 13:26 ` Andrew Lunn
2025-07-21 14:19 ` Gatien CHEVALLIER
2025-07-21 14:23 ` Andrew Lunn
2025-07-21 11:14 ` [PATCH net-next 4/4] arm: dts: st: activate ETH1 WoL from PHY on stm32mp135f-dk Gatien Chevallier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=69711c9c-b85b-4cd4-a5fe-2719b8e30438@broadcom.com \
--to=florian.fainelli@broadcom.com \
--cc=Tristram.Ha@microchip.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=christophe.roullier@foss.st.com \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=gatien.chevallier@foss.st.com \
--cc=hkallweit1@gmail.com \
--cc=horms@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=linux@armlinux.org.uk \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome