Skip to content

Commit 00df214

Browse files
khfengholtmann
authored andcommitted
Bluetooth: btrtl: Restore old logic to assume firmware is already loaded
Realtek bluetooth may not work after reboot: [ 12.446130] Bluetooth: hci0: RTL: rtl: unknown IC info, lmp subver a99e, hci rev 826c, hci ver 0008 This is a regression introduced by commit 26503ad ("Bluetooth: btrtl: split the device initialization into smaller parts"). The new logic errors out early when no matching IC info can be found, in this case it means the firmware is already loaded. So let's assume the firmware is already loaded when we can't find matching IC info, like the old logic did. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=201921 Fixes: 26503ad ("Bluetooth: btrtl: split the device initialization into smaller parts") Cc: [email protected] # 4.19+ Signed-off-by: Kai-Heng Feng <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
1 parent 1e4b6e9 commit 00df214

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

drivers/bluetooth/btrtl.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -552,10 +552,9 @@ struct btrtl_device_info *btrtl_initialize(struct hci_dev *hdev,
552552
hdev->bus);
553553

554554
if (!btrtl_dev->ic_info) {
555-
rtl_dev_err(hdev, "rtl: unknown IC info, lmp subver %04x, hci rev %04x, hci ver %04x",
555+
rtl_dev_info(hdev, "rtl: unknown IC info, lmp subver %04x, hci rev %04x, hci ver %04x",
556556
lmp_subver, hci_rev, hci_ver);
557-
ret = -EINVAL;
558-
goto err_free;
557+
return btrtl_dev;
559558
}
560559

561560
if (btrtl_dev->ic_info->has_rom_version) {
@@ -610,6 +609,11 @@ int btrtl_download_firmware(struct hci_dev *hdev,
610609
* standard btusb. Once that firmware is uploaded, the subver changes
611610
* to a different value.
612611
*/
612+
if (!btrtl_dev->ic_info) {
613+
rtl_dev_info(hdev, "rtl: assuming no firmware upload needed\n");
614+
return 0;
615+
}
616+
613617
switch (btrtl_dev->ic_info->lmp_subver) {
614618
case RTL_ROM_LMP_8723A:
615619
case RTL_ROM_LMP_3499:

0 commit comments

Comments
 (0)