Linux USB
 help / color / mirror / Atom feed
From: Andrei Rusu de Castro <arc@empyreal.works>
To: linux-usb@vger.kernel.org
Cc: andreas.noever@gmail.com, westeri@kernel.org,
	YehezkelShB@gmail.com, Sanath.S@amd.com,
	Basavaraj.Natikar@amd.com, linux-kernel@vger.kernel.org
Subject: [PATCH 0/2] thunderbolt: suppress reset-induced ring interrupt warning
Date: Wed, 02 Sep 2026 12:33:46 +0000	[thread overview]
Message-ID: <20260902-thunderbolt-cover-2fdc1c1b@empyreal.works> (raw)

The AMD DMA-teardown quirk resets the host interface before USB4NET
stops its service rings. The reset clears the ring interrupt bits while
the rings remain logically active. Their later interrupt-disable write
is therefore a no-op and emits a warning, even though hardware reset is
the cause.

Reordering teardown is unsafe because stopping the ring first clears its
descriptor base and unmaps frame buffers before pending path traffic has
drained.

Patch 1 tracks the host-interface reset generation and excuses only a
redundant disable by a ring that crossed an eligible reset. Genuine
software-state drift retains the warning. Patch 2 covers duplicate
enable, duplicate disable, post-reset suppression, and real register
changes.

The exact series passed all 49 Thunderbolt UML KUnit cases and three
production configuration builds with warnings fatal. The resulting
Thunderbolt module booted on two AMD USB4 systems. The affected peer-host
XDomain teardown could not be reproduced because the available attached
device is a hub rather than a peer host.

Andrei Rusu de Castro (2):
  thunderbolt: Do not warn when a reset clears ring interrupts
  thunderbolt: Test ring interrupt warning after host reset

 drivers/thunderbolt/nhi.c   | 56 ++++++++++++++++++++++++-
 drivers/thunderbolt/nhi.h   |  4 ++
 drivers/thunderbolt/test.c  | 82 +++++++++++++++++++++++++++++++++++++
 include/linux/thunderbolt.h |  9 ++++
 4 files changed, 149 insertions(+), 2 deletions(-)



             reply	other threads:[~2026-09-02 12:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-02 12:33 Andrei Rusu de Castro [this message]
2026-09-02 12:34 ` [PATCH 1/2] thunderbolt: Do not warn when a reset clears ring interrupts Andrei Rusu de Castro
2026-09-02 12:50   ` Mika Westerberg
2026-09-02 20:53     ` Mario Limonciello
2026-09-03  3:44       ` Mika Westerberg
2026-09-02 12:34 ` [PATCH 2/2] thunderbolt: Test ring interrupt warning after host reset Andrei Rusu de Castro

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=20260902-thunderbolt-cover-2fdc1c1b@empyreal.works \
    --to=arc@empyreal.works \
    --cc=Basavaraj.Natikar@amd.com \
    --cc=Sanath.S@amd.com \
    --cc=YehezkelShB@gmail.com \
    --cc=andreas.noever@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --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