]> git.baikalelectronics.ru Git - kernel.git/commit
toshiba_bluetooth: Fix enabling/disabling loop on recent devices
authorAzael Avalos <coproscefalo@gmail.com>
Thu, 26 Mar 2015 20:56:07 +0000 (14:56 -0600)
committerDarren Hart <dvhart@linux.intel.com>
Thu, 26 Mar 2015 21:15:07 +0000 (14:15 -0700)
commit57648d8f53d5a9a6621d4abe79d8e9c5cdb8f63b
tree29e1ef432d822450feb13cdc5a28761f5d2cb6c4
parente5365ae0998b5f9b0be05587b231be7475dc903a
toshiba_bluetooth: Fix enabling/disabling loop on recent devices

Bug 93911 reported a broken handling of the BT device, causing the
driver to get stuck in a loop enabling/disabling the device whenever
the device is deactivated by the kill switch as follows:

1. The user activated the kill switch, causing the system to generate
   a 0x90 (status change) event and disabling the BT device.
2. The driver catches the event and re-enables the BT device.
3. The system detects the device being activated, but since the kill
   switch is activated, disables the BT device (again) and generates
   a 0x90 event (again).
4. Repeat from 2.

This patch adds an extra check to verify the status of the BT device,
returning silently if it is already activated.

Also, checks and returns appropriate error values while evaluating
the AUSB and BTPO methods.

Signed-off-by: Azael Avalos <coproscefalo@gmail.com>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
drivers/platform/x86/toshiba_bluetooth.c