HID: wiimote: wake up if output queue failed
authorDavid Herrmann <dh.herrmann@gmail.com>
Sun, 5 May 2013 21:12:50 +0000 (23:12 +0200)
committerJiri Kosina <jkosina@suse.cz>
Mon, 3 Jun 2013 09:07:00 +0000 (11:07 +0200)
commitd758b1f0c527aedc5e83a565a0737d9ac21ea46a
tree20707221091b2e594df2e18a164d94ccf2e05490
parent6b80bb94dc61a7f702df13c6c7e8edee331d0a9a
HID: wiimote: wake up if output queue failed

Our output queue is asynchronous but synchronous reports may wait for a
response to their request. Therefore, wake them up unconditionally if an
output report couldn't be sent. But keep the report ID intact so we don't
incorrectly assume our request succeeded.

Note that the underlying connection is required to be reliable and does
retransmission itself. So it is safe to assume that if the transmission
fails, the device is in inconsistent state. Hence, we abort every request
if any output report fails. No need to verify which report failed.

Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-wiimote-core.c
drivers/hid/hid-wiimote.h