When the SSR (Sub-System Restart) duration exceeds 2 seconds, it triggers host tx_idle_timeout, which sets host TX state to sleep. due to the hardware pulling up bt_en, the firmware is not downloaded after the SSR. As a result, the controller does not enter sleep mode. Consequently, when the host sends a command afterward, it sends 0xFD to the controller, but the controller does not respond, leading to a command timeout. So reset tx_idle_timer after SSR to prevent host enter TX IBS_Sloeep mode. Signed-off-by: Shuai Zhang <quic_shuaz@xxxxxxxxxxx> --- drivers/bluetooth/hci_qca.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c index 1f7c1d621..660be5e11 100644 --- a/drivers/bluetooth/hci_qca.c +++ b/drivers/bluetooth/hci_qca.c @@ -1669,6 +1669,15 @@ static void qca_hw_error(struct hci_dev *hdev, u8 code) if (!test_bit(HCI_QUIRK_NON_PERSISTENT_SETUP, &hdev->quirks)) { clear_bit(QCA_SSR_TRIGGERED, &qca->flags); clear_bit(QCA_IBS_DISABLED, &qca->flags); + /* + * When the SSR (Sub-System Restart) duration exceeds 2 seconds, + * it triggers host tx_idle_delay, which sets host TX state + * to sleep. Reset tx_idle_timer after SSR to prevent + * host enter TX IBS_Sloeep mode. + */ + mod_timer(&qca->tx_idle_timer, jiffies + + msecs_to_jiffies(qca->tx_idle_delay)); + qca->tx_ibs_state = HCI_IBS_TX_AWAKE; qca->memdump_state = QCA_MEMDUMP_IDLE; msleep(50); -- 2.34.1