Skip to content

Commit 55c0bd7

Browse files
Venkata Lakshmi Narayana Gubbaholtmann
authored andcommitted
Bluetooth: hci_qca: Fixed issue during suspend
If BT SoC is running with ROM FW then just return in qca_suspend function as ROM FW does not support in-band sleep. Fixes: 2be43ab ("Bluetooth: hci_qca: Wait for timeout during suspend") Signed-off-by: Venkata Lakshmi Narayana Gubba <[email protected]> Signed-off-by: Marcel Holtmann <[email protected]>
1 parent 234f414 commit 55c0bd7

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

drivers/bluetooth/hci_qca.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ enum qca_flags {
7777
QCA_MEMDUMP_COLLECTION,
7878
QCA_HW_ERROR_EVENT,
7979
QCA_SSR_TRIGGERED,
80-
QCA_BT_OFF
80+
QCA_BT_OFF,
81+
QCA_ROM_FW
8182
};
8283

8384
enum qca_capabilities {
@@ -1664,6 +1665,7 @@ static int qca_setup(struct hci_uart *hu)
16641665
if (ret)
16651666
return ret;
16661667

1668+
clear_bit(QCA_ROM_FW, &qca->flags);
16671669
/* Patch downloading has to be done without IBS mode */
16681670
set_bit(QCA_IBS_DISABLED, &qca->flags);
16691671

@@ -1721,12 +1723,14 @@ static int qca_setup(struct hci_uart *hu)
17211723
hu->hdev->cmd_timeout = qca_cmd_timeout;
17221724
} else if (ret == -ENOENT) {
17231725
/* No patch/nvm-config found, run with original fw/config */
1726+
set_bit(QCA_ROM_FW, &qca->flags);
17241727
ret = 0;
17251728
} else if (ret == -EAGAIN) {
17261729
/*
17271730
* Userspace firmware loader will return -EAGAIN in case no
17281731
* patch/nvm-config is found, so run with original fw/config.
17291732
*/
1733+
set_bit(QCA_ROM_FW, &qca->flags);
17301734
ret = 0;
17311735
}
17321736

@@ -2103,6 +2107,12 @@ static int __maybe_unused qca_suspend(struct device *dev)
21032107

21042108
set_bit(QCA_SUSPENDING, &qca->flags);
21052109

2110+
/* if BT SoC is running with default firmware then it does not
2111+
* support in-band sleep
2112+
*/
2113+
if (test_bit(QCA_ROM_FW, &qca->flags))
2114+
return 0;
2115+
21062116
/* During SSR after memory dump collection, controller will be
21072117
* powered off and then powered on.If controller is powered off
21082118
* during SSR then we should wait until SSR is completed.

0 commit comments

Comments
 (0)