From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796461094; b=3DuqBz1+ZDt5JuWj7DeA93lcp8Ja4bBcNY42KgPDVWVa2cKg39o6fA3YZkEx1JcwF5Fh S7aFPl6yvNyKX8Wxd3wLCYVajtJcxQ19zXbNJZa3xg7pjX0MMyIpXbanxpUmjfEFSvA0u gcS9kdG5ntkf8avzlaIXGNREgPAR7UrwJYJyZQuXqK7nq8vlaAo8TNlTSgUPisNwpvSNB wMpop5+npV4wuII2mvtl6DEIwPm2dPYIXETbmO2nQIv+OExua9waEy26g2F0oAx6b6luM LEA1XSEYryLJ/uXOIFt8kWdLzRopOI4MtDligtejR5XCACPhNyeiV3oEgbL5gwm/u9g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796461094; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=a99YQ/jRUkoFMAso69AL56V3DxZ0yfxbqLGBhF8GVfc=; b=bPqf4YK9u8GXCbh9RJOdK2R9Ls8kRT92Eq318q/LeVb+sFD2mmbbfTI/ayZm3Ivc07OQ k5k0jR0KIR0+vV3N0NTtpnsSVrThdIZvxe03hdFOeMQbCtBQkkwdwitWxAoqYUOjK4iCu /tnXqQ2JJjUM121i0MnuX0X0CPkyMszpv9/yXL0HyzNgLIb7cos6OJWebd6pZhDnP5D6c I4Kkwhpma5r4Pc7K2+eyTLz6K0qsJNGycMof1JZ0F9Io9mhRLXn4zDVCHjsCcvpS4udt7 xdndWyrBhFkZ+tZQ+A32AL/74S/T8JsUb8+uGpSIIcBH9W9/fHzGTES8GBOG/VbdUJQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="f2+/3fao"; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 89484606A322 for ; Sat, 5 Dec 2026 08:58:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=f2+/3fao Received: by smtp.kernel.org (Postfix) with ESMTPSA id 538F61F00936; Sat, 5 Dec 2026 08:58:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796461094; bh=a99YQ/jRUkoFMAso69AL56V3DxZ0yfxbqLGBhF8GVfc=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=f2+/3faoAB/x57lgUphODHXZjGJTWVyIgjrzj+FpR6GomrMN84aRotzbQxT39QlNu 9GLwnuh/qV4Quy58GaoWOZKPiuNnKlbQD727knqruJc1q4SUKb9EKyX1FTGs11qrzb j/jgcMMmNppEpCLcpXo+QxuOj6mIjX8J8DAxmczrhzcMMdhVLQ4S37jP205pu1Og7i UzZU4aLYqzBK6cAseHgE5J2pBENgtGoJS87AMCf6WvumYEgcv0l1Zt1tTXqeaSE4PJ tqutwy/LcqNwfrXcSMaX+PCFpR6npzgeJaO21EiPoGLzac/h0or45tRrh3MuoNIKtT C2KqpWw8JLb4Q== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v4 09/14] thunderbolt: Make PCIe NHI support opt-in Reply-To: sashiko-reviews@lists.linux.dev To: "Chunfeng Yun" Cc: linux-usb@vger.kernel.org In-Reply-To: <20261205083342.4009278-10-chunfeng.yun@mediatek.com> References: <20261205083342.4009278-1-chunfeng.yun@mediatek.com> <20261205083342.4009278-10-chunfeng.yun@mediatek.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Sat, 05 Dec 2026 08:58:13 +0000 X-Mailing-List: linux-usb@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 3 potential issues to consider: - [High] thunderbolt: moving PCI IDs to thunderbolt_pci breaks blacklist and initramfs - [Medium] thunderbolt: moving icm.o to thunderbolt_pci renames start_icm parameter - [Low] thunderbolt: missing linux/export.h in four files adding EXPORT_SYMBOL_GPL() -- commit e026bb092855a37bc1fed58283abd5123fa15e50 Author: Konrad Dybcio thunderbolt: Make PCIe NHI support opt-in This commit decouples the PCIe NHI and ICM drivers from the Thunderbolt/USB4 core module into a separate thunderbolt_pci module under CONFIG_USB4_PCI, and exports the core symbols needed by separate host controller drivers. > diff --git a/drivers/thunderbolt/Makefile b/drivers/thunderbolt/Makefile > index beb054c3126b1..a563bf2b03455 100644 > --- a/drivers/thunderbolt/Makefile > +++ b/drivers/thunderbolt/Makefile > @@ -1,10 +1,13 @@ > # SPDX-License-Identifier: GPL-2.0-only > ccflags-y :=3D -I$(src) > obj-${CONFIG_USB4} :=3D thunderbolt.o > -thunderbolt-objs :=3D nhi.o ctl.o tb.o switch.o cap.o pci.o path.o tunne= l.o eeprom.o > -thunderbolt-objs +=3D domain.o dma_port.o icm.o property.o xdomain.o lc.= o tmu.o usb4.o > +thunderbolt-objs :=3D nhi.o ctl.o tb.o switch.o cap.o path.o tunnel.o ee= prom.o > +thunderbolt-objs +=3D domain.o dma_port.o property.o xdomain.o lc.o tmu.= o usb4.o > thunderbolt-objs +=3D usb4_port.o nvm.o retimer.o quirks.o clx.o > =20 > +obj-${CONFIG_USB4_PCI} +=3D thunderbolt_pci.o > +thunderbolt_pci-y :=3D pci.o icm.o > + > thunderbolt-${CONFIG_ACPI} +=3D acpi.o > thunderbolt-$(CONFIG_DEBUG_FS) +=3D debugfs.o > thunderbolt-$(CONFIG_USB4_CONFIGFS) +=3D configfs.o [Severity: Medium] Does moving icm.o into thunderbolt_pci rename the existing start_icm module parameter? icm.c defines module_param(start_icm, bool, 0444), previously exposed as thunderbolt.start_icm. With the new module name, thunderbolt.start_icm=3D1 on the kernel command line is silently ignored, and "options thunderbolt start_icm=3D1" in /etc/modprobe.d/ causes modprobe thunderbolt to fail. > diff --git a/drivers/thunderbolt/ctl.c b/drivers/thunderbolt/ctl.c > index 965988b18608f..96717a0a94b13 100644 > --- a/drivers/thunderbolt/ctl.c > +++ b/drivers/thunderbolt/ctl.c > @@ -9,7 +9,6 @@ > #include > #include > #include > -#include > #include > #include > =20 > @@ -96,6 +95,7 @@ struct tb_cfg_request *tb_cfg_request_alloc(void) > =20 > return req; > } > +EXPORT_SYMBOL_GPL(tb_cfg_request_alloc); [Severity: Low] Should this file include for EXPORT_SYMBOL_GPL()? ctl.c, domain.c, switch.c, and tunnel.c all newly add EXPORT_SYMBOL_GPL() without directly including , which triggers W=3D2 build warnings from scripts/misc-check. [ ... ] > diff --git a/drivers/thunderbolt/pci.c b/drivers/thunderbolt/pci.c > index a7c92083f820b..850c301bc87cb 100644 > --- a/drivers/thunderbolt/pci.c > +++ b/drivers/thunderbolt/pci.c > @@ -690,7 +690,7 @@ static struct pci_device_id nhi_ids[] =3D { > }; > =20 > MODULE_DEVICE_TABLE(pci, nhi_ids); > -MODULE_DESCRIPTION("Thunderbolt/USB4 core driver"); > +MODULE_DESCRIPTION("PCIe-attached Thunderbolt/USB4 host interface driver= "); > MODULE_LICENSE("GPL"); [Severity: High] Does moving MODULE_DEVICE_TABLE(pci, nhi_ids) to thunderbolt_pci break existing module blacklists and initramfs configurations? kmod blacklist rules only suppress modalias matching for the named module, not loading it as a symbol dependency. On systems with "blacklist thunderbolt" in /etc/modprobe.d/ (for DMA attack mitigation), udev will now match PCIe NHI devices against thunderbolt_pci and load both modules anyway. In addition, initramfs setups or scripts that explicitly include or modprobe thunderbolt will no longer pull in thunderbolt_pci, leaving PCIe controllers unbound. Keeping the PCIe driver named thunderbolt and naming the extracted core module thunderbolt_core would preserve existing configurations. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261205083342.4009= 278-1-chunfeng.yun@mediatek.com?part=3D9