public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/1] Bluetooth: btmtk: add USB autopm support to btmtk_usb_setup()
@ 2026-03-24 10:34 Alberto Garcia
  2026-03-24 10:34 ` [RFC PATCH 1/1] " Alberto Garcia
  0 siblings, 1 reply; 3+ messages in thread
From: Alberto Garcia @ 2026-03-24 10:34 UTC (permalink / raw)
  To: linux-bluetooth
  Cc: Alberto Garcia, Marcel Holtmann, Luiz Augusto von Dentz,
	Matthias Brugger, AngeloGioacchino Del Regno

Hello,

I've been having problems with the btmtk bluetooth driver for a long
time. What happens is a failure during initialization and the loading
of the firmware, with errors like these:

   kernel: Bluetooth: hci0: Failed to get device id (-108)
   kernel: Bluetooth: hci0: Failed to get fw version (-108)

The device is MediaTek MT7921 (0489:e0cd), there are more details in
this bug report:

   https://bugzilla.kernel.org/show_bug.cgi?id=217475

Passing btusb.enable_autosuspend=n seems to solve the problem for me.
My computer's hard drive is encrypted so it can take a long time
before the bluetooth firmware is loaded, so I interpret that this
causes the device to autosuspend during boot and that's why
initialization fails. Does that make sense?

I saw that commit 67dba2c28fe0 fixed similar errors during shutdown by
using usb_autopm_get_interface() so I tried the same approach for the
btusb_mtk_setup() function. I confirm that this solves the problem for
me and with this patch the bluetooth adapter works reliably.

I was also suggested to try the simpler approach of using setup_on_usb
instead:

        if (IS_ENABLED(CONFIG_BT_HCIBTUSB_MTK) &&
            (id->driver_info & BTUSB_MEDIATEK)) {
-               hdev->setup = btusb_mtk_setup;
+               data->setup_on_usb = btusb_mtk_setup;
                hdev->shutdown = btusb_mtk_shutdown;
                hdev->manufacturer = 70;

However this does not solve the problem:

   kernel: usbcore: registered new interface driver btusb
   kernel: Bluetooth: hci0: HW/SW Version: 0x008a008a, Build Time: 20241106151414
   kernel: Bluetooth: hci0: Execution of wmt command timed out
   kernel: Bluetooth: hci0: Failed to send wmt patch dwnld (-110)
   kernel: Bluetooth: hci0: Failed to set up firmware (-110)

So I would like to know if a patch like the one I'm sending is a good
approach or if I should try something else.

Regards,

Berto

Alberto Garcia (1):
  Bluetooth: btmtk: add USB autopm support to btmtk_usb_setup()

 drivers/bluetooth/btmtk.c | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

-- 
2.47.3


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

end of thread, other threads:[~2026-03-24 11:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-24 10:34 [RFC PATCH 0/1] Bluetooth: btmtk: add USB autopm support to btmtk_usb_setup() Alberto Garcia
2026-03-24 10:34 ` [RFC PATCH 1/1] " Alberto Garcia
2026-03-24 11:06   ` bluez.test.bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox