Re: [PATCH net-next v2 2/2] net: stmmac: dwmac-motorcomm: support Wake-on-LAN from S5
From: Magnus Leatti
Date: Tue Nov 24 2026 - 08:18:45 EST
On Tue, Nov 24, 2026 at 10:57:46AM +0000, netdev-bot+sashiko@xxxxxxxxxx wrote:
> [Severity: Medium]
> Can wake become stale between rtnl_unlock() and stmmac_dvr_remove()?
Yes. unregister_netdev() takes RTNL, so I can't hold it across remove.
And power/wakeup doesn't take RTNL anyway. Worst case: someone disables
WoL *during* power-off and it stays armed.
> [Severity: Medium]
> What happens here on boards whose eFuse holds no MAC address?
I don't know, and I can't test it: my board has the eFuse programmed.
Probe already warns about the random MAC on those boards.
> [Severity: Low]
> Is it safe to change WOL_CTRL immediately after motorcomm_reset(), with no
> delay?
[...]
> On some boards that post-reset load might write WOL_CTRL, for example
> through an eFuse patch entry. Could it then overwrite WOL_CTRL_PKT_EN, so
> the device powers off with packet wake disabled?
That's a guess. The delay in probe is for the eFuse reads, and the
write sticks here: without that bit the chip doesn't wake, and it woke
9 of 9.
Magnus