[PATCH net v2 0/2] net: stmmac: fix failed MTU reopening and hardware resume
James Hilliard
james.hilliard1 at gmail.com
Tue Sep 22 16:27:39 PDT 2026
Keep the stmmac datapath coherent after failed MTU reopening or hardware
resume without changing the interface's administrative state. An ordinary
down/up must release the resources still owned and open a fresh datapath,
without disabling NAPI twice or releasing already-freed allocations.
The phylink prerequisite permits an ordinary close to terminate a
suspended instance directly. Resuming phylink solely to stop it would
reconfigure and restart a MAC which has not successfully resumed.
The stmmac fix tracks running, suspended-with-resources and released
datapaths separately from IFF_UP. A failed interface stays detached until
successful resume or administrative recovery. XDP, AF_XDP and debugfs
paths which are not excluded by detach also respect resource ownership.
Signed-off-by: James Hilliard <james.hilliard1 at gmail.com>
---
Changes in v2:
- Drop forced netif_close() and retain the interface's administrative state,
as requested by Maxime Chevallier.
- Separate queue quiescence from resource release and use explicit datapath
state instead of a napi_disabled argument to the release helper.
- Handle repeated suspend/resume after failure, preserve PHY/PM ownership
until ordinary close, and allow a fresh down/up recovery.
- Check XDP/AF_XDP cleanup, descriptor readback and asynchronous reset work
while the netdev is administratively up but unavailable.
- Explain the generic phylink suspend-to-stop transition and why restarting
phylink after a failed MAC resume is not a valid substitute, in response
to Andrew Lunn.
- Combine the two stmmac error-path fixes so every user of the new state
has consistent resource and NAPI lifetime handling in one patch.
- Link to v1: https://patch.msgid.link/20260921-submit-stmmac-reset-fixes-v1-v1-0-87a4e431ee00@gmail.com
---
James Hilliard (2):
net: phylink: allow stopping a suspended instance
net: stmmac: keep datapath state coherent after reinitialization failure
drivers/net/ethernet/stmicro/stmmac/stmmac.h | 11 ++
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 116 ++++++++++++++++------
drivers/net/ethernet/stmicro/stmmac/stmmac_xdp.c | 8 +-
drivers/net/phy/phylink.c | 17 ++++
4 files changed, 120 insertions(+), 32 deletions(-)
---
base-commit: 17741334d00bf5ebd37f8c1c36bc9c146a351deb
change-id: 20260921-submit-stmmac-reset-fixes-v1-7c98b92d29a9
Best regards,
--
James Hilliard <james.hilliard1 at gmail.com>
More information about the linux-arm-kernel
mailing list