Bluetooth: btusb: Cancel sync commands for certain URB errors
authorBenjamin Berg <bberg@redhat.com>
Fri, 3 Dec 2021 14:59:02 +0000 (15:59 +0100)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fri, 3 Dec 2021 18:41:59 +0000 (10:41 -0800)
commitc97a747efc93f94a4ad6c707972dfbf8d774edf9
tree9b720088b82a16bfcabb17ed8bb529091f7e1ba8
parent2250abadd3508d6961f1aa56cf8cff59f0196cb8
Bluetooth: btusb: Cancel sync commands for certain URB errors

Cancel sync commands when transmission of URBs fail. This is done for
both failures to send a command URB and also when the interrupt URB used
to retrieve a response fails.

This approach is sufficient to quickly deal with certain errors such as
a device being disconnected while synchronous commands are done during
initialization.

Signed-off-by: Benjamin Berg <bberg@redhat.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
drivers/bluetooth/btusb.c