]> git.baikalelectronics.ru Git - kernel.git/commit
HID: wacom: Have wacom_{get,set}_report retry on -EAGAIN, not -EPIPE
authorJason Gerecke <killertofu@gmail.com>
Thu, 21 May 2015 17:44:31 +0000 (10:44 -0700)
committerJiri Kosina <jkosina@suse.cz>
Thu, 21 May 2015 19:37:38 +0000 (21:37 +0200)
commitc73b8299098f07354e9af6650a8f440614a6bca0
tree8d1ffb28198e4597e346717be6531c7e2e973772
parent0d757a7fab85bd33e2b0e98665d8a7f2d0b28075
HID: wacom: Have wacom_{get,set}_report retry on -EAGAIN, not -EPIPE

Retrying on -EPIPE makes very little sense since this typically indicates
a problem that will not just disappear on its own. For instance, the USB
documentation states that it will be sent if the endpoint is stalled or
the device has disconnected. Instead, we should retry if -EAGAIN is
received since this indicates a temporary error condition such as a busy
bus.

In addition to adjusting the conditions we retry under, we also log an
error on failure so that we can be aware of what's going on.

Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/wacom_sys.c