net: axienet: fix TX queue handling around a DMA error reset
Get series with b4
b4 am [email protected]Versions newest first
- v2 Latest4 patches 1 replyIn review
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | net: axienet: start the TX queue in axienet_open()drivers/ | +5 | 0 replies | |
| 2/4 | net: axienet: quiesce the TX path before axienet_stop() tears it downdrivers/ | +8 | 0 replies | |
| 3/4 | net: axienet: quiesce the TX queue across a DMA error resetdrivers/ | +12 | 0 replies | |
| 4/4 | net: axienet: reprogram the link settings after a DMA error resetdrivers/ | +8 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH net v2 0/4] net: axienet: fix TX queue handling around a DMA error reset
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/[email protected]/
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
Signature · 1 line
2.47.0