Re: [PATCH 8/9] usb: Increase root hub reset signaling time to prevent retry

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 16 Aug 2017, Mathias Nyman wrote:

> Save 80ms device enumeration time by increasing root hub port reset time
> 
> The 50ms reset signaling time is not enough for most root hub ports.
> Increasing the reset time to 60ms allows host controllers to finish port
> reset and removes a retry causing an extra 50ms delay.
> 
> The USB 2 specification requires "at least 50ms" for driving root
> port reset. The current msleep is exactly 50ms which may not be
> enough if there are any delays between writing the reset bit to host
> controller portsc register and phy actually driving reset.
> 
> On Haswell, Skylake and Kabylake xHC port reset took in average 52-59ms
> 
> The 80ms improvement comes from (40ms * 2 port resets) save at enumeration
> for each device connected to a root hub port.
> 
> more details about root port reset in USB2 section 7.1.7.5:.
> "Software must ensure that resets issued to the root ports drive reset
> long enough to overwhelm any concurrent resume attempts by downstream
> devices. It is required that resets from root ports have a duration of
> at least 50 ms (TDRSTR).
> 
> Cc: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Mathias Nyman <mathias.nyman@xxxxxxxxxxxxxxx>
> ---
>  drivers/usb/core/hub.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
> index e53308c..41eaf0b 100644
> --- a/drivers/usb/core/hub.c
> +++ b/drivers/usb/core/hub.c
> @@ -2614,7 +2614,7 @@ static unsigned hub_is_wusb(struct usb_hub *hub)
>  #define SET_CONFIG_TRIES	(2 * (use_both_schemes + 1))
>  #define USE_NEW_SCHEME(i)	((i) / 2 == (int)old_scheme_first)
>  
> -#define HUB_ROOT_RESET_TIME	50	/* times are in msec */
> +#define HUB_ROOT_RESET_TIME	60	/* times are in msec */
>  #define HUB_SHORT_RESET_TIME	10
>  #define HUB_BH_RESET_TIME	50
>  #define HUB_LONG_RESET_TIME	200

Acked-by: Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux