The delays we use in our USB stack are typically larger than the values 
mentioned in the offcial specs to:

/* Allow for marginal (i.e. non-conforming) devices. */

It seems though that at least the USB_PORT_ROOT_RESET_DELAY is too
large and upsets the USB touchpanel on the Sony UX91S, resuting in:

uhub2: device problem, disabling port 1

Reducing the delay makes the device appear:

uhidev0 at uhub2 port 1 configuration 1 interface 0 "GUNZE USB Touch Panel" rev 
2.00/1.00 addr 2
uhidev0: iclass 3/1
ums0 at uhidev0: 3 buttons
wsmouse1 at ums0 mux 0

I've done some experimentation; 150 ms is still ok, but 200 ms isn't.
Linux uses only 50 ms here, so I settled for 100 ms to make sure that
if we tsleep slightly longer we don't run into problems.

Obviously this diff can't go in until after release.  But if this
fixes a significant number of devices, we might consider a temporary
hack.

So please test, especially on systems where USB works fine!


Index: usb.h
===================================================================
RCS file: /cvs/src/sys/dev/usb/usb.h,v
retrieving revision 1.36
diff -u -p -r1.36 usb.h
--- usb.h       15 Jan 2011 23:58:43 -0000      1.36
+++ usb.h       27 Feb 2011 21:24:12 -0000
@@ -511,7 +511,7 @@ typedef struct {
 #else
 /* Allow for marginal (i.e. non-conforming) devices. */
 #define USB_PORT_RESET_DELAY   50  /* ms */
-#define USB_PORT_ROOT_RESET_DELAY 250  /* ms */
+#define USB_PORT_ROOT_RESET_DELAY 100  /* ms */
 #define USB_PORT_RESET_RECOVERY        250  /* ms */
 #define USB_PORT_POWERUP_DELAY 300 /* ms */
 #define USB_SET_ADDRESS_SETTLE 10  /* ms */

Reply via email to