Linux Documentation
 help / color / mirror / Atom feed
* [PATCH -next v2 0/3] thunderbolt: Reset affected AMD host interfaces before DMA HopID reuse
@ 2026-10-05 16:47 Basavaraj Natikar
  2026-10-05 16:47 ` [PATCH -next v2 1/3] thunderbolt: Allow tb_ring_start() to fail Basavaraj Natikar
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Basavaraj Natikar @ 2026-10-05 16:47 UTC (permalink / raw)
  To: Andreas Noever, Mika Westerberg, Yehezkel Bernat, Jonathan Corbet,
	Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni
  Cc: linux-usb, linux-doc, Mario Limonciello, Sanath S,
	Basavaraj Natikar

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-10-05 19:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-05 16:47 [PATCH -next v2 0/3] thunderbolt: Reset affected AMD host interfaces before DMA HopID reuse Basavaraj Natikar
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox