Re: [PATCH] [RFC] USB: hub.c: Add the retry count module parameter for usbcore

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

 



On Thu, Aug 06, 2020 at 05:43:54AM +0000, Asano, Yasushi (ADITJ/SWG) wrote:
> Dear Alan
> Dear Greg
> 
> Thank you for your feedback.
> I really appreciate your concrete proposal.
> 
> > So let's change the code to do 3 tries with each scheme.
> I understood. I will try to modify it so that the number of 
> attempts will decrease. It is 6 attempts in total both old and 
> new schemes, but msleep is executed at various places in 
> hub_port_connect and hub_port_init. apart from a timeout.
>  
> For example, msleep(100) is executed every time in the loop of 
> GET_DESCRIPTOR_TRIES[8] of new scheme. and In the old scheme, 
> msleep(200) is executed in the loop of SET_ADDRESS_TRIES[10].
> From my measurement, it does not subside within 30 seconds, 
> but it is around 32 seconds.
> 
> From these things, I would like you to reconsider the number of attempts. 
> Is it OK to set the new scheme to 3 times and the old scheme to 
> 2 times(no change as it is)? In other words 
> 
> [plan 1]
> 3 * new scheme, then 2 * old scheme, or else
> 2 * old scheme, then 3 * new_scheme,
> depending on the old_scheme_first parameter.

Yes, that's all right.  Although you might want to make the second case 
be: 3 * old scheme, then 2 * new scheme.

> Also, although it is a "better plan", the original processing is in the following.
> 
> 6 * new scheme, then 6 * new scheme, 
> then 2 * old scheme, then 2 * old scheme
> 
> if it will be modified from above to below, It seems that the structure 
> of the loop has to be greatly revised. I think.
> 
> 2 * new scheme, then 2 * old scheme, 
> then 1 * new scheme, then 1 * old scheme

If you want to use only five attempts, you'll have to get rid of the 
last one.

> The fix is likely to be large, so Can I proceed with a patch in plan 1?

Okay.

Alan Stern

> I will post the patch after confirming the behavior of the patch with 
> the customer board with the PET tool. please give me a little time.
> 
> Best Regards
> Yasushi Asano



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

  Powered by Linux