[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210119124258.2.I52cc5d2b62fdeb5f3c5249d41f3631ae25d8dc71@changeid>
Date: Tue, 19 Jan 2021 12:43:13 -0800
From: Abhishek Pandit-Subedi <abhishekpandit@...omium.org>
To: marcel@...tmann.org
Cc: chromeos-bluetooth-upstreaming@...omium.org, mcchou@...omium.org,
michaelfsun@...gle.com, linux-bluetooth@...r.kernel.org,
apusaka@...omium.org,
Abhishek Pandit-Subedi <abhishekpandit@...omium.org>,
Daniel Winkler <danielwinkler@...gle.com>,
Johan Hedberg <johan.hedberg@...il.com>,
Luiz Augusto von Dentz <luiz.dentz@...il.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH 2/3] Bluetooth: btusb: Trigger gpio reset quicker
Currently, btusb will only trigger gpio reset during cmd_timeout after
5 commands fail. This number is arbitrarily large and can result in
resets taking longer to occur than necessary.
Reduce this number to 3, which was chosen as a recommended value by
Intel (their firmware allow two commands in flight so they recommend
resetting on the third failed command).
Signed-off-by: Abhishek Pandit-Subedi <abhishekpandit@...omium.org>
Reviewed-by: Miao-chen Chou <mcchou@...omium.org>
Reviewed-by: Daniel Winkler <danielwinkler@...gle.com>
---
drivers/bluetooth/btusb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c
index 03341e6cbf3ed..880e9cd4ee713 100644
--- a/drivers/bluetooth/btusb.c
+++ b/drivers/bluetooth/btusb.c
@@ -578,7 +578,7 @@ static void btusb_gpio_cmd_timeout(struct hci_dev *hdev)
{
struct btusb_data *data = hci_get_drvdata(hdev);
- if (++data->cmd_timeout_cnt < 5)
+ if (++data->cmd_timeout_cnt < 3)
return;
if (!data->reset_gpio) {
--
2.30.0.284.gd98b1dd5eaa7-goog
Powered by blists - more mailing lists