All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 1/3] Bluetooth: Remove the cmd timeout count in btusb
@ 2025-01-08 12:24 Hsin-chen Chuang
  2025-01-08 12:24 ` [PATCH v3 2/3] Bluetooth: Get rid of cmd_timeout and use the reset callback Hsin-chen Chuang
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Hsin-chen Chuang @ 2025-01-08 12:24 UTC (permalink / raw)
  To: linux-bluetooth, luiz.dentz
  Cc: chromeos-bluetooth-upstreaming, Hsin-chen Chuang, Marcel Holtmann,
	linux-kernel

From: Hsin-chen Chuang <chharry@chromium.org>

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>
---

(no changes since v1)

 drivers/bluetooth/btusb.c | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index de0b4d99fcbf..916e9ec7bc85 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -881,7 +881,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;
 };
@@ -914,9 +913,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");
@@ -999,9 +995,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;
@@ -1046,9 +1039,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");
 
-- 
2.47.1.613.gc27f4b7a9f-goog


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-01-14 17:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-08 12:24 [PATCH v3 1/3] Bluetooth: Remove the cmd timeout count in btusb Hsin-chen Chuang
2025-01-08 12:24 ` [PATCH v3 2/3] Bluetooth: Get rid of cmd_timeout and use the reset callback Hsin-chen Chuang
2025-01-08 12:24 ` [PATCH v3 3/3] Bluetooth: Allow reset via sysfs Hsin-chen Chuang
2025-01-08 13:17 ` [v3,1/3] Bluetooth: Remove the cmd timeout count in btusb bluez.test.bot
2025-01-14 17:20 ` [PATCH v3 1/3] " patchwork-bot+bluetooth

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.