[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openbsd-tech
Subject:    Re: USB port reset delay
From:       "Francois B." <fuzz () imaginatif ! org>
Date:       2011-02-28 17:43:59
Message-ID: 20110228174359.GA495 () purple ! imaginatif ! org
[Download RAW message or body]

 I'm using a similar diff since january.
 This fix an issue with my mouse where I need to unplug the mouse then
 plug it back in another port to get it working.

 http://cosmos.imaginatif.org/junk/patch-usb.h

 This problem still exist in -current.

 uhidev0 at uhub1 port 4 configuration 1 interface 0 "Microsoft Microsoft Basic \
Optical Mouse" rev 1.10/1.04 addr 2  uhidev0: iclass 3/1
 ums0 at uhidev0: 3 buttons, Z dir
 wsmouse0 at ums0 mux 0

 fb

On Sun, Feb 27, 2011 at 10:30:02PM +0100, Mark Kettenis wrote:
> 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 */


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic