summaryrefslogtreecommitdiffstats
path: root/net/bluetooth
diff options
context:
space:
mode:
authorRajat Jain <rajatja@google.com>2019-01-24 15:28:13 -0800
committerMarcel Holtmann <marcel@holtmann.org>2019-01-25 08:46:32 +0100
commite2bef3847e3d0d57dcf316de50c4b1a5a91816b7 (patch)
tree8eddb66db738fac8ad032bb9785de06256beaec5 /net/bluetooth
parentb4dfbbd1803d81b51bf2c47b182a7029b476d8e2 (diff)
downloadlinux-e2bef3847e3d0d57dcf316de50c4b1a5a91816b7.tar.bz2
Bluetooth: Allow driver specific cmd timeout handling
Add a hook to allow the BT driver to do device or command specific handling in case of timeouts. This is to be used by Intel driver to reset the device after certain number of timeouts. Signed-off-by: Rajat Jain <rajatja@google.com> Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Diffstat (limited to 'net/bluetooth')
-rw-r--r--net/bluetooth/hci_core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c
index 7352fe85674b..75793265ba9e 100644
--- a/net/bluetooth/hci_core.c
+++ b/net/bluetooth/hci_core.c
@@ -2578,6 +2578,9 @@ static void hci_cmd_timeout(struct work_struct *work)
bt_dev_err(hdev, "command tx timeout");
}
+ if (hdev->cmd_timeout)
+ hdev->cmd_timeout(hdev);
+
atomic_set(&hdev->cmd_cnt, 1);
queue_work(hdev->workqueue, &hdev->cmd_work);
}