linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alan Stern <stern@rowland.harvard.edu>
To: "Asano, Yasushi \(ADITJ/SWG\)" <yasano@jp.adit-jv.com>
Cc: Yasushi Asano <yazzep@gmail.com>,
	"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"Rosca, Eugeniu \(ADITG/ESM1\)" <erosca@de.adit-jv.com>,
	"andrew_gabbasov@mentor.com" <andrew_gabbasov@mentor.com>,
	"jim_baxter@mentor.com" <jim_baxter@mentor.com>,
	"Natsume, Wataru \(ADITJ/SWG\)" <wnatsume@jp.adit-jv.com>,
	"Nishiguchi, Naohiro \(ADITJ/SWG\)" <nnishiguchi@jp.adit-jv.com>
Subject: Re: [PATCH] [RFC] USB: hub.c: Add the retry count module parameter for usbcore
Date: Thu, 6 Aug 2020 11:10:16 -0400	[thread overview]
Message-ID: <20200806151016.GB197575@rowland.harvard.edu> (raw)
In-Reply-To: <589E8CD8BC4E4743ADCA659B6BADC9710BD43DB7@ky0exch01.adit-jv.com>

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

  reply	other threads:[~2020-08-06 16:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-30 10:42 [PATCH] [RFC] USB: hub.c: Add the retry count module parameter for usbcore Yasushi Asano
2020-07-31  6:44 ` Greg KH
2020-08-03 18:37 ` Alan Stern
2020-08-06  5:43   ` Asano, Yasushi (ADITJ/SWG)
2020-08-06 15:10     ` Alan Stern [this message]
2020-08-08  6:57       ` [PATCH] [RFC] USB: hub.c: decrease the number of attempts of enumeration scheme Yasushi Asano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200806151016.GB197575@rowland.harvard.edu \
    --to=stern@rowland.harvard.edu \
    --cc=andrew_gabbasov@mentor.com \
    --cc=erosca@de.adit-jv.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jim_baxter@mentor.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=nnishiguchi@jp.adit-jv.com \
    --cc=wnatsume@jp.adit-jv.com \
    --cc=yasano@jp.adit-jv.com \
    --cc=yazzep@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).