From nobody Fri Feb 6 16:15:34 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4f6zhl1HnVz6RNtj for ; Fri, 06 Feb 2026 16:15:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4f6zhk6RZlz42BD for ; Fri, 06 Feb 2026 16:15:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1770394534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CEzZvx6yjW5Ae9Y1CKykQXunr5HKEHJqM6b/yAI8lBU=; b=gjHnFiWBqBJbWj5iYlxLcmADKKbLIeBySsa6hiZ6VRzw7L2WrbQd/6dUiKJehBS5rq5Gmm S/I3ubmzyjgzl0gUXj9zG6HvfrTWDypJjdmNmbxLina5nb06vZRbgzUYZBT3BfRgWaMwcl T3iSRswAkN2zwC/oTRaPtUtBXiMFcftmC9Igg6+XCnQ5IRhv6Bmlc8FrOTCVmESrUTBpqr tc//82d1o5ILCIbbOBiWjH7nM95VVvMlLJVHdawWxXjTrOq806B0eL+3fTacYPfvIhjfXz b354DsRRJgUPDE3WuXyAPnaENVxZHjRjU9oRambEjy+hDFdbRhT91BTNP5lLQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1770394534; a=rsa-sha256; cv=none; b=Ud+7ymznzEBwx0Ypfy/g2QTB6IP7tWABpIN7q2fwV0Qq9Oj1O+mbm7Es3M2UdJOtPSayR3 Drvu+QI+l2RNIifNHkEGb3v8lGVYYLkz5+3kvVaOcTNWagM3Z75jK5sxk7Q8d7u7in2qLG 9C/SPQ7eDduBdUhvc8l9MH4hU9+xlcrvchvBKtZ07TJJMRIlhaLHskEWxWb91oQAItf7M7 fPc+/kSH8uAoOsm1zxj/r9ATj4fwHR4NE9IEehgaTjLsuN8ArY+qactQpf6jCZBVVT5fc7 4dzkr+Q4cCakIhuj/ezCKRU4LVOsS6EXM1H6GxZZWmCMJUuUnw7QiN4sSljSmA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1770394534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CEzZvx6yjW5Ae9Y1CKykQXunr5HKEHJqM6b/yAI8lBU=; b=wz1dcBjHN3w20Ezrm7lHVwoybMCFBci9Ro2XxWqHQzzDyr5bVcNhCdait9GkCZj0XPajPX ernqqzEHQnGZb8KmsmcBt3kaCyQc1nC+6rBae4Jv9cIoAZk7ISBUf68rLlPpo+VTp23dwA ezcnJx61y/F+qytM+OCigGnUYFODdls5AR8ag2gw+DJfFL0PPV85keQmuFUgKPSTt7/NdU Z9KuwLy9hTMGTDiCy/yUv5o/vict1TlSCXPFqD4mu9xlegkhbEvLma7FjNxVf6AsgEPtPP EO0C25DqXkYbDe7JGhoeeejT2PmNq7+Mzql7bmLJhM9x+vZXuBImwhLMfoNukA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4f6zhk5S2gz7Hf for ; Fri, 06 Feb 2026 16:15:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1a075 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 06 Feb 2026 16:15:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Abdelkader Boudih From: Aymeric Wibo Subject: git: 067ad8b31bf6 - main - thunderbolt: Fix tb_pcib device matching to check PCI class List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: obiwac X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 067ad8b31bf68b6dcf1ad571746349ed88d63d00 Auto-Submitted: auto-generated Date: Fri, 06 Feb 2026 16:15:34 +0000 Message-Id: <698613a6.1a075.25bbf0ea@gitrepo.freebsd.org> The branch main has been updated by obiwac: URL: https://cgit.FreeBSD.org/src/commit/?id=067ad8b31bf68b6dcf1ad571746349ed88d63d00 commit 067ad8b31bf68b6dcf1ad571746349ed88d63d00 Author: Abdelkader Boudih AuthorDate: 2026-02-06 16:12:56 +0000 Commit: Aymeric Wibo CommitDate: 2026-02-06 16:13:12 +0000 thunderbolt: Fix tb_pcib device matching to check PCI class Light Ridge and earlier Thunderbolt controllers reuse the same device ID (0x1513) for both the NHI (class 0x088000) and PCI bridges (class 0x060400). Without checking the PCI class, tb_pcib would incorrectly match NHI devices, causing a panic when trying to attach bridge code to non-bridge hardware. Add PCI class check to tb_pcib_find_ident() to only match actual PCI-PCI bridges (PCIC_BRIDGE/PCIS_BRIDGE_PCI). Reviewed by: obiwac, jhb Approved by: obiwac, jhb Fixes: 2ed9833791f2 (thunderbolt: Import USB4 code) Differential Revision: https://reviews.freebsd.org/D55102 --- sys/dev/thunderbolt/tb_pcib.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/dev/thunderbolt/tb_pcib.c b/sys/dev/thunderbolt/tb_pcib.c index e6f0115364da..ffb85ebec9ae 100644 --- a/sys/dev/thunderbolt/tb_pcib.c +++ b/sys/dev/thunderbolt/tb_pcib.c @@ -119,6 +119,10 @@ tb_pcib_find_ident(device_t dev) for (n = tb_pcib_identifiers; n->vendor != 0; n++) { if ((n->vendor != v) || (n->device != d)) continue; + /* Only match actual PCI-PCI bridges to avoid conflict with NHI */ + if (pci_get_class(dev) != PCIC_BRIDGE || + pci_get_subclass(dev) != PCIS_BRIDGE_PCI) + continue; if (((n->subvendor != 0xffff) && (n->subvendor != sv)) || ((n->subdevice != 0xffff) && (n->subdevice != sd))) continue;