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 0/3] thunderbolt: Reset affected AMD host interfaces before DMA HopID reuse
Date: Mon, 5 Oct 2026 19:13:38 +0530 [thread overview]
Message-ID: <cover.1790854235.git.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.
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 | 66 +++++-
drivers/thunderbolt/nhi.c | 249 ++++++++++++++++++++--
drivers/thunderbolt/nhi.h | 13 ++
drivers/thunderbolt/nhi_regs.h | 4 +
drivers/thunderbolt/pci.c | 21 ++
drivers/thunderbolt/stream.c | 175 +++++++++------
include/linux/thunderbolt.h | 22 +-
12 files changed, 612 insertions(+), 133 deletions(-)
--
2.34.1
next reply other threads:[~2026-10-05 13:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-05 13:43 Basavaraj Natikar [this message]
2026-10-05 13:43 ` [PATCH 1/3] thunderbolt: Allow tb_ring_start() to fail Basavaraj Natikar
2026-10-06 4:27 ` Mika Westerberg
2026-10-06 16:24 ` sashiko-bot
2026-10-05 13:43 ` [PATCH 2/3] thunderbolt: Reset the host interface before reusing a DMA HopID Basavaraj Natikar
2026-10-05 14:35 ` Mika Westerberg
2026-10-05 15:12 ` Mario Limonciello
2026-10-05 16:50 ` Basavaraj Natikar
2026-10-06 4:33 ` Mika Westerberg
2026-10-06 14:47 ` Basavaraj Natikar
2026-10-06 16:35 ` sashiko-bot
2026-10-05 13:43 ` [PATCH 3/3] thunderbolt: Add quirk to reset host interface for AMD USB4 routers Basavaraj Natikar
2026-10-06 16:49 ` sashiko-bot
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=cover.1790854235.git.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.