lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240719100554.4183635-1-arnd@kernel.org>
Date: Fri, 19 Jul 2024 12:05:45 +0200
From: Arnd Bergmann <arnd@...nel.org>
To: Marcel Holtmann <marcel@...tmann.org>,
	Luiz Augusto von Dentz <luiz.dentz@...il.com>,
	Matthias Brugger <matthias.bgg@...il.com>,
	AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
	Sean Wang <sean.wang@...iatek.com>
Cc: Arnd Bergmann <arnd@...db.de>,
	Sven Peter <sven@...npeter.dev>,
	Tedd Ho-Jeong An <tedd.an@...el.com>,
	Hector Martin <marcan@...can.st>,
	Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
	Niklas Schnelle <schnelle@...ux.ibm.com>,
	linux-bluetooth@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org,
	linux-mediatek@...ts.infradead.org
Subject: [PATCH] Bluetooth: btmtk: add USB dependencies

From: Arnd Bergmann <arnd@...db.de>

The mediatek bluetooth drivers have a common portion that is now used for
all front-ends (usb, sdio, uart) but that internally relies on USB
interface functions:

ERROR: modpost: "usb_alloc_urb" [drivers/bluetooth/btmtk.ko] undefined!
ERROR: modpost: "usb_anchor_urb" [drivers/bluetooth/btmtk.ko] undefined!
ERROR: modpost: "usb_submit_urb" [drivers/bluetooth/btmtk.ko] undefined!
ERROR: modpost: "usb_free_urb" [drivers/bluetooth/btmtk.ko] undefined!
ERROR: modpost: "usb_unanchor_urb" [drivers/bluetooth/btmtk.ko] undefined!
ERROR: modpost: "usb_kill_anchored_urbs" [drivers/bluetooth/btmtk.ko] undefined!
ERROR: modpost: "usb_set_interface" [drivers/bluetooth/btmtk.ko] undefined!
ERROR: modpost: "usb_control_msg" [drivers/bluetooth/btmtk.ko] undefined!

It would be possible to split this up further, but in practice anything
that uses this driver will have USB enabled anyway and it only matters
for build testing, so just go with a much stricter dependency.

Fixes: f5c3f98946e3 ("Bluetooth: btmtkuart: rely on BT_MTK module")
Fixes: 3a722044aacf ("Bluetooth: btmtksido: rely on BT_MTK module")
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
 drivers/bluetooth/Kconfig | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/bluetooth/Kconfig b/drivers/bluetooth/Kconfig
index 44a2de58337b..2894a345562c 100644
--- a/drivers/bluetooth/Kconfig
+++ b/drivers/bluetooth/Kconfig
@@ -21,6 +21,7 @@ config BT_QCA
 
 config BT_MTK
 	tristate
+	depends on USB
 	select FW_LOADER
 
 config BT_HCIBTUSB
@@ -413,6 +414,7 @@ config BT_ATH3K
 config BT_MTKSDIO
 	tristate "MediaTek HCI SDIO driver"
 	depends on MMC
+	depends on USB
 	select BT_MTK
 	help
 	  MediaTek Bluetooth HCI SDIO driver.
@@ -425,6 +427,7 @@ config BT_MTKSDIO
 config BT_MTKUART
 	tristate "MediaTek HCI UART driver"
 	depends on SERIAL_DEV_BUS
+	depends on USB
 	select BT_MTK
 	help
 	  MediaTek Bluetooth HCI UART driver.
-- 
2.39.2


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ