Commit a0c38245 authored by Loic Poulain's avatar Loic Poulain Committed by Marcel Holtmann

Bluetooth: hci_intel: Use shorter timeout for HCI commands

Use the standard HCI_CMD_TIMEOUT(1s) for HCI command instead of
HCI_INIT_TIMEOUT(10s) which is not justified in these cases.
Signed-off-by: default avatarLoic Poulain <loic.poulain@intel.com>
Signed-off-by: default avatarMarcel Holtmann <marcel@holtmann.org>
parent e6e981c7
...@@ -502,7 +502,7 @@ static int intel_set_baudrate(struct hci_uart *hu, unsigned int speed) ...@@ -502,7 +502,7 @@ static int intel_set_baudrate(struct hci_uart *hu, unsigned int speed)
/* Device will not accept speed change if Intel version has not been /* Device will not accept speed change if Intel version has not been
* previously requested. * previously requested.
*/ */
skb = __hci_cmd_sync(hdev, 0xfc05, 0, NULL, HCI_INIT_TIMEOUT); skb = __hci_cmd_sync(hdev, 0xfc05, 0, NULL, HCI_CMD_TIMEOUT);
if (IS_ERR(skb)) { if (IS_ERR(skb)) {
bt_dev_err(hdev, "Reading Intel version information failed (%ld)", bt_dev_err(hdev, "Reading Intel version information failed (%ld)",
PTR_ERR(skb)); PTR_ERR(skb));
...@@ -590,7 +590,7 @@ static int intel_setup(struct hci_uart *hu) ...@@ -590,7 +590,7 @@ static int intel_setup(struct hci_uart *hu)
* is in bootloader mode or if it already has operational firmware * is in bootloader mode or if it already has operational firmware
* loaded. * loaded.
*/ */
skb = __hci_cmd_sync(hdev, 0xfc05, 0, NULL, HCI_INIT_TIMEOUT); skb = __hci_cmd_sync(hdev, 0xfc05, 0, NULL, HCI_CMD_TIMEOUT);
if (IS_ERR(skb)) { if (IS_ERR(skb)) {
bt_dev_err(hdev, "Reading Intel version information failed (%ld)", bt_dev_err(hdev, "Reading Intel version information failed (%ld)",
PTR_ERR(skb)); PTR_ERR(skb));
...@@ -671,7 +671,7 @@ static int intel_setup(struct hci_uart *hu) ...@@ -671,7 +671,7 @@ static int intel_setup(struct hci_uart *hu)
/* Read the secure boot parameters to identify the operating /* Read the secure boot parameters to identify the operating
* details of the bootloader. * details of the bootloader.
*/ */
skb = __hci_cmd_sync(hdev, 0xfc0d, 0, NULL, HCI_INIT_TIMEOUT); skb = __hci_cmd_sync(hdev, 0xfc0d, 0, NULL, HCI_CMD_TIMEOUT);
if (IS_ERR(skb)) { if (IS_ERR(skb)) {
bt_dev_err(hdev, "Reading Intel boot parameters failed (%ld)", bt_dev_err(hdev, "Reading Intel boot parameters failed (%ld)",
PTR_ERR(skb)); PTR_ERR(skb));
...@@ -881,7 +881,7 @@ static int intel_setup(struct hci_uart *hu) ...@@ -881,7 +881,7 @@ static int intel_setup(struct hci_uart *hu)
set_bit(STATE_BOOTING, &intel->flags); set_bit(STATE_BOOTING, &intel->flags);
skb = __hci_cmd_sync(hdev, 0xfc01, sizeof(reset_param), reset_param, skb = __hci_cmd_sync(hdev, 0xfc01, sizeof(reset_param), reset_param,
HCI_INIT_TIMEOUT); HCI_CMD_TIMEOUT);
if (IS_ERR(skb)) if (IS_ERR(skb))
return PTR_ERR(skb); return PTR_ERR(skb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment