]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
Bluetooth: btrtl: Decrease HCI_OP_RESET timeout from 10 s to 2 s
authorHilda Wu <hildawu@realtek.com>
Wed, 30 Oct 2024 08:43:34 +0000 (16:43 +0800)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Thu, 14 Nov 2024 20:35:57 +0000 (15:35 -0500)
The original timeout setting for HCI Reset on shutdown is 10 seconds.
HCI Reset shouldn't take 10 seconds to complete so instead use the
default timeout for commands.

Signed-off-by: Hilda Wu <hildawu@realtek.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
drivers/bluetooth/btrtl.c

index 0bcb44cf7b31d7d0c2d2a17f3576806fbaf28a9b..83025f457ca044a30d7837f29b1b341b68df565b 100644 (file)
@@ -1371,7 +1371,7 @@ int btrtl_shutdown_realtek(struct hci_dev *hdev)
        /* According to the vendor driver, BT must be reset on close to avoid
         * firmware crash.
         */
-       skb = __hci_cmd_sync(hdev, HCI_OP_RESET, 0, NULL, HCI_INIT_TIMEOUT);
+       skb = __hci_cmd_sync(hdev, HCI_OP_RESET, 0, NULL, HCI_CMD_TIMEOUT);
        if (IS_ERR(skb)) {
                ret = PTR_ERR(skb);
                bt_dev_err(hdev, "HCI reset during shutdown failed");