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
..
2011-07-23 09:32:52 -05:00
2011-05-23 16:29:24 -04:00
2011-07-26 16:49:47 -07:00
2011-04-17 00:48:31 -07:00
2011-07-26 16:49:47 -07:00
2011-07-26 16:49:47 -07:00
2011-03-17 11:59:32 +11:00
2011-03-21 18:16:39 -07:00
2011-07-26 16:49:47 -07:00
2011-06-16 23:19:27 -04:00
2011-07-01 16:11:16 -07:00
2011-09-20 14:43:48 -04:00
2011-07-26 16:49:47 -07:00
2011-07-26 16:49:47 -07:00
2011-07-01 16:11:16 -07:00
2011-07-26 16:49:47 -07:00
2011-03-31 11:26:23 -03:00
2011-07-01 16:11:16 -07:00
2011-05-05 11:10:14 -07:00
2011-07-05 15:26:57 -04:00
2011-07-05 15:26:57 -04:00
2010-10-15 15:53:27 +02:00