android_kernel_motorola_sm6225/net/bluetooth/hidp
David Herrmann 794d175698 Bluetooth: hidp: Stop I/O on shutdown
Current hidp driver purges the in/out queue on HID shutdown, but does
not prevent further I/O. If a driver uses hidp_output_raw_report or
hidp_get_raw_report during shutdown, the driver hangs for 5 or 10
seconds per call until it gets a timeout.
That is, if the output queue of an HID driver has 10 messages pending,
it will take 50s until hid_destroy_device() will return. The
hidp_session_sem semaphore is held during shutdown so no other HID
device may be added/removed during this time.

This patch makes hidp_output_raw_report and hidp_get_raw_report fail if
session->terminate is true. Also hidp_session will wakeup all current
calls to these functions to cancel the current operations.

We already purge the current I/O queues on hidp_stop(), so this data loss
does not change the behaviour of the HID drivers.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
2011-10-06 22:15:48 -03:00
..
core.c Bluetooth: hidp: Stop I/O on shutdown 2011-10-06 22:15:48 -03:00
hidp.h Bluetooth: Fix hidp disconnect deadlocks and lost wakeup 2011-06-30 15:47:50 -03:00
Kconfig Bluetooth: fix hidp kconfig dependency warning 2010-11-09 00:55:27 -02:00
Makefile Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sock.c Bluetooth: Fix checkpatch errors, code style issues and typos in hidp 2011-03-31 14:22:56 -03:00