Skip to content

Commit 58789a1

Browse files
Venkata Lakshmi Narayana Gubbaholtmann
authored andcommitted
Bluetooth: hci_qca: Stop collecting memdump again for command timeout during SSR
Setting memdump state to idle prior to setting of callback function pointer for command timeout to NULL,causing the issue.Now moved the initialisation of memdump state to qca_setup(). Fixes: d841502 ("Bluetooth: hci_qca: Collect controller memory dump during SSR") Signed-off-by: Venkata Lakshmi Narayana Gubba <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
1 parent 4e8c36c commit 58789a1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

drivers/bluetooth/hci_qca.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1668,6 +1668,8 @@ static int qca_setup(struct hci_uart *hu)
16681668
bt_dev_info(hdev, "setting up %s",
16691669
qca_is_wcn399x(soc_type) ? "wcn399x" : "ROME/QCA6390");
16701670

1671+
qca->memdump_state = QCA_MEMDUMP_IDLE;
1672+
16711673
retry:
16721674
ret = qca_power_on(hdev);
16731675
if (ret)
@@ -1817,9 +1819,6 @@ static void qca_power_shutdown(struct hci_uart *hu)
18171819
qca_flush(hu);
18181820
spin_unlock_irqrestore(&qca->hci_ibs_lock, flags);
18191821

1820-
hu->hdev->hw_error = NULL;
1821-
hu->hdev->cmd_timeout = NULL;
1822-
18231822
/* Non-serdev device usually is powered by external power
18241823
* and don't need additional action in driver for power down
18251824
*/
@@ -1841,14 +1840,16 @@ static int qca_power_off(struct hci_dev *hdev)
18411840
struct qca_data *qca = hu->priv;
18421841
enum qca_btsoc_type soc_type = qca_soc_type(hu);
18431842

1843+
hu->hdev->hw_error = NULL;
1844+
hu->hdev->cmd_timeout = NULL;
1845+
18441846
/* Stop sending shutdown command if soc crashes. */
18451847
if (soc_type != QCA_ROME
18461848
&& qca->memdump_state == QCA_MEMDUMP_IDLE) {
18471849
qca_send_pre_shutdown_cmd(hdev);
18481850
usleep_range(8000, 10000);
18491851
}
18501852

1851-
qca->memdump_state = QCA_MEMDUMP_IDLE;
18521853
qca_power_shutdown(hu);
18531854
return 0;
18541855
}

0 commit comments

Comments
 (0)