[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1644566620-16748-1-git-send-email-zijuhu@codeaurora.org>
Date: Fri, 11 Feb 2022 16:03:40 +0800
From: Zijun Hu <zijuhu@...eaurora.org>
To: marcel@...tmann.org, johan.hedberg@...il.com, luiz.dentz@...il.com
Cc: linux-kernel@...r.kernel.org, linux-bluetooth@...r.kernel.org,
linux-arm-msm@...r.kernel.org, c-hbandi@...eaurora.org,
hemantg@...eaurora.org, rjliao@...eaurora.org,
zijuhu@...eaurora.org, tjiang@...eaurora.org,
Zijun Hu <quic_zijuhu@...cinc.com>
Subject: [PATCH v2] Bluetooth: btusb: Improve stability for QCA devices
From: Zijun Hu <quic_zijuhu@...cinc.com>
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 <quic_zijuhu@...cinc.com>
---
drivers/bluetooth/btusb.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index e03dfbd92fcc..20e36f53d2e7 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 improve stability.
+ */
+ 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
Powered by blists - more mailing lists