diff options
author | Oliver Neukum <oliver@neukum.org> | 2010-02-12 13:02:28 +0100 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2010-02-12 13:07:51 +0100 |
commit | 858155fbcc0cd713f6382c527bb1c3abc0ed6d00 (patch) | |
tree | 1b7c93ba35985e96b23b3ba0977e3fdd976fc45d /drivers/hid/usbhid/usbhid.h | |
parent | c8a8602b76b6703df1243e31be01cf0e4451e4a6 (diff) | |
download | blackbird-op-linux-858155fbcc0cd713f6382c527bb1c3abc0ed6d00.tar.gz blackbird-op-linux-858155fbcc0cd713f6382c527bb1c3abc0ed6d00.zip |
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.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/hid/usbhid/usbhid.h b/drivers/hid/usbhid/usbhid.h index 08f505ca2e3d..ec20400c7f29 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) */ |