Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Bluetooth: btmtk: Remove the resetting step before downloading the fw

Remove the resetting step before downloading the fw, as it may cause
other usb devices to fail to initialise when connected during boot
on kernels 6.11 and newer.

Signed-off-by: Hao Qin <hao.qin@mediatek.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

authored by

Hao Qin and committed by
Luiz Augusto von Dentz
33634e2a bdbcd528

-10
-10
drivers/bluetooth/btmtk.c
··· 1330 1330 break; 1331 1331 case 0x7922: 1332 1332 case 0x7925: 1333 - /* Reset the device to ensure it's in the initial state before 1334 - * downloading the firmware to ensure. 1335 - */ 1336 - 1337 - if (!test_bit(BTMTK_FIRMWARE_LOADED, &btmtk_data->flags)) 1338 - btmtk_usb_subsys_reset(hdev, dev_id); 1339 - fallthrough; 1340 1333 case 0x7961: 1341 1334 btmtk_fw_get_filename(fw_bin_name, sizeof(fw_bin_name), dev_id, 1342 1335 fw_version, fw_flavor); ··· 1338 1345 btmtk_usb_hci_wmt_sync); 1339 1346 if (err < 0) { 1340 1347 bt_dev_err(hdev, "Failed to set up firmware (%d)", err); 1341 - clear_bit(BTMTK_FIRMWARE_LOADED, &btmtk_data->flags); 1342 1348 return err; 1343 1349 } 1344 - 1345 - set_bit(BTMTK_FIRMWARE_LOADED, &btmtk_data->flags); 1346 1350 1347 1351 /* It's Device EndPoint Reset Option Register */ 1348 1352 err = btmtk_usb_uhw_reg_write(hdev, MTK_EP_RST_OPT,