Skip to contentSkip to conversation

Bluetooth: hci_qca: Not send vendor pre-shutdown command for QCA Rome

PATCH In review Rocky Liao 2 participants 2 messages Feb 29, 2020 – Mar 1, 2020

Subsystems (3)
lore
Share & tools
lore

Rocky Liao

author
#0 lore raw

PATCH 1/1 Bluetooth: hci_qca: Not send vendor pre-shutdown command for QCA Rome

QCA Rome doesn't support the pre-shutdown vendor hci command, this patch will check the soc type in qca_power_off() and only send this command for wcn399x.

Fixes ae563183b647 ("Bluetooth: hci_qca: Enable power off/on support during hci down/up for QCA Rome")
---
 drivers/bluetooth/hci_qca.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/bluetooth/hci_qca.c +3 -1
index 1e4d6118d9bf..bf436d6e638e 100644
@@ -1759,9 +1759,11 @@ static int qca_power_off(struct hci_dev *hdev)
 {
 	struct hci_uart *hu = hci_get_drvdata(hdev);
 	struct qca_data *qca = hu->priv;
+	enum qca_btsoc_type soc_type = qca_soc_type(hu);
 
 	/* Stop sending shutdown command if soc crashes. */
-	if (qca->memdump_state == QCA_MEMDUMP_IDLE) {
+	if (qca_is_wcn399x(soc_type)
+		&& qca->memdump_state == QCA_MEMDUMP_IDLE) {
 		qca_send_pre_shutdown_cmd(hdev);
 		usleep_range(8000, 10000);
 	}
Signature · 1 line
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project
maintainer
#1 lore raw

Hi Rocky,

Quoted 9 lines

QCA Rome doesn't support the pre-shutdown vendor hci command, this patch will check the soc type in qca_power_off() and only send this command for wcn399x.

Fixes ae563183b647 ("Bluetooth: hci_qca: Enable power off/on support during hci down/up for QCA Rome")

---
drivers/bluetooth/hci_qca.c | 4 +++-

1 file changed, 3 insertions(+), 1 deletion(-)

patch has been applied to bluetooth-next tree.

Regards

Marcel