[X/Y/Z,2/2] Bluetooth: btbcm: Add a delay for module reset

Submitted by Jesse Sung on March 15, 2017, 10:35 a.m.

Details

Message ID 1489574158-23064-2-git-send-email-jesse.sung@canonical.com
State New
Headers show

Commit Message

Jesse Sung March 15, 2017, 10:35 a.m.
BugLink: https://launchpad.net/bugs/1483101

Some btbcm devices require more time to complete its reset process.
They won't reply any hci command until reset is done.

[ 17.218554] Bluetooth: hci0 command 0x1001 tx timeout
[ 25.214999] Bluetooth: hci0: BCM: Reading local version info failed (-110)

Signed-off-by: Wen-chien Jesse Sung <jesse.sung@canonical.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
(cherry picked from commit 3af3a594e111474fab03d872f41760e10d4c17c4)
Signed-off-by: Wen-chien Jesse Sung <jesse.sung@canonical.com>
---
 drivers/bluetooth/btbcm.c | 3 +++
 1 file changed, 3 insertions(+)

Patch hide | download patch | download mbox

diff --git a/drivers/bluetooth/btbcm.c b/drivers/bluetooth/btbcm.c
index 0b69794..c631238 100644
--- a/drivers/bluetooth/btbcm.c
+++ b/drivers/bluetooth/btbcm.c
@@ -178,6 +178,9 @@  static int btbcm_reset(struct hci_dev *hdev)
 	}
 	kfree_skb(skb);
 
+	/* 100 msec delay for module to complete reset process */
+	msleep(100);
+
 	return 0;
 }