Linux Documentation
 help / color / mirror / Atom feed
* [PATCH 0/3] thunderbolt: Reset affected AMD host interfaces before DMA HopID reuse
@ 2026-10-05 13:43 Basavaraj Natikar
  2026-10-05 13:43 ` [PATCH 1/3] thunderbolt: Allow tb_ring_start() to fail Basavaraj Natikar
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Basavaraj Natikar @ 2026-10-05 13:43 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.

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


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

end of thread, other threads:[~2026-10-06 14:47 UTC | newest]

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