Bluetooth: hci_qca: check for SSR triggered flag while suspend
authorVenkata Lakshmi Narayana Gubba <gubbaven@codeaurora.org>
Tue, 2 Feb 2021 14:57:42 +0000 (20:27 +0530)
committerMarcel Holtmann <marcel@holtmann.org>
Tue, 2 Feb 2021 16:18:44 +0000 (17:18 +0100)
QCA_IBS_DISABLED flag will be set after memorydump started from
controller.Currently qca_suspend() is waiting for SSR to complete
based on flag QCA_IBS_DISABLED.Added to check for QCA_SSR_TRIGGERED
flag too.

Fixes: 2be43abac5a8 ("Bluetooth: hci_qca: Wait for timeout during suspend")
Signed-off-by: Venkata Lakshmi Narayana Gubba <gubbaven@codeaurora.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
drivers/bluetooth/hci_qca.c

index 17a3859326dc7ff652b3bc9c8f1b90272d4f0a08..ff2fb68a45b1e6558263f104114f77f6a2c10bd6 100644 (file)
@@ -2111,7 +2111,8 @@ static int __maybe_unused qca_suspend(struct device *dev)
            !test_bit(QCA_SSR_TRIGGERED, &qca->flags))
                return 0;
 
-       if (test_bit(QCA_IBS_DISABLED, &qca->flags)) {
+       if (test_bit(QCA_IBS_DISABLED, &qca->flags) ||
+           test_bit(QCA_SSR_TRIGGERED, &qca->flags)) {
                wait_timeout = test_bit(QCA_SSR_TRIGGERED, &qca->flags) ?
                                        IBS_DISABLE_SSR_TIMEOUT_MS :
                                        FW_DOWNLOAD_TIMEOUT_MS;