Skip to content

Commit

Permalink
[PATCH] USB: ftdi_sio: fix a couple of timeouts
Browse files Browse the repository at this point in the history
ftdi_sio: Fix timeouts in a couple of usb_control_msg() calls due to
change of units from jiffies to milliseconds in 2.6.12.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Ian Abbott authored and Linus Torvalds committed Jul 29, 2005
1 parent 74ede0f commit 279e154
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/usb/serial/ftdi_sio.c
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,7 @@ static struct usb_serial_device_type ftdi_sio_device = {


#define WDR_TIMEOUT 5000 /* default urb timeout */
#define WDR_SHORT_TIMEOUT 1000 /* shorter urb timeout */

/* High and low are for DTR, RTS etc etc */
#define HIGH 1
Expand Down Expand Up @@ -681,7 +682,7 @@ static int change_speed(struct usb_serial_port *port)
FTDI_SIO_SET_BAUDRATE_REQUEST,
FTDI_SIO_SET_BAUDRATE_REQUEST_TYPE,
urb_value, urb_index,
buf, 0, 100);
buf, 0, WDR_SHORT_TIMEOUT);

kfree(buf);
return rv;
Expand Down Expand Up @@ -1786,7 +1787,7 @@ static void ftdi_set_termios (struct usb_serial_port *port, struct termios *old_
FTDI_SIO_SET_DATA_REQUEST,
FTDI_SIO_SET_DATA_REQUEST_TYPE,
urb_value , priv->interface,
buf, 0, 100) < 0) {
buf, 0, WDR_SHORT_TIMEOUT) < 0) {
err("%s FAILED to set databits/stopbits/parity", __FUNCTION__);
}

Expand Down

0 comments on commit 279e154

Please sign in to comment.