linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yasushi Asano <yazzep@gmail.com>
To: stern@rowland.harvard.edu, gregkh@linuxfoundation.org
Cc: linux-usb@vger.kernel.org, erosca@de.adit-jv.com,
	andrew_gabbasov@mentor.com, jim_baxter@mentor.com,
	wnatsume@jp.adit-jv.com, nnishiguchi@jp.adit-jv.com,
	yasano@jp.adit-jv.com
Subject: [PATCH] [RFC] USB: hub.c: decrease the number of attempts of enumeration scheme
Date: Sat,  8 Aug 2020 15:57:28 +0900	[thread overview]
Message-ID: <20200808065728.3405-1-yazzep@gmail.com> (raw)
In-Reply-To: <20200806151016.GB197575@rowland.harvard.edu>

From: Yasushi Asano <yasano@jp.adit-jv.com>

According to 6.7.22 A-UUT “Device No Response” for connection timeout
of USB OTG and EH automated compliance plan v1.2, the enumeration
failure has to be detected within 30 seconds. However, the old and new
enumeration schemes made a total of 16 attempts, and each attempt can
take 5 seconds to timeout, so it failed with PET test. Modify it to
reduce the number of attempts to 5 and pass PET test.

Signed-off-by: Yasushi Asano <yasano@jp.adit-jv.com>
---
 drivers/usb/core/hub.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 052d5ac..ebf6931 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -2707,9 +2707,9 @@ static unsigned hub_is_wusb(struct usb_hub *hub)
 
 #define PORT_RESET_TRIES	5
 #define SET_ADDRESS_TRIES	2
-#define GET_DESCRIPTOR_TRIES	2
-#define SET_CONFIG_TRIES	(2 * (use_both_schemes + 1))
-#define USE_NEW_SCHEME(i, scheme)	((i) / 2 == (int)(scheme))
+#define GET_DESCRIPTOR_TRIES	1
+#define SET_CONFIG_TRIES	(use_both_schemes + 1)
+#define USE_NEW_SCHEME(i, scheme)	((i) == (int)(scheme))
 
 #define HUB_ROOT_RESET_TIME	60	/* times are in msec */
 #define HUB_SHORT_RESET_TIME	10
-- 
2.7.4


  reply	other threads:[~2020-08-08  6:57 UTC|newest]

Thread overview: 8+ 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
2020-08-08  6:57       ` Yasushi Asano [this message]
     [not found] <CAEt1RjrQsb6=reKUKV9uJTG4JoJXErhJFj=2TdVx=N1_Ad1GVg@mail.gmail.com>
2020-08-08  6:40 ` [PATCH] [RFC] USB: hub.c: decrease the number of attempts of enumeration scheme Yasushi Asano
2020-08-08 15:16   ` Alan Stern

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=20200808065728.3405-1-yazzep@gmail.com \
    --to=yazzep@gmail.com \
    --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=stern@rowland.harvard.edu \
    --cc=wnatsume@jp.adit-jv.com \
    --cc=yasano@jp.adit-jv.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).