2022-02-11 09:09:43

by Zijun Hu

[permalink] [raw]
Subject: [PATCH v1] Bluetooth: btusb: Improve stability for QCA devices

From: Zijun Hu <[email protected]>

Controller will reset after NVM is downloaded for QCA
device, so wait a moment for reset Done then go ahead
to improve stability.

Signed-off-by: Zijun Hu <[email protected]>
---
drivers/bluetooth/btusb.c | 5 +++++
1 file changed, 5 insertions(+)

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index e03dfbd92fcc..0ec2f17fe1d3 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -2994,6 +2994,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
@@ -3320,6 +3321,10 @@ static int btusb_setup_qca(struct hci_dev *hdev)
err = btusb_setup_qca_load_nvm(hdev, &ver, info);
if (err < 0)
return err;
+ /* Controller will reset after NVM is downloaded, so wait a moment
+ * for reset Done, it will prevent controller from potential crash.
+ */
+ msleep(QCA_BT_RESET_WAIT_MS);
}

return 0;
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project



2022-02-11 19:51:08

by bluez.test.bot

[permalink] [raw]
Subject: RE: [v1] Bluetooth: btusb: Improve stability for QCA devices

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=613386

---Test result---

Test Summary:
CheckPatch PASS 1.57 seconds
GitLint PASS 1.01 seconds
SubjectPrefix PASS 0.88 seconds
BuildKernel PASS 30.36 seconds
BuildKernel32 PASS 26.71 seconds
Incremental Build with patchesPASS 36.33 seconds
TestRunner: Setup PASS 470.65 seconds
TestRunner: l2cap-tester PASS 13.51 seconds
TestRunner: bnep-tester PASS 6.11 seconds
TestRunner: mgmt-tester PASS 104.12 seconds
TestRunner: rfcomm-tester PASS 7.75 seconds
TestRunner: sco-tester PASS 7.73 seconds
TestRunner: smp-tester PASS 7.61 seconds
TestRunner: userchan-tester PASS 6.49 seconds



---
Regards,
Linux Bluetooth