FROMGIT: 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 <chharry@chromium.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>

Bug: 376104075
(cherry picked from commit 7c393421755daf35ae1e4e0016b99f308123751a
 https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master)
Change-Id: I052b90c91001412f71a6fdab829cbda27088faf0
Signed-off-by: Hsin-chen Chuang <chharry@google.com>
This commit is contained in:
Hsin-chen Chuang
2025-01-08 20:24:42 +08:00
committed by Neill Kapron
parent dc0a3182a9
commit 6bbb857470
-10
View File
@@ -873,7 +873,6 @@ struct btusb_data {
int (*disconnect)(struct hci_dev *hdev);
int oob_wake_irq; /* irq for out-of-band wake-on-bt */
unsigned cmd_timeout_cnt;
struct qca_dump_info qca_dump;
};
@@ -906,9 +905,6 @@ static void btusb_intel_cmd_timeout(struct hci_dev *hdev)
struct gpio_desc *reset_gpio = data->reset_gpio;
struct btintel_data *intel_data = hci_get_priv(hdev);
if (++data->cmd_timeout_cnt < 5)
return;
if (intel_data->acpi_reset_method) {
if (test_and_set_bit(INTEL_ACPI_RESET_ACTIVE, intel_data->flags)) {
bt_dev_err(hdev, "acpi: last reset failed ? Not resetting again");
@@ -991,9 +987,6 @@ static void btusb_rtl_cmd_timeout(struct hci_dev *hdev)
btusb_rtl_alloc_devcoredump(hdev, &hdr, NULL, 0);
if (++data->cmd_timeout_cnt < 5)
return;
if (!reset_gpio) {
btusb_reset(hdev);
return;
@@ -1038,9 +1031,6 @@ static void btusb_qca_cmd_timeout(struct hci_dev *hdev)
return;
}
if (++data->cmd_timeout_cnt < 5)
return;
if (reset_gpio) {
bt_dev_err(hdev, "Reset qca device via bt_en gpio");