aboutsummaryrefslogtreecommitdiff
path: root/drivers/hid/usbhid/usbhid.h
diff options
context:
space:
mode:
authorOliver Neukum <oliver@neukum.org>2010-02-12 13:02:28 +0100
committerJiri Kosina <jkosina@suse.cz>2010-02-12 13:07:51 +0100
commit858155fbcc0cd713f6382c527bb1c3abc0ed6d00 (patch)
tree1b7c93ba35985e96b23b3ba0977e3fdd976fc45d /drivers/hid/usbhid/usbhid.h
parentc8a8602b76b6703df1243e31be01cf0e4451e4a6 (diff)
HID: usbhid: introduce timeout for stuck ctrl/out URBs
Some devices do not react to a control request (seen on APC UPS's) resulting in a slow stream of messages, "generic-usb ... control queue full". Therefore request needs a timeout. Cc: stable@kernel.org Signed-off-by: Oliver Neukum <oliver@neukum.org> Signed-off-by: David Fries <david@fries.net> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/usbhid/usbhid.h')
-rw-r--r--drivers/hid/usbhid/usbhid.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/hid/usbhid/usbhid.h b/drivers/hid/usbhid/usbhid.h
index 08f505ca2e3..ec20400c7f2 100644
--- a/drivers/hid/usbhid/usbhid.h
+++ b/drivers/hid/usbhid/usbhid.h
@@ -80,12 +80,14 @@ struct usbhid_device {
unsigned char ctrlhead, ctrltail; /* Control fifo head & tail */
char *ctrlbuf; /* Control buffer */
dma_addr_t ctrlbuf_dma; /* Control buffer dma */
+ unsigned long last_ctrl; /* record of last output for timeouts */
struct urb *urbout; /* Output URB */
struct hid_output_fifo out[HID_CONTROL_FIFO_SIZE]; /* Output pipe fifo */
unsigned char outhead, outtail; /* Output pipe fifo head & tail */
char *outbuf; /* Output buffer */
dma_addr_t outbuf_dma; /* Output buffer dma */
+ unsigned long last_out; /* record of last output for timeouts */
spinlock_t lock; /* fifo spinlock */
unsigned long iofl; /* I/O flags (CTRL_RUNNING, OUT_RUNNING) */