mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Chunfeng Yun (云春峰)" <Chunfeng.Yun@mediatek.com>
To: "mika.westerberg@linux.intel.com" <mika.westerberg@linux.intel.com>
Cc: "konrad.dybcio@oss.qualcomm.com" <konrad.dybcio@oss.qualcomm.com>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"westeri@kernel.org" <westeri@kernel.org>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	AngeloGioacchino Del Regno
	<angelogioacchino.delregno@collabora.com>,
	"YehezkelShB@gmail.com" <YehezkelShB@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"sven@kernel.org" <sven@kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"andreas.noever@gmail.com" <andreas.noever@gmail.com>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
	"linux-mediatek@lists.infradead.org"
	<linux-mediatek@lists.infradead.org>
Subject: Re: [PATCH v2 5/7] thunderbolt: increase the lane adapter link-up timeout value
Date: Thu, 12 Nov 2026 07:24:48 +0000	[thread overview]
Message-ID: <38328263f2308341b9026219a1e6c4925307407e.camel@mediatek.com> (raw)
In-Reply-To: <20261110143933.GD259790@black.igk.intel.com>

On 二, 2026-11-10 at 15:39 +0100, Mika Westerberg wrote:
> On Tue, Nov 10, 2026 at 07:48:53PM +0800, Chunfeng Yun wrote:
> > when plug into a USB3 device into USB4 hub's downstream facing port
> > to trigger usb4 driver wakeup, encounter the lane link up timeout
> 
> USB4
ACK
> 
> > issue, then cause usb3 hub disconnect:
> 
> USB3
> 
> Everywhere.
OK
> 
> > 
> > usb4_hi NVDA8100:00: 0:1: failed to reach state TB_PORT_UP.
> > Ignoring port...
> 
> What's usb4_hi?
Sorry, forget update logs, it is the log from the draft usb4 platform
driver to test functions which change the driver name as 'usb4_hi',
I will reproduce it and get new logs.

Thanks
> 
> > usb4_hi NVDA8100:00: 0:1: lost during suspend, disconnecting
> > usb4_hi NVDA8100:00: 0:4 <-> 1:20 (USB3): deactivating
> > usb4_hi NVDA8100:00: deactivating USB3 Down path from 0:4 to 1:20
> > usb4_hi NVDA8100:00: deactivating USB3 Up path from 1:20 to 0:4
> > ...
> > thunderbolt 0-1: device disconnected
> > usb 2-1: USB disconnect, device number 10
> > 
> > Completes link training at ~1.48s (with two retimer) and
> > transitions
> > to TB_PORT_UP after change the timeout to 2s;
> > 
> > In the USB4 spec, Phase 5 (Link Equalization) alone is allowed up
> > to
> > 1000 ms. When add tPhase2~4 (200 ms), and retimer transaction
> > delays
> > (tCmdResponse = 50 ms), the physical link is allowed by spec to
> > take
> > 1200 ms to 1500 ms+ to complete initialization.
> 
> Okay that makes sense.
> 
> > Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> > ---
> > v2: change timeout from 2.5s to 2s
> > ---
> >  drivers/thunderbolt/switch.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/thunderbolt/switch.c
> > b/drivers/thunderbolt/switch.c
> > index 7ff3da79da76..7daee83c7ed8 100644
> > --- a/drivers/thunderbolt/switch.c
> > +++ b/drivers/thunderbolt/switch.c
> > @@ -486,7 +486,7 @@ int tb_port_state(struct tb_port *port)
> >   * @port: Port to wait
> >   * @wait_if_unplugged: Wait also when port is unplugged
> >   *
> > - * Wait up to 1 second for a port to reach state TB_PORT_UP. If
> > + * Wait up to 2 seconds for a port to reach state TB_PORT_UP. If
> >   * wait_if_unplugged is set then we also wait if the port is in
> > state
> >   * TB_PORT_UNPLUGGED (it takes a while for the device to be
> > registered after
> >   * switch resume). Otherwise we only wait if a device is
> > registered but the link
> > @@ -500,7 +500,7 @@ int tb_port_state(struct tb_port *port)
> >   */
> >  int tb_wait_for_port(struct tb_port *port, bool wait_if_unplugged)
> >  {
> > -	int retries = 10;
> > +	int retries = 20;
> >  	int state;
> >  	if (!port->cap_phy) {
> >  		tb_port_WARN(port, "does not have PHY\n");
> > -- 
> > 2.45.2


  reply	other threads:[~2026-11-12  7:25 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-10 11:48 [PATCH 0/7] thunderbolt: Add support platform NHI driver Chunfeng Yun
2026-11-10 11:48 ` [PATCH v2 1/7] thunderbolt: Prefix NHI core functions with tb_ and tb_ring_ Chunfeng Yun
2026-11-10 12:42   ` Konrad Dybcio
2026-11-11  2:26     ` Chunfeng Yun (云春峰)
2026-11-10 11:48 ` [PATCH v2 2/7] thunderbolt: Move ICM mailbox functions to icm.c and internalize interrupt work Chunfeng Yun
2026-11-10 14:24   ` Mika Westerberg
2026-11-11  2:37     ` Chunfeng Yun (云春峰)
2026-11-10 11:48 ` [PATCH v2 3/7] thunderbolt: Make PCIe NHI support opt-in Chunfeng Yun
2026-11-10 11:48 ` [PATCH v2 4/7] thunderbolt: add platform NHI driver Chunfeng Yun
2026-11-10 12:43   ` Konrad Dybcio
2026-11-11 13:29     ` Chunfeng Yun (云春峰)
2026-11-10 14:37   ` Mika Westerberg
2026-11-10 11:48 ` [PATCH v2 5/7] thunderbolt: increase the lane adapter link-up timeout value Chunfeng Yun
2026-11-10 14:39   ` Mika Westerberg
2026-11-12  7:24     ` Chunfeng Yun (云春峰) [this message]
2026-11-10 11:48 ` [PATCH v2 6/7] thunderbolt: decouple the waiting time of TB_PORT_UNPLUGGED and TB_PORT_UP Chunfeng Yun
2026-11-10 14:40   ` Mika Westerberg
2026-11-10 11:48 ` [PATCH v2 7/7] thunderbolt: prevent pcie tunnel activation/teardown warnings Chunfeng Yun
2026-11-10 14:50   ` 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=38328263f2308341b9026219a1e6c4925307407e.camel@mediatek.com \
    --to=chunfeng.yun@mediatek.com \
    --cc=YehezkelShB@gmail.com \
    --cc=andreas.noever@gmail.com \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=konrad.dybcio@oss.qualcomm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=mika.westerberg@linux.intel.com \
    --cc=sven@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

all inboxes | Powered by JetHome®