Commit 58789a19 authored by Venkata Lakshmi Narayana Gubba's avatar Venkata Lakshmi Narayana Gubba Committed by Marcel Holtmann

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: d841502c ("Bluetooth: hci_qca: Collect controller memory dump during SSR")
Signed-off-by: default avatarVenkata Lakshmi Narayana Gubba <gubbaven@codeaurora.org>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent 4e8c36c3
...@@ -1668,6 +1668,8 @@ static int qca_setup(struct hci_uart *hu) ...@@ -1668,6 +1668,8 @@ static int qca_setup(struct hci_uart *hu)
bt_dev_info(hdev, "setting up %s", bt_dev_info(hdev, "setting up %s",
qca_is_wcn399x(soc_type) ? "wcn399x" : "ROME/QCA6390"); qca_is_wcn399x(soc_type) ? "wcn399x" : "ROME/QCA6390");
qca->memdump_state = QCA_MEMDUMP_IDLE;
retry: retry:
ret = qca_power_on(hdev); ret = qca_power_on(hdev);
if (ret) if (ret)
...@@ -1817,9 +1819,6 @@ static void qca_power_shutdown(struct hci_uart *hu) ...@@ -1817,9 +1819,6 @@ static void qca_power_shutdown(struct hci_uart *hu)
qca_flush(hu); qca_flush(hu);
spin_unlock_irqrestore(&qca->hci_ibs_lock, flags); spin_unlock_irqrestore(&qca->hci_ibs_lock, flags);
hu->hdev->hw_error = NULL;
hu->hdev->cmd_timeout = NULL;
/* Non-serdev device usually is powered by external power /* Non-serdev device usually is powered by external power
* and don't need additional action in driver for power down * and don't need additional action in driver for power down
*/ */
...@@ -1841,6 +1840,9 @@ static int qca_power_off(struct hci_dev *hdev) ...@@ -1841,6 +1840,9 @@ static int qca_power_off(struct hci_dev *hdev)
struct qca_data *qca = hu->priv; struct qca_data *qca = hu->priv;
enum qca_btsoc_type soc_type = qca_soc_type(hu); enum qca_btsoc_type soc_type = qca_soc_type(hu);
hu->hdev->hw_error = NULL;
hu->hdev->cmd_timeout = NULL;
/* Stop sending shutdown command if soc crashes. */ /* Stop sending shutdown command if soc crashes. */
if (soc_type != QCA_ROME if (soc_type != QCA_ROME
&& qca->memdump_state == QCA_MEMDUMP_IDLE) { && qca->memdump_state == QCA_MEMDUMP_IDLE) {
...@@ -1848,7 +1850,6 @@ static int qca_power_off(struct hci_dev *hdev) ...@@ -1848,7 +1850,6 @@ static int qca_power_off(struct hci_dev *hdev)
usleep_range(8000, 10000); usleep_range(8000, 10000);
} }
qca->memdump_state = QCA_MEMDUMP_IDLE;
qca_power_shutdown(hu); qca_power_shutdown(hu);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment