linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: btmtk: add USB dependencies
@ 2024-07-19 10:05 Arnd Bergmann
  2024-07-19 10:34 ` bluez.test.bot
  2024-07-19 15:08 ` [PATCH] " Luiz Augusto von Dentz
  0 siblings, 2 replies; 4+ messages in thread
From: Arnd Bergmann @ 2024-07-19 10:05 UTC (permalink / raw)
  To: Marcel Holtmann, Luiz Augusto von Dentz, Matthias Brugger,
	AngeloGioacchino Del Regno, Sean Wang
  Cc: Arnd Bergmann, Sven Peter, Tedd Ho-Jeong An, Hector Martin,
	Krzysztof Kozlowski, Niklas Schnelle, linux-bluetooth,
	linux-kernel, linux-arm-kernel, linux-mediatek

From: Arnd Bergmann <arnd@arndb.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@arndb.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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* RE: Bluetooth: btmtk: add USB dependencies
  2024-07-19 10:05 [PATCH] Bluetooth: btmtk: add USB dependencies Arnd Bergmann
@ 2024-07-19 10:34 ` bluez.test.bot
  2024-07-19 15:08 ` [PATCH] " Luiz Augusto von Dentz
  1 sibling, 0 replies; 4+ messages in thread
From: bluez.test.bot @ 2024-07-19 10:34 UTC (permalink / raw)
  To: linux-bluetooth, arnd

[-- Attachment #1: Type: text/plain, Size: 2177 bytes --]

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list.
This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=872493

---Test result---

Test Summary:
CheckPatch                    FAIL      0.88 seconds
GitLint                       PASS      0.31 seconds
SubjectPrefix                 PASS      0.12 seconds
BuildKernel                   PASS      29.64 seconds
CheckAllWarning               PASS      32.00 seconds
CheckSparse                   PASS      37.68 seconds
CheckSmatch                   PASS      101.93 seconds
BuildKernel32                 PASS      28.50 seconds
TestRunnerSetup               PASS      525.23 seconds
TestRunner_l2cap-tester       PASS      22.27 seconds
TestRunner_iso-tester         PASS      32.67 seconds
TestRunner_bnep-tester        PASS      4.85 seconds
TestRunner_mgmt-tester        PASS      113.03 seconds
TestRunner_rfcomm-tester      PASS      7.46 seconds
TestRunner_sco-tester         PASS      15.01 seconds
TestRunner_ioctl-tester       PASS      7.97 seconds
TestRunner_mesh-tester        PASS      5.99 seconds
TestRunner_smp-tester         PASS      6.95 seconds
TestRunner_userchan-tester    PASS      5.07 seconds
IncrementalBuild              PASS      27.55 seconds

Details
##############################
Test: CheckPatch - FAIL
Desc: Run checkpatch.pl script
Output:
Bluetooth: btmtk: add USB dependencies
WARNING: Prefer a maximum 75 chars per line (possible unwrapped commit description?)
#79: 
ERROR: modpost: "usb_kill_anchored_urbs" [drivers/bluetooth/btmtk.ko] undefined!

total: 0 errors, 1 warnings, 21 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

/github/workspace/src/src/13737152.patch has style problems, please review.

NOTE: Ignored message types: UNKNOWN_COMMIT_ID

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.




---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Bluetooth: btmtk: add USB dependencies
  2024-07-19 10:05 [PATCH] Bluetooth: btmtk: add USB dependencies Arnd Bergmann
  2024-07-19 10:34 ` bluez.test.bot
@ 2024-07-19 15:08 ` Luiz Augusto von Dentz
  2024-07-19 15:21   ` Arnd Bergmann
  1 sibling, 1 reply; 4+ messages in thread
From: Luiz Augusto von Dentz @ 2024-07-19 15:08 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Marcel Holtmann, Matthias Brugger, AngeloGioacchino Del Regno,
	Sean Wang, Arnd Bergmann, Sven Peter, Tedd Ho-Jeong An,
	Hector Martin, Krzysztof Kozlowski, Niklas Schnelle,
	linux-bluetooth, linux-kernel, linux-arm-kernel, linux-mediatek

Hi Arnd,

On Fri, Jul 19, 2024 at 6:06 AM Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.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@arndb.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

Thanks for the fix, but we went with a different one:
https://patchwork.kernel.org/project/bluetooth/patch/20240719033019.26767-1-chris.lu@mediatek.com/

-- 
Luiz Augusto von Dentz

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] Bluetooth: btmtk: add USB dependencies
  2024-07-19 15:08 ` [PATCH] " Luiz Augusto von Dentz
@ 2024-07-19 15:21   ` Arnd Bergmann
  0 siblings, 0 replies; 4+ messages in thread
From: Arnd Bergmann @ 2024-07-19 15:21 UTC (permalink / raw)
  To: Luiz Augusto von Dentz, Arnd Bergmann
  Cc: Marcel Holtmann, Matthias Brugger, AngeloGioacchino Del Regno,
	Sean Wang, Sven Peter, Tedd Ho-Jeong An, Hector Martin,
	Krzysztof Kozlowski, Niklas Schnelle, linux-bluetooth,
	linux-kernel, linux-arm-kernel, linux-mediatek

On Fri, Jul 19, 2024, at 17:08, Luiz Augusto von Dentz wrote:
> On Fri, Jul 19, 2024 at 6:06 AM Arnd Bergmann <arnd@kernel.org> wrote:
>
> Thanks for the fix, but we went with a different one:
> https://patchwork.kernel.org/project/bluetooth/patch/20240719033019.26767-1-chris.lu@mediatek.com/

I thought about doing that at first, but I believe this is still
broken for a configuration with CONFIG_USB=m, CONFIG_BT_HCIBTUSB=m,
CONFIG_MMC=y, CONFIG_BT_MTKSDIO=y. I haven't tried this, but I
think this should result in a CONFIG_BT_MTK=y with the common
module being built-in but unable to link against the USB module.

      Arnd

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-07-19 15:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-19 10:05 [PATCH] Bluetooth: btmtk: add USB dependencies Arnd Bergmann
2024-07-19 10:34 ` bluez.test.bot
2024-07-19 15:08 ` [PATCH] " Luiz Augusto von Dentz
2024-07-19 15:21   ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).