Module Name:    src
Committed By:   martin
Date:           Sun Aug 16 13:20:40 UTC 2009

Modified Files:
        src/sys/dev/usb: usbdi.h usbdi_util.c

Log Message:
Use a separately defined USBD_CONFIG_TIMEOUT when requesting a device
descriptor. I have a USB ATA device that spins up it's (removable) hard
disk and only returns the real descriptor if the disk is present - this
takes too long with the default 5 seconds timeout, so we were unable to
properly attach this device.


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/sys/dev/usb/usbdi.h
cvs rdiff -u -r1.51 -r1.52 src/sys/dev/usb/usbdi_util.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/usb/usbdi.h
diff -u src/sys/dev/usb/usbdi.h:1.77 src/sys/dev/usb/usbdi.h:1.78
--- src/sys/dev/usb/usbdi.h:1.77	Fri Dec 12 05:35:11 2008
+++ src/sys/dev/usb/usbdi.h	Sun Aug 16 13:20:40 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: usbdi.h,v 1.77 2008/12/12 05:35:11 jmorse Exp $	*/
+/*	$NetBSD: usbdi.h,v 1.78 2009/08/16 13:20:40 martin Exp $	*/
 /*	$FreeBSD: src/sys/dev/usb/usbdi.h,v 1.18 1999/11/17 22:33:49 n_hibma Exp $	*/
 
 /*
@@ -83,6 +83,7 @@
 
 #define USBD_NO_TIMEOUT 0
 #define USBD_DEFAULT_TIMEOUT 5000 /* ms = 5 s */
+#define	USBD_CONFIG_TIMEOUT  (3*USBD_DEFAULT_TIMEOUT)
 
 #if defined(__FreeBSD__)
 #define USB_CDEV_MAJOR 108

Index: src/sys/dev/usb/usbdi_util.c
diff -u src/sys/dev/usb/usbdi_util.c:1.51 src/sys/dev/usb/usbdi_util.c:1.52
--- src/sys/dev/usb/usbdi_util.c:1.51	Mon May 26 18:00:33 2008
+++ src/sys/dev/usb/usbdi_util.c	Sun Aug 16 13:20:40 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: usbdi_util.c,v 1.51 2008/05/26 18:00:33 drochner Exp $	*/
+/*	$NetBSD: usbdi_util.c,v 1.52 2009/08/16 13:20:40 martin Exp $	*/
 
 /*
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: usbdi_util.c,v 1.51 2008/05/26 18:00:33 drochner Exp $");
+__KERNEL_RCSID(0, "$NetBSD: usbdi_util.c,v 1.52 2009/08/16 13:20:40 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -68,7 +68,8 @@
 	USETW2(req.wValue, type, index);
 	USETW(req.wIndex, 0);
 	USETW(req.wLength, len);
-	return (usbd_do_request(dev, &req, desc));
+	return (usbd_do_request_flags(dev, &req, desc, 0, 0,
+	    USBD_CONFIG_TIMEOUT));
 }
 
 usbd_status

Reply via email to