[PATCH net v2 0/4] net: axienet: fix TX queue handling around a DMA error reset
From: Sagi Maimon <hidden>
Date: 2026-09-24 13:51:23
Also in:
linux-arm-kernel, lkml
axienet_dma_err_handler() resets the DMA engine together with the MAC
and rebuilds the TX ring, but it does not coordinate with the transmit
path, and it does not leave the MAC configured the way it found it.
v1 was a single patch that woke the queue at the end of the handler.
The Sashiko review showed that this wake could be lost to a concurrent
transmit and could undo the stop that suspend installs, and it pointed
out two older problems: the handler races axienet_start_xmit() while it
tears down the ring, and the reset loses the negotiated link speed and
pause settings.
This version:
1/4 starts the TX queue in axienet_open(). Nothing does today, so a
queue stopped at close stays stopped. 2/4 depends on it.
2/4 quiesces the TX path in axienet_stop() before the ring is freed,
which the suspend path otherwise leaves racing.
3/4 quiesces the TX queue across the whole error reset and wakes it at
the end, unless the interface is stopping or detached.
4/4 has phylink reprogram the link settings after the reset.
v1 also called netif_trans_update() and said this stopped the watchdog
from refiring. No .ndo_tx_timeout is installed in this tree, so the
call and the claim are both gone.
Tested on an AXI Ethernet MAC behind a PCIe endpoint with the series
applied: traffic passes, and resumes after each of ten down/up cycles
and five module reloads, all made with traffic running, with nothing
logged. Suspend, a down/up cycle with the queue stopped by a full ring,
and the DMA error path were not exercised.
v1 omitted the Assisted-by: tag; v2 adds it.
v1: https://lore.kernel.org/netdev/20260917121306.23499-1-maimon.sagi@gmail.com/ (local)
Sagi Maimon (4):
net: axienet: start the TX queue in axienet_open()
net: axienet: quiesce the TX path before axienet_stop() tears it down
net: axienet: quiesce the TX queue across a DMA error reset
net: axienet: reprogram the link settings after a DMA error reset
.../net/ethernet/xilinx/xilinx_axienet_main.c | 32 +++++++++++++++++++
1 file changed, 32 insertions(+)
base-commit: 879e280b8486d4612ad1aa050d6fada2dd80cf1c
--
2.47.0