The patch titled ipaq.c timing parameters has been added to the -mm tree. Its filename is ipaqc-timing-parameters.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: ipaq.c timing parameters From: Frank Gevaerts <frank.gevaerts@xxxxxx> Adds configurable waiting periods to the ipaq connection code. These are not needed when the pocketpc device is running normally when plugged in, but they need extra delays if they are physically connected while rebooting. There are two parameters : * initial_wait : this is the delay before the driver attemts to start the connection. This is needed because the pocktpc device takes much longer to boot if the driver starts sending control packets too soon. * connect_retries : this is the number of times the control urb is retried before finally giving up. The patch also adds a 1 second delay between retries. I'm not sure if the cases where this patch is useful are general enough to include this in the kernel. Signed-off-by: Frank Gevaerts <frank.gevaerts@xxxxxx> Cc: Greg KH <greg@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- drivers/usb/serial/ipaq.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff -puN drivers/usb/serial/ipaq.c~ipaqc-timing-parameters drivers/usb/serial/ipaq.c --- a/drivers/usb/serial/ipaq.c~ipaqc-timing-parameters +++ a/drivers/usb/serial/ipaq.c @@ -71,6 +71,8 @@ static __u16 product, vendor; static int debug; +static int connect_retries = KP_RETRIES; +static int initial_wait; /* Function prototypes for an ipaq */ static int ipaq_open (struct usb_serial_port *port, struct file *filp); @@ -583,7 +585,7 @@ static int ipaq_open(struct usb_serial_p struct ipaq_private *priv; struct ipaq_packet *pkt; int i, result = 0; - int retries = KP_RETRIES; + int retries = connect_retries; dbg("%s - port %d", __FUNCTION__, port->number); @@ -647,6 +649,7 @@ static int ipaq_open(struct usb_serial_p port->read_urb->transfer_buffer_length = URBDATA_SIZE; port->bulk_out_size = port->write_urb->transfer_buffer_length = URBDATA_SIZE; + msleep(1000*initial_wait); /* Start reading from the device */ usb_fill_bulk_urb(port->read_urb, serial->dev, usb_rcvbulkpipe(serial->dev, port->bulk_in_endpointAddress), @@ -673,6 +676,7 @@ static int ipaq_open(struct usb_serial_p } return 0; } + msleep(1000); } err("%s - failed doing control urb, error %d", __FUNCTION__, result); goto error; @@ -968,3 +972,9 @@ MODULE_PARM_DESC(vendor, "User specified module_param(product, ushort, 0); MODULE_PARM_DESC(product, "User specified USB idProduct"); + +module_param(connect_retries, int, S_IRUGO|S_IWUSR); +MODULE_PARM_DESC(connect_retries, "Maximum number of connect retries (100ms each)"); + +module_param(initial_wait, int, S_IRUGO|S_IWUSR); +MODULE_PARM_DESC(initial_wait, "Time to wait before attempting a connection (in seconds)"); _ Patches currently in -mm which might be from frank.gevaerts@xxxxxx are ipaqc-bugfixes.patch ipaqc-timing-parameters.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html