Linux USB
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: fy15309206903@gmail.com
Cc: Mika Westerberg <westeri@kernel.org>,
	Yehezkel Bernat <YehezkelShB@gmail.com>,
	Andreas Noever <andreas.noever@gmail.com>,
	linux-usb@vger.kernel.org
Subject: Re: [PATCH v3] thunderbolt: Stop waiting on a path pending bit that never clears
Date: Mon, 31 Aug 2026 08:39:32 +0200	[thread overview]
Message-ID: <20260831063932.GB124825@black.igk.intel.com> (raw)
In-Reply-To: <20260812-b4-tb-pending-v3-1-3a292e7194c9@gmail.com>

Hi,

On Wed, Aug 12, 2026 at 11:42:09AM +0000, Fan Ye via B4 Relay wrote:
> From: Fan Ye <fy15309206903@gmail.com>
> 
> __tb_path_deactivate_hop() waits up to 500 ms for a hop's pending bit to
> read back clear. On an ASMedia ASM4242 host router the host interface
> adapter latches it once enough frames have gone through the DMA ring and
> never clears it again: the teardown finds it already set, seconds after
> the last frame and with the path still up. USB4 v2 table 8-23 has the
> field read only and zero unless packets belonging to the path are waiting
> to be dequeued, so the wait is right and this adapter is not.
> 
> Make the wait a per-adapter length and quirk those routers to zero, which
> leaves the loop reading the bit exactly once. A hop that does drain still
> says so on that read, and one that does not answers -ETIMEDOUT without
> burning the timeout: bringing the interface down takes 6 ms where it took
> 506.
> 
> Assisted-by: Claude:claude-opus-5
> Signed-off-by: Fan Ye <fy15309206903@gmail.com>

I moved the constant to switch.c as I don't think it needs to be exposed
outside. Please check that it still works.

Applied to thunderbolt.git/next, thanks!

  reply	other threads:[~2026-08-31  6:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-12 11:42 [PATCH v3] thunderbolt: Stop waiting on a path pending bit that never clears Fan Ye via B4 Relay
2026-08-31  6:39 ` Mika Westerberg [this message]
2026-09-01  2:48   ` old king

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=20260831063932.GB124825@black.igk.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=YehezkelShB@gmail.com \
    --cc=andreas.noever@gmail.com \
    --cc=fy15309206903@gmail.com \
    --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