thunderbolt: Reset affected AMD host interfaces before DMA HopID reuse
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest3 patches 1 replyIn review
- v13 patches 6 repliesSuperseded
Changes in v2 from the cover letter
- 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.
Patches in v2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | thunderbolt: Allow tb_ring_start() to faildrivers/ drivers/ drivers/ +3 more | +181 | 0 replies | |
| 2/3 | thunderbolt: Reset the host interface before reusing a DMA HopIDDocumentation/ drivers/ drivers/ +5 more | +371 | 1 reply | |
| 3/3 | thunderbolt: Add quirk to reset host interface for AMD USB4 routersdrivers/ | +4 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.
Cover letter [PATCH -next v2 0/3] thunderbolt: Reset affected AMD host interfaces before DMA HopID reuse
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(-)
Signature · 1 line
2.34.1