Skip to contentSkip to conversation

Bluetooth: btusb: Improve stability for QCA devices

PATCH In review Zijun Hu 3 participants 3 messages Feb 14, 2022

Subsystems (2)
lore
Share & tools
lore

Zijun Hu

author
#0 lore raw

PATCH v4 1/1 Bluetooth: btusb: Improve stability for QCA devices

From: Zijun Hu <[email protected]>

WCN6855 2.1 will reset to apply firmware downloaded, so wait a moment for reset done then go ahead to improve stability.

---
 drivers/bluetooth/btusb.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/bluetooth/btusb.c +8 -0
index ef5d52f0e123..9e0d59d4382a 100644
@@ -2999,6 +2999,7 @@ static int btusb_set_bdaddr_wcn6855(struct hci_dev *hdev,
 #define QCA_PATCH_UPDATED	0x80
 #define QCA_DFU_TIMEOUT		3000
 #define QCA_FLAG_MULTI_NVM      0x80
+#define QCA_BT_RESET_WAIT_MS    100
 
 #define WCN6855_2_0_RAM_VERSION_GF 0x400c1200
 #define WCN6855_2_1_RAM_VERSION_GF 0x400c1211
@@ -3325,6 +3326,13 @@ static int btusb_setup_qca(struct hci_dev *hdev)
 		err = btusb_setup_qca_load_nvm(hdev, &ver, info);
 		if (err < 0)
 			return err;
+
+		/* WCN6855 2.1 will reset to apply firmware downloaded here, so
+		 * wait ~100ms for reset Done then go ahead, otherwise, it maybe
+		 * cause potential enable failure.
+		 */
+		if (info->rom_version == 0x00130201)
+			msleep(QCA_BT_RESET_WAIT_MS);
 	}
 
 	return 0;
Signature · 1 line
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
#1 lore raw

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=614068

---Test result---

Test Summary:

CheckPatch                    PASS      1.61 seconds
GitLint                       PASS      1.05 seconds
SubjectPrefix                 PASS      0.88 seconds
BuildKernel                   PASS      36.37 seconds
BuildKernel32                 PASS      31.22 seconds
Incremental Build with patchesPASS      43.51 seconds
TestRunner: Setup             PASS      554.81 seconds
TestRunner: l2cap-tester      PASS      15.77 seconds
TestRunner: bnep-tester       PASS      7.42 seconds
TestRunner: mgmt-tester       PASS      118.55 seconds
TestRunner: rfcomm-tester     PASS      9.07 seconds
TestRunner: sco-tester        PASS      9.27 seconds
TestRunner: smp-tester        PASS      9.31 seconds
TestRunner: userchan-tester   PASS      7.51 seconds

---
Regards,
Linux Bluetooth

maintainer
#2 lore raw
In reply to Zijun Hu

Hi Zijun,

Quoted 7 lines

WCN6855 2.1 will reset to apply firmware downloaded, so wait a moment for reset done then go ahead to improve stability.

---
drivers/bluetooth/btusb.c | 8 ++++++++

1 file changed, 8 insertions(+)

patch has been applied to bluetooth-next tree.

Regards

Marcel