public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
From: Mika Westerberg <mika.westerberg@linux.intel.com>
To: AceLan Kao <acelan.kao@canonical.com>
Cc: Mario Limonciello <mario.limonciello@amd.com>,
	Andreas Noever <andreas.noever@gmail.com>,
	Mika Westerberg <westeri@kernel.org>,
	Yehezkel Bernat <YehezkelShB@gmail.com>,
	linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
	Sanath.S@amd.com, "Lin, Wayne" <Wayne.Lin@amd.com>
Subject: Re: [PATCH] [RFC] thunderbolt: Add delay for Dell U2725QE link width
Date: Wed, 17 Dec 2025 13:55:07 +0100	[thread overview]
Message-ID: <20251217125507.GR2275908@black.igk.intel.com> (raw)
In-Reply-To: <CAFv23Q=bLCif750y8eDEP4J+KwVy8CknZawYOGZWWrBSiE8FNA@mail.gmail.com>

Hi,

On Wed, Dec 17, 2025 at 11:06:52AM +0800, AceLan Kao wrote:
> > > By default it does not access retimers beyond the Type-C connector. I
> > > wonder if you have CONFIG_USB4_DEBUGFS_MARGINING set in your kernel
> > > .config? And if yes can you disable that and try again.
> Sorry, it looks like I got some troubles with my MTA, some emails are
> not sent out correctly.
> 
> I've rebuilt the kernel without CONFIG_USB4_DEBUGFS_MARGINING, and
> here is the log
> There is a tbt storage daisy-chained after the tbt monitor, it's
> easier to reproduce this issue.
> https://people.canonical.com/~acelan/bugs/tbt_call_trace/intel/merged_6.18.0-d358e5254674+.2.out
> 
> And this one is only the tbt monitor plugged.
> https://people.canonical.com/~acelan/bugs/tbt_call_trace/intel/merged_6.18.0-d358e5254674+.3.out

Okay from the first trace at least scanning of the retimer at index 2
(which does not exist) does not complete too fast and I suspect there is
some timeout on the device side that triggers. We had already similar with
Pluggable devices but perhaps this is implemented in the Dell version too?

I wonder it is enough if we set configuration valid and then scan the
downstream retimers? Can you try the attached patch? We do need to scan
them before DP tunnels are created to support ALPM (this is work in
progress).

diff --git a/drivers/thunderbolt/tb.c b/drivers/thunderbolt/tb.c
index d7f32a63fc1e..e23e0ee9c95f 100644
--- a/drivers/thunderbolt/tb.c
+++ b/drivers/thunderbolt/tb.c
@@ -1380,14 +1380,6 @@ static void tb_scan_port(struct tb_port *port)
 	upstream_port = tb_upstream_port(sw);
 	tb_configure_link(port, upstream_port, sw);
 
-	/*
-	 * Scan for downstream retimers. We only scan them after the
-	 * router has been enumerated to avoid issues with certain
-	 * Pluggable devices that expect the host to enumerate them
-	 * within certain timeout.
-	 */
-	tb_retimer_scan(port, true);
-
 	/*
 	 * CL0s and CL1 are enabled and supported together.
 	 * Silently ignore CLx enabling in case CLx is not supported.
@@ -1406,6 +1398,13 @@ static void tb_scan_port(struct tb_port *port)
 	 */
 	tb_switch_configuration_valid(sw);
 
+	/*
+	 * Scan for downstream retimers. We only scan them after the
+	 * router has been enumerated to avoid issues with certain
+	 * Pluggable devices that expect the host to enumerate them
+	 * within certain timeout.
+	 */
+	tb_retimer_scan(port, true);
 	/* Scan upstream retimers */
 	tb_retimer_scan(upstream_port, true);
 

  reply	other threads:[~2025-12-17 12:55 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-09  5:41 [PATCH] [RFC] thunderbolt: Add delay for Dell U2725QE link width Chia-Lin Kao (AceLan)
2025-12-09  7:06 ` Mika Westerberg
2025-12-09 16:49   ` Mario Limonciello
2025-12-10  5:33     ` Chia-Lin Kao (AceLan)
2025-12-10  3:15   ` Chia-Lin Kao (AceLan)
2025-12-10  7:41     ` Mika Westerberg
2025-12-10 21:42       ` Mario Limonciello
     [not found]         ` <coxrm5gishdztghznuvzafg2pbdk4qk3ttbkbq7t5whsfv2lk5@3gqepcs6h4uc>
2025-12-12 12:39           ` Mika Westerberg
2025-12-12 14:40             ` Mario Limonciello
2025-12-17  3:06               ` AceLan Kao
2025-12-17 12:55                 ` Mika Westerberg [this message]
2025-12-17 15:53                   ` Mario Limonciello
2025-12-18  1:38                     ` AceLan Kao
2025-12-18  7:21                       ` Mika Westerberg
     [not found]                         ` <6inne3luvw4ot3wqnsaw3gzhlxtd4756i465oto6so5ox3syxp@kibuv4vhvexx>
2025-12-18 10:20                           ` Mika Westerberg
2025-12-22  1:33                             ` Chia-Lin Kao (AceLan)
2025-12-30  7:30                               ` Mika Westerberg
2025-12-31  1:33                                 ` Chia-Lin Kao (AceLan)
2025-12-31  6:03                                   ` Mika Westerberg
2026-01-02  2:03                                     ` Chia-Lin Kao (AceLan)
2026-01-05 11:19                                       ` Mika Westerberg

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=20251217125507.GR2275908@black.igk.intel.com \
    --to=mika.westerberg@linux.intel.com \
    --cc=Sanath.S@amd.com \
    --cc=Wayne.Lin@amd.com \
    --cc=YehezkelShB@gmail.com \
    --cc=acelan.kao@canonical.com \
    --cc=andreas.noever@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --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