From: "Chunfeng Yun (云春峰)" <Chunfeng.Yun@mediatek.com>
To: "mika.westerberg@linux.intel.com" <mika.westerberg@linux.intel.com>
Cc: "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>,
"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 4/4] thunderbolt: prevent pcie tunnel activation/teardown warnings
Date: Wed, 11 Nov 2026 02:16:12 +0000 [thread overview]
Message-ID: <8f2e74eb3f5884c2d2964fb9192f02120a9f2659.camel@mediatek.com> (raw)
In-Reply-To: <20261104080853.GB176724@black.igk.intel.com>
On 三, 2026-11-04 at 09:08 +0100, mika.westerberg@linux.intel.com wrote:
> Hi,
>
> On Wed, Nov 04, 2026 at 07:09:50AM +0000, Chunfeng Yun (云春峰) wrote:
> > On Tue, 2026-11-03 at 13:48 +0100, mika.westerberg@linux.intel.com
> > wrote:
> > > Hi,
> > >
> > > On Tue, Nov 03, 2026 at 08:33:51AM +0000, Chunfeng Yun (云春峰)
> > > wrote:
> > > > On Fri, 2026-10-30 at 09:56 +0100, Mika Westerberg wrote:
> > > > > On Fri, Oct 30, 2026 at 04:25:39PM +0800, Chunfeng Yun wrote:
> > > > > > When usb4 enter sleep mode, echo 1 to authorized of
> > > > > > sysfile,
> > > > > > will wakeup usb4 driver, but fail to create pcie tunnel,
> > > > > > cause
> > > > > > the warning due to a race condition between switch
> > > > > > disconnect
> > > > >
> > > > > It's router
> > > > will modify it.
> > > >
> > > > >
> > > > > > during resume and user authorization
> > > > [ 278.831186] usb4_hi NVDA8100:00: 0:1: is unplugged (state:
> > > > 7),
> > > > retrying...
> > > > [ 278.943031] usb4_hi NVDA8100:00: 0:1: failed to reach state
> > > > TB_PORT_UP. Ignoring port...
> > > > [ 278.951125] usb4_hi NVDA8100:00: 0:1: lost during suspend,
> > > > disconnecting
> > > > [ 278.957819] usb4_hi NVDA8100:00: 0:4 <-> 1:16 (USB3):
> > > > deactivating
> > > > [ 278.964794] usb4_hi NVDA8100:00: deactivating USB3 Down path
> > > > from
> > > > 0:4 to 1:16
> > > > [ 278.972737] usb4_hi NVDA8100:00: deactivating USB3 Up path
> > > > from
> > > > 1:16
> > > > to 0:4
> > > > [ 278.980504] usb4_hi NVDA8100:00: 0: TMU: mode change off ->
> > > > bi-
> > > > directional, HiFi requested
> > > > [ 278.991265] usb4_hi NVDA8100:00: 0: TMU: mode set to: bi-
> > > > directional, HiFi
> > > > [ 278.999511] usb4_hi NVDA8100:00: 0:1: total credits changed
> > > > 66 -
> > > > > 66
> > > > [ 279.006408] usb4_hi NVDA8100:00: 1: link width set to
> > > > symmetric,
> > > > dual lanes
> > > > [ 279.013763] usb4_hi NVDA8100:00: 0:7 <-> 1:9 (PCI):
> > > > activating
> > > > [ 279.019587] usb4_hi NVDA8100:00: activating PCIe Down path
> > > > from
> > > > 0:7
> > > > to 1:9
> > > > [ 279.026468] usb4_hi NVDA8100:00: 1:1: Writing hop 1
> > > > [ 279.031335] usb4_hi NVDA8100:00: 1:1: In HopID: 8 => Out
> > > > port:
> > > > 9
> > > > Out HopID: 8
> > > > [ 279.038546] usb4_hi NVDA8100:00: 1:1: Weight: 1 Priority:
> > > > 3
> > > > Credits: 32 Drop: 0 PM: 0
> > > > [ 279.046536] usb4_hi NVDA8100:00: 1:1: Counter enabled: 0
> > > > Counter
> > > > index: 2047
> > > > [ 279.053834] usb4_hi NVDA8100:00: 1:1: Flow Control
> > > > (In/Eg):
> > > > 1/0
> > > > Shared Buffer (In/Eg): 0/0
> > > > [ 279.062259] usb4_hi NVDA8100:00: 1:1: Unknown1: 0x0
> > > > Unknown2:
> > > > 0x0
> > > > Unknown3: 0x0
> > > > [ 279.069730] ------------[ cut here ]------------
> > > > [ 279.074335] usb4_hi NVDA8100:00: PCIe Down path activation
> > > > failed
> > > > [ 279.080426] WARNING: CPU: 5 PID: 2433 at
> > > > drivers/thunderbolt/path.c:587 tb_path_activate+0x1a4/0x5b0
> > > > ...
> > > > [ 279.220285] Call trace:
> > > > [ 279.222722] tb_path_activate+0x1a4/0x5b0 (P)
> > > > [ 279.227068] tb_tunnel_activate+0x140/0x498
> > > > [ 279.231241] tb_tunnel_pci+0x180/0x490
> > > > [ 279.234980] tb_domain_approve_switch+0x74/0xb0
> > > > [ 279.239500] authorized_store+0x214/0x270
> > > > [ 279.243498] dev_attr_store+0x20/0x70
> > > > ...
> > > > [ 279.288888] ---[ end trace 0000000000000000 ]---
> > > > [ 279.293497] usb4_hi NVDA8100:00: 0:7 <-> 1:9 (PCI):
> > > > activation
> > > > failed
> > > >
> > > >
> > > > root cause:
> > > >
> > > > The warning were caused by a race condition between switch
> > > > disconnect
> > > > during resume and user authorization:
> > > >
> > > > 1. While the system was in runtime suspend, userspace
> > > > executed:
> > > >
> > > > echo 1 > /sys/bus/thunderbolt/devices/0-1/authorized
> > > > 2. Writing to this sysfs attribute woke up the USB4
> > > > controller
> > > > (nhi_runtime_resume).
> > > > 3. During resume, the downstream port 0:1 failed to complete
> > > > link
> > > > training within the timeout and was declared lost:
> > >
> > > Okay we get the warning but the bigger problem here is that why
> > > the
> > > link
> > > does not come up anymore?
> > Yes, it is one case
> > > Unless you unplugged the router as well.
> > it is another one.
> >
> > if the driver already know the router is disconnected, whether
> > still
> > need to look up the pcie tunnel? it want to do it, I will abandon
> > this
> > patch.
>
> I think it makes sense to fix it but I was more concerned about the
> link
> issue you seem to have there. The link should be re-trained once we
> runtime
> resume if the router is still connected. There could be many reasons
> for
> this but I would check that the PD/retimer firmwares are up-to-date
> at
> least as they may contribute to this.
I test it by some usb4 hubs, only one encounter the disconnection issue
in runtime resume , it is Intel USB4 Evaluation Dock EVB.
prev parent reply other threads:[~2026-11-11 2:16 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-30 8:25 [PATCH 0/4] add support platform nhi driver Chunfeng Yun
2026-10-30 8:25 ` [PATCH 1/4] thunderbolt: add " Chunfeng Yun
2026-10-30 8:47 ` Mika Westerberg
2026-11-04 7:34 ` Chunfeng Yun (云春峰)
2026-11-04 7:48 ` mika.westerberg
2026-11-05 9:13 ` Chunfeng Yun (云春峰)
2026-10-31 3:41 ` kernel test robot
2026-10-31 20:03 ` kernel test robot
2026-11-07 19:04 ` Sven Peter
2026-11-09 13:56 ` Konrad Dybcio
2026-11-09 17:35 ` Sven Peter
2026-10-30 8:25 ` [PATCH 2/4] thunderbolt: add support optional dedicated wakeup irq Chunfeng Yun
2026-10-30 8:48 ` Mika Westerberg
2026-11-03 9:05 ` Chunfeng Yun (云春峰)
2026-11-03 11:59 ` mika.westerberg
2026-11-04 7:05 ` Chunfeng Yun (云春峰)
2026-10-30 8:25 ` [PATCH 3/4] thunderbolt: improve usb3 adapter link up timeout value Chunfeng Yun
2026-10-30 8:50 ` Mika Westerberg
2026-11-03 8:13 ` Chunfeng Yun (云春峰)
2026-10-30 8:25 ` [PATCH 4/4] thunderbolt: prevent pcie tunnel activation/teardown warnings Chunfeng Yun
2026-10-30 8:56 ` Mika Westerberg
2026-11-03 8:33 ` Chunfeng Yun (云春峰)
2026-11-03 12:48 ` mika.westerberg
2026-11-04 7:09 ` Chunfeng Yun (云春峰)
2026-11-04 8:08 ` mika.westerberg
2026-11-11 2:16 ` Chunfeng Yun (云春峰) [this message]
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=8f2e74eb3f5884c2d2964fb9192f02120a9f2659.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=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=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®