From: Hilda Wu Date: Wed, 30 Oct 2024 08:43:34 +0000 (+0800) Subject: Bluetooth: btrtl: Decrease HCI_OP_RESET timeout from 10 s to 2 s X-Git-Tag: v6.13-rc1~135^2~36^2~16 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2dc98ac1cb9ce8a8ab9967aaaf0abb3496e7fedb;p=thirdparty%2Flinux.git Bluetooth: btrtl: Decrease HCI_OP_RESET timeout from 10 s to 2 s 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 Signed-off-by: Luiz Augusto von Dentz --- diff --git a/drivers/bluetooth/btrtl.c b/drivers/bluetooth/btrtl.c index 0bcb44cf7b31d..83025f457ca04 100644 --- a/drivers/bluetooth/btrtl.c +++ b/drivers/bluetooth/btrtl.c @@ -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");