summaryrefslogtreecommitdiffstats
path: root/drivers/bluetooth
diff options
context:
space:
mode:
authorKai-Heng Feng <kai.heng.feng@canonical.com>2019-01-27 03:33:59 -0500
committerMarcel Holtmann <marcel@holtmann.org>2019-01-28 07:23:59 -0500
commit00df214b1faae520880cc5c57e206f21239ef741 (patch)
tree58f94b7206cf2bf559230f4c3a21a5eccdb0a3d4 /drivers/bluetooth
parent1e4b6e91b46d26fdee2385f33a18115db2f0b490 (diff)
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 26503ad25de8 ("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: 26503ad25de8 ("Bluetooth: btrtl: split the device initialization into smaller parts") Cc: stable@vger.kernel.org # 4.19+ Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'drivers/bluetooth')
-rw-r--r--drivers/bluetooth/btrtl.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c
index 41405de27d66..c91bba00df4e 100644
--- a/drivers/bluetooth/btrtl.c
+++ b/drivers/bluetooth/btrtl.c
@@ -552,10 +552,9 @@ struct btrtl_device_info *btrtl_initialize(struct hci_dev *hdev,
552 hdev->bus); 552 hdev->bus);
553 553
554 if (!btrtl_dev->ic_info) { 554 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",
556 lmp_subver, hci_rev, hci_ver); 556 lmp_subver, hci_rev, hci_ver);
557 ret = -EINVAL; 557 return btrtl_dev;
558 goto err_free;
559 } 558 }
560 559
561 if (btrtl_dev->ic_info->has_rom_version) { 560 if (btrtl_dev->ic_info->has_rom_version) {
@@ -610,6 +609,11 @@ int btrtl_download_firmware(struct hci_dev *hdev,
610 * standard btusb. Once that firmware is uploaded, the subver changes 609 * standard btusb. Once that firmware is uploaded, the subver changes
611 * to a different value. 610 * to a different value.
612 */ 611 */
612 if (!btrtl_dev->ic_info) {
613 rtl_dev_info(hdev, "rtl: assuming no firmware upload needed\n");
614 return 0;
615 }
616
613 switch (btrtl_dev->ic_info->lmp_subver) { 617 switch (btrtl_dev->ic_info->lmp_subver) {
614 case RTL_ROM_LMP_8723A: 618 case RTL_ROM_LMP_8723A:
615 case RTL_ROM_LMP_3499: 619 case RTL_ROM_LMP_3499: