From: Magnus Leatti <magnusleatti@kernelriot.com>
To: me@ziyao.cc, Maxime Chevallier <maxime.chevallier@bootlin.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Giuseppe Nespolino <g.nespolino@gmail.com>,
netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: [PATCH net-next 0/2] net: stmmac: dwmac-motorcomm: shutdown hook and Wake-on-LAN from S5
Date: Mon, 16 Nov 2026 06:17:55 -0300 [thread overview]
Message-ID: <20261116091757.1656602-1-magnusleatti@kernelriot.com> (raw)
The YT6801 accepts "ethtool -s eth0 wol g" today and then ignores magic
packets once the system is powered off. This series makes S5
Wake-on-LAN work. Both patches touch only the glue.
Patch 1 adds a shutdown hook that stops the device. The glue has none,
so the MAC and DMA keep running into reboot and kexec.
Patch 2 arms the chip when powering off with Wake-on-LAN set. The
sequence follows the vendor driver, with two differences that come
from measurements on the test board:
- The function stays in D0 instead of D3hot. With MAC Wake-on-LAN
phylib keeps polling the PHY until power is removed, and in D3hot
that poll fails with -EBUSY and warns from phy_error_precise(). It
happened 111 ms after D3hot on a normal power-off.
- Bit 9 of LPW_CTRL is not set. The chip wakes without it.
Every write that is left was removed once to see what it does: without
OOB WoL or the packet wake bit there is no wake. Without the MAC
address rewrite, or without the 2 ms wait before it, the chip wakes on
the factory address only.
Tested on a Celeron N3350 mini PC, net-next at 6964ff21c5d8:
net-next wol g no wake, 3 of 3
patched wol g wake, 8 of 8
patched wol u wake on unicast, 1 of 1
patched wol d no wake, 3 of 3
patched wol g, interface down no wake, 1 of 1
patched wol g, power/wakeup disabled no wake, 1 of 1
patched wol g, reboot reboots, link back, 3 of 3
A second board, a PSJ8500-N97 mini PC (Intel N97), behaves the same.
This series does S5 only, on purpose. S5 wake is the important case
and it is not implemented. The change for it is small and stays in the
glue. Wake from suspend and hibernation has a larger blast radius.
Giuseppe, this is the OOB WoL enable you and Yao discussed in the
s2idle thread [1]: it is only enabled when powering off, because only
a chip reset disables it again. If you can try "wol g" and a power-off
on the Slimbook, a laptop would be a good third board.
[1] https://lore.kernel.org/netdev/apSDPwF49Z1Zd0kJ@pie/
Magnus Leatti (2):
net: stmmac: dwmac-motorcomm: quiesce the device at shutdown
net: stmmac: dwmac-motorcomm: support Wake-on-LAN from S5
.../ethernet/stmicro/stmmac/dwmac-motorcomm.c | 84 +++++++++++++++++++
1 file changed, 84 insertions(+)
base-commit: 6964ff21c5d8b75649211a52dbfd92753e605649
--
2.56.1
next reply other threads:[~2026-11-16 9:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 9:17 Magnus Leatti [this message]
2026-11-16 9:17 ` [PATCH net-next 1/2] net: stmmac: dwmac-motorcomm: quiesce the device at shutdown Magnus Leatti
2026-11-16 14:33 ` Yao Zi
2026-11-16 9:17 ` [PATCH net-next 2/2] net: stmmac: dwmac-motorcomm: support Wake-on-LAN from S5 Magnus Leatti
2026-11-16 11:23 ` [PATCH net-next 0/2] net: stmmac: dwmac-motorcomm: shutdown hook and " Giuseppe Nespolino
2026-11-16 11:36 ` Magnus Leatti
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=20261116091757.1656602-1-magnusleatti@kernelriot.com \
--to=magnusleatti@kernelriot.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=g.nespolino@gmail.com \
--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=maxime.chevallier@bootlin.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=me@ziyao.cc \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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