Skip to content

Commit 79a4479

Browse files
jhovoldgregkh
authored andcommitted
USB: iowarrior: fix control-message timeouts
USB control-message timeouts are specified in milliseconds and should specifically not vary with CONFIG_HZ. Use the common control-message timeout define for the five-second timeout and drop the driver-specific one. Fixes: 946b960 ("USB: add driver for iowarrior devices.") Cc: [email protected] # 2.6.21 Signed-off-by: Johan Hovold <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent ebcf652 commit 79a4479

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

drivers/usb/misc/iowarrior.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,6 @@ struct iowarrior {
9999
/* globals */
100100
/*--------------*/
101101

102-
/*
103-
* USB spec identifies 5 second timeouts.
104-
*/
105-
#define GET_TIMEOUT 5
106102
#define USB_REQ_GET_REPORT 0x01
107103
//#if 0
108104
static int usb_get_report(struct usb_device *dev,
@@ -114,7 +110,7 @@ static int usb_get_report(struct usb_device *dev,
114110
USB_DIR_IN | USB_TYPE_CLASS |
115111
USB_RECIP_INTERFACE, (type << 8) + id,
116112
inter->desc.bInterfaceNumber, buf, size,
117-
GET_TIMEOUT*HZ);
113+
USB_CTRL_GET_TIMEOUT);
118114
}
119115
//#endif
120116

@@ -129,7 +125,7 @@ static int usb_set_report(struct usb_interface *intf, unsigned char type,
129125
USB_TYPE_CLASS | USB_RECIP_INTERFACE,
130126
(type << 8) + id,
131127
intf->cur_altsetting->desc.bInterfaceNumber, buf,
132-
size, HZ);
128+
size, 1000);
133129
}
134130

135131
/*---------------------*/

0 commit comments

Comments
 (0)