Skip to content

Commit 7c39342

Browse files
Hsin-chen ChuangVudentz
authored andcommitted
Bluetooth: Remove the cmd timeout count in btusb
Remove the cmd timeout count in btusb since we only ever allow one command in flight at a time. We should always reset after a single command times out. Signed-off-by: Hsin-chen Chuang <[email protected]> Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent acdbea5 commit 7c39342

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

drivers/bluetooth/btusb.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,6 @@ struct btusb_data {
890890
int (*disconnect)(struct hci_dev *hdev);
891891

892892
int oob_wake_irq; /* irq for out-of-band wake-on-bt */
893-
unsigned cmd_timeout_cnt;
894893

895894
struct qca_dump_info qca_dump;
896895
};
@@ -923,9 +922,6 @@ static void btusb_intel_cmd_timeout(struct hci_dev *hdev)
923922
struct gpio_desc *reset_gpio = data->reset_gpio;
924923
struct btintel_data *intel_data = hci_get_priv(hdev);
925924

926-
if (++data->cmd_timeout_cnt < 5)
927-
return;
928-
929925
if (intel_data->acpi_reset_method) {
930926
if (test_and_set_bit(INTEL_ACPI_RESET_ACTIVE, intel_data->flags)) {
931927
bt_dev_err(hdev, "acpi: last reset failed ? Not resetting again");
@@ -1008,9 +1004,6 @@ static void btusb_rtl_cmd_timeout(struct hci_dev *hdev)
10081004

10091005
btusb_rtl_alloc_devcoredump(hdev, &hdr, NULL, 0);
10101006

1011-
if (++data->cmd_timeout_cnt < 5)
1012-
return;
1013-
10141007
if (!reset_gpio) {
10151008
btusb_reset(hdev);
10161009
return;
@@ -1055,9 +1048,6 @@ static void btusb_qca_cmd_timeout(struct hci_dev *hdev)
10551048
return;
10561049
}
10571050

1058-
if (++data->cmd_timeout_cnt < 5)
1059-
return;
1060-
10611051
if (reset_gpio) {
10621052
bt_dev_err(hdev, "Reset qca device via bt_en gpio");
10631053

0 commit comments

Comments
 (0)