diff options
author | Jiri Kosina <jkosina@suse.cz> | 2009-08-20 12:04:14 +0200 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2009-08-20 12:04:14 +0200 |
commit | affbb8c6e690be2196258e65f3cc92d55b18d9fa (patch) | |
tree | 10c2faa61d2e824bc89f48cbe9f811056928c811 /drivers/hid/usbhid/hiddev.c | |
parent | 52cfc61bf95262d55bc00063d7597e5e008fa22e (diff) | |
download | talos-obmc-linux-affbb8c6e690be2196258e65f3cc92d55b18d9fa.tar.gz talos-obmc-linux-affbb8c6e690be2196258e65f3cc92d55b18d9fa.zip |
HID: support larger reports than 64 bytes in hiddev
hiddev userspace driver uses a rignbuffer to store the parsed usages
that should be returned through read(). This buffer is 64 bytes long,
which is sufficient for queueing single USB 1.0 low-speed report, which
is of maximum size 48 bytes.
There are however USB HID devices which are full-speed USB devices, and
therefore they are free to produce reports 64 bytes long. This is correctly
handled by HID core, but read() on hiddev node gets stuck forever, because
the ring buffer loops infinitely (as it is exactly 64 bytes long as well),
never advancing the buffer pointer.
Plus, the core driver is ready to handle highspeed devices, so we should be
able to handle reports from such devices in the hiddev driver as well, which
means we need larger ringbuffer.
Reported-by: Michael Zeisel <michael.zeisel@philips.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/usbhid/hiddev.c')
-rw-r--r-- | drivers/hid/usbhid/hiddev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/usbhid/hiddev.c b/drivers/hid/usbhid/hiddev.c index 215b2addddbb..4d1dc0cf1401 100644 --- a/drivers/hid/usbhid/hiddev.c +++ b/drivers/hid/usbhid/hiddev.c @@ -44,7 +44,7 @@ #define HIDDEV_MINOR_BASE 96 #define HIDDEV_MINORS 16 #endif -#define HIDDEV_BUFFER_SIZE 64 +#define HIDDEV_BUFFER_SIZE 2048 struct hiddev { int exist; |