From: "mika.westerberg@linux.intel.com" <mika.westerberg@linux.intel.com>
To: Golden Stickwood <Stickwood_Jr@hotmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Bjorn Helgaas <bhelgaas@google.com>, Sanath S <sanath.s@amd.com>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH] thunderbolt: Preserve pre-boot PCIe tunnels for active storage devices
Date: Sun, 4 Oct 2026 06:45:41 +0200 [thread overview]
Message-ID: <20261004044541.GH176164@black.igk.intel.com> (raw)
In-Reply-To: <BN8PR19MB275472A84381924206F01AE0FD882@BN8PR19MB2754.namprd19.prod.outlook.com>
Hi,
On Sat, Oct 03, 2026 at 06:45:14PM +0000, Golden Stickwood wrote:
> In Linux 6.8+, commits 0fc70886569c ("thunderbolt: Reset USB4 v2 host
> router") and 59a54c5f3dbd ("thunderbolt: Reset topology created by the boot
> firmware") enabled default host router resetting (host_reset = true).
>
> On systems where the UEFI firmware created a PCIe tunnel to an external
> storage device (such as an NVMe drive hosting the root filesystem),
> issuing nhi_reset() in nhi_probe() on USB4 v2 or calling tb_switch_reset()
> in tb_start() on USB4 v1 abruptly tears down the physical PCIe tunnel while
> the kernel or initramfs is booting. This leaves downstream NVMe devices
> inaccessible (-ENODEV), triggers pciehp removal races, and results in a
> kernel panic or dracut boot timeout.
If you have the TB driver as part of the initramfs it should load and
recreate tunnels before the rootfs is mounted. You need to make sure there
is something in the initscripts that actually enables PCIe tunnel though.
> The Thunderbolt driver already contains infrastructure to handle boot
> devices: tb_discover_tunnels() traverses existing PCIe tunnels, marks
> the upstream switches as sw->boot = true, and tb_scan_finalize_switch()
> authorizes them. However, unconditional host_reset and discover = false
> short-circuits this entire mechanism.
>
> Fix this regression cleanly by:
> 1. Adding nhi_has_active_storage() in drivers/thunderbolt/nhi.c to walk
> sibling PCIe bridges using pci_walk_bus() and specifically verify the
> presence of PCI_BASE_CLASS_STORAGE devices (e.g. NVMe SSDs) before
> issuing REG_RESET_HRR.
> 2. In tb_start(), checking if the host router has an active PCIe downstream
> adapter enabled by firmware before resetting. If active PCIe boot tunnels
> or downstream storage devices are present, keep discover = true, skip
> destructive resets, and allow tb_discover_tunnels() to adopt and
> authorize the boot device.
>
> Hardware Verification & Telemetry:
> - Platform A: Intel Core Ultra 9 275HX (Arrow Lake-HX) with Meteor Lake-P
> Thunderbolt 4 NHI [8086:7ec2] + ASMedia ASM2464PD (PCIe Gen 4 x4) +
> WD_BLACK SN7100 2TB NVMe SSD. Confirmed zero AER errors, zero IOMMU
> page faults, and Host Memory Buffer (HMB) 64 MiB cleanly established.
> - Platform B: AMD Hawk Point USB4 Host Router [1022:1502] (ASUS Zenbook 14
> UM3406HA, Launchpad LP #2159575). Boot succeeds cleanly without link drop.
> - Platform C: Intel Core Ultra (Dell Latitude 5550, Launchpad LP #2078573).
>
You are misisng Assisted-by: LLM, no?
> Fixes: 0fc70886569c ("thunderbolt: Reset USB4 v2 host router")
> Fixes: 59a54c5f3dbd ("thunderbolt: Reset topology created by the boot firmware")
> Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2167764
> Cc: stable@vger.kernel.org # 6.8+
> Signed-off-by: StickwoodJr <stickwood_jr@hotmail.com>
> ---
> drivers/thunderbolt/nhi.c | 54 ++++++++++++++++++++++++++++++++++++++-
> drivers/thunderbolt/tb.c | 24 ++++++++++++++++++++--
> 2 files changed, 75 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/thunderbolt/nhi.c b/drivers/thunderbolt/nhi.c
> index 8b9f71c48012..d3c907a014e2 100644
> --- a/drivers/thunderbolt/nhi.c
> +++ b/drivers/thunderbolt/nhi.c
> @@ -17,6 +17,7 @@
> #include <linux/interrupt.h>
> #include <linux/iommu.h>
> #include <linux/module.h>
> +#include <linux/pci.h>
There is no way TB driver is going to call PCI functions or look what is
behind the PCIe tunnels.
next prev parent reply other threads:[~2026-10-04 4:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-03 18:45 Golden Stickwood
2026-10-04 4:45 ` mika.westerberg [this message]
2026-10-04 6:09 ` Greg Kroah-Hartman
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=20261004044541.GH176164@black.igk.intel.com \
--to=mika.westerberg@linux.intel.com \
--cc=Stickwood_Jr@hotmail.com \
--cc=bhelgaas@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=sanath.s@amd.com \
--cc=stable@vger.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®