diff options
author | David Herrmann | 2011-08-26 14:06:02 +0200 |
---|---|---|
committer | Gustavo F. Padovan | 2011-10-07 03:15:48 +0200 |
commit | 794d175698f0e78be7f2e3f4bdbe0e7cd3f2d6ae (patch) | |
tree | e96dcec6fc0ee32252ef51214348fa0066b1f637 /usr | |
parent | Bluetooth: EFS: add enable_hs kernel param (diff) | |
download | kernel-qcow2-linux-794d175698f0e78be7f2e3f4bdbe0e7cd3f2d6ae.tar.gz kernel-qcow2-linux-794d175698f0e78be7f2e3f4bdbe0e7cd3f2d6ae.tar.xz kernel-qcow2-linux-794d175698f0e78be7f2e3f4bdbe0e7cd3f2d6ae.zip |
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>
Diffstat (limited to 'usr')
0 files changed, 0 insertions, 0 deletions