]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
Bluetooth: btmtk: Remove the resetting step before downloading the fw
authorHao Qin <hao.qin@mediatek.com>
Sat, 15 Mar 2025 02:27:30 +0000 (10:27 +0800)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 25 Mar 2025 16:51:10 +0000 (12:51 -0400)
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>
drivers/bluetooth/btmtk.c

index 68846c5bd4f794442436937f295766cbab625ca4..4390fd571dbd15f10879e810479bdde122b4a8fa 100644 (file)
@@ -1330,13 +1330,6 @@ int btmtk_usb_setup(struct hci_dev *hdev)
                break;
        case 0x7922:
        case 0x7925:
-               /* Reset the device to ensure it's in the initial state before
-                * downloading the firmware to ensure.
-                */
-
-               if (!test_bit(BTMTK_FIRMWARE_LOADED, &btmtk_data->flags))
-                       btmtk_usb_subsys_reset(hdev, dev_id);
-               fallthrough;
        case 0x7961:
                btmtk_fw_get_filename(fw_bin_name, sizeof(fw_bin_name), dev_id,
                                      fw_version, fw_flavor);
@@ -1345,12 +1338,9 @@ int btmtk_usb_setup(struct hci_dev *hdev)
                                                btmtk_usb_hci_wmt_sync);
                if (err < 0) {
                        bt_dev_err(hdev, "Failed to set up firmware (%d)", err);
-                       clear_bit(BTMTK_FIRMWARE_LOADED, &btmtk_data->flags);
                        return err;
                }
 
-               set_bit(BTMTK_FIRMWARE_LOADED, &btmtk_data->flags);
-
                /* It's Device EndPoint Reset Option Register */
                err = btmtk_usb_uhw_reg_write(hdev, MTK_EP_RST_OPT,
                                              MTK_EP_RST_IN_OUT_OPT);