]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
Bluetooth: Fix endless loop with HCI_QUIRK_RESET_ON_CLOSE
authorMarcel Holtmann <marcel@holtmann.org>
Fri, 11 Oct 2013 16:44:12 +0000 (09:44 -0700)
committerJohan Hedberg <johan.hedberg@intel.com>
Fri, 11 Oct 2013 17:48:11 +0000 (19:48 +0200)
commit3a6afbd2171a1e92c22d1a9eb54adf1474d938f1
tree560d79b246129fe8a386af774bec7cfefe71c6c9
parent14b49b9a49f0d80ef9a3ce7991b373f93016f5e4
Bluetooth: Fix endless loop with HCI_QUIRK_RESET_ON_CLOSE

Really early versions of the Bluetooth specification were unclear
with the behavior of HCI Reset for USB devices. They assumed that
also an USB reset needs to be issued. Later Bluetooth specifications
cleared this out and it is safe to call HCI Reset without affecting
the transport.

For old devices that misbehave, the HCI_QUIRK_RESET_ON_CLOSE quirk
was introduced to postpone the HCI Reset until the device was no
longer in use.

One of these devices is the Digianswer BPA-105 Bluetooth Protocol
Analyzer. The only problem now is that with the quirk set, the
HCI Reset is also executed at the end of the setup phase. So the
controller gets configured and then it disconnects from the USB
bus, connects again, gets configured and of course disconnects
again. This game goes on forever.

For devices that need HCI_QUIRK_RESET_ON_CLOSE it is important
that the HCI Reset is not executed after the setup phase. In
specific when HCI_AUTO_OFF is set, do not call HCI Reset when
closing the device.

Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
net/bluetooth/hci_core.c