From: Basavaraj Natikar <Basavaraj.Natikar@amd.com>
To: Andreas Noever <andreas.noever@gmail.com>,
Mika Westerberg <westeri@kernel.org>,
Yehezkel Bernat <YehezkelShB@gmail.com>,
"Jonathan Corbet" <corbet@lwn.net>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
"Jakub Kicinski" <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>
Cc: <linux-usb@vger.kernel.org>, <linux-doc@vger.kernel.org>,
"Mario Limonciello" <Mario.Limonciello@amd.com>,
Sanath S <Sanath.S@amd.com>,
Basavaraj Natikar <Basavaraj.Natikar@amd.com>
Subject: [PATCH -next v2 0/3] thunderbolt: Reset affected AMD host interfaces before DMA HopID reuse
Date: Mon, 5 Oct 2026 22:17:15 +0530 [thread overview]
Message-ID: <20261005164718.4166200-1-Basavaraj.Natikar@amd.com> (raw)
Some AMD USB4 host routers hang a TX ring when a DMA HopID is reused
after a DMA path is torn down without a host interface reset in between.
Resetting on every teardown clears the state but also disrupts other active
DMA tunnels on the same host interface.
Track the TX and RX DMA HopIDs programmed since the last reset and prefer
unused HopIDs when allocating rings. Check reuse at tb_ring_start()
as well,
since networking retains its rings across reconnect, and return -EAGAIN
instead of reprogramming a HopID that still needs a reset. Run the reset
from a per-NHI work item once all DMA rings are idle, serialized with the
connection manager and with the control channel stopped only over
the reset.
Enable it only for the affected AMD routers via QUIRK_RESET_DMA_ON_REUSE,
and only on v1 host interfaces.
On -EAGAIN networking retries login asynchronously; stream and DMA-test
users retry the operation. An active tunnel is left running even if it
blocks another tunnel from starting until it stops.
Changes in v2:
- Rebase onto thunderbolt/next at a93a8e320000.
- Keep generic NHI code bus-independent by using the existing
reset_interface operation.
- Replace the existing immediate reset-on-teardown path in
thunderbolt/next with deferred reset-on-reuse handling.
Basavaraj Natikar (3):
thunderbolt: Allow tb_ring_start() to fail
thunderbolt: Reset the host interface before reusing a DMA HopID
thunderbolt: Add quirk to reset host interface for AMD USB4 routers
Documentation/admin-guide/thunderbolt.rst | 6 +
drivers/net/thunderbolt/main.c | 120 ++++++++----
drivers/thunderbolt/ctl.c | 36 +++-
drivers/thunderbolt/ctl.h | 1 +
drivers/thunderbolt/dma_test.c | 32 ++-
drivers/thunderbolt/domain.c | 84 ++++++--
drivers/thunderbolt/nhi.c | 225 ++++++++++++++++++++--
drivers/thunderbolt/nhi.h | 2 +-
drivers/thunderbolt/pci.c | 8 +-
drivers/thunderbolt/stream.c | 175 ++++++++++-------
include/linux/thunderbolt.h | 22 ++-
11 files changed, 555 insertions(+), 156 deletions(-)
--
2.34.1
next reply other threads:[~2026-10-05 16:47 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-05 16:47 Basavaraj Natikar [this message]
2026-10-05 16:47 ` [PATCH -next v2 1/3] thunderbolt: Allow tb_ring_start() to fail Basavaraj Natikar
2026-10-05 16:47 ` [PATCH -next v2 2/3] thunderbolt: Reset the host interface before reusing a DMA HopID Basavaraj Natikar
2026-10-05 19:38 ` Mario Limonciello
2026-10-05 16:47 ` [PATCH -next v2 3/3] thunderbolt: Add quirk to reset host interface for AMD USB4 routers Basavaraj Natikar
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=20261005164718.4166200-1-Basavaraj.Natikar@amd.com \
--to=basavaraj.natikar@amd.com \
--cc=Mario.Limonciello@amd.com \
--cc=Sanath.S@amd.com \
--cc=YehezkelShB@gmail.com \
--cc=andreas.noever@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=westeri@kernel.org \
/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