Bluetooth: Add ncmd=0 recovery handling
authorManish Mandlik <mmandlik@google.com>
Thu, 29 Apr 2021 17:24:22 +0000 (10:24 -0700)
committerMarcel Holtmann <marcel@holtmann.org>
Sat, 26 Jun 2021 05:12:27 +0000 (07:12 +0200)
commitde75cd0d9b2f3250d5f25846bb5632ccce6275f4
tree538b084560833bee3d1147cc7fd7d88c269f7b17
parent59f90f1351282ea2dbd0c59098fd9bb2634e920e
Bluetooth: Add ncmd=0 recovery handling

During command status or command complete event, the controller may set
ncmd=0 indicating that it is not accepting any more commands. In such a
case, host holds off sending any more commands to the controller. If the
controller doesn't recover from such condition, host will wait forever,
until the user decides that the Bluetooth is broken and may power cycles
the Bluetooth.

This patch triggers the hardware error to reset the controller and
driver when it gets into such state as there is no other wat out.

Reviewed-by: Abhishek Pandit-Subedi <abhishekpandit@chromium.org>
Signed-off-by: Manish Mandlik <mmandlik@google.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
include/net/bluetooth/hci.h
include/net/bluetooth/hci_core.h
net/bluetooth/hci_core.c
net/bluetooth/hci_event.c