From: Sagi Maimon <maimon.sagi@gmail.com>
To: netdev@vger.kernel.org
Cc: radhey.shyam.pandey@amd.com, michal.simek@amd.com,
andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, linux@armlinux.org.uk,
daniel@iogearbox.net, andybnac@gmail.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, Sagi Maimon <maimon.sagi@gmail.com>
Subject: [PATCH net v2 0/4] net: axienet: fix TX queue handling around a DMA error reset
Date: Thu, 24 Sep 2026 16:51:12 +0300 [thread overview]
Message-ID: <20260924135116.185161-1-maimon.sagi@gmail.com> (raw)
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/
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
next reply other threads:[~2026-09-24 13:51 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-24 13:51 Sagi Maimon [this message]
2026-09-24 13:51 ` [PATCH net v2 1/4] net: axienet: start the TX queue in axienet_open() Sagi Maimon
2026-09-24 13:51 ` [PATCH net v2 2/4] net: axienet: quiesce the TX path before axienet_stop() tears it down Sagi Maimon
2026-09-24 13:51 ` [PATCH net v2 3/4] net: axienet: quiesce the TX queue across a DMA error reset Sagi Maimon
2026-09-24 13:51 ` [PATCH net v2 4/4] net: axienet: reprogram the link settings after " Sagi Maimon
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=20260924135116.185161-1-maimon.sagi@gmail.com \
--to=maimon.sagi@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=andybnac@gmail.com \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=michal.simek@amd.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=radhey.shyam.pandey@amd.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
all inboxes | Powered by JetHome®