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] Re: [PATCH v3] USB: hub.c: decrease the number of attempts of enumeration scheme
Date: Mon, 21 Sep 2020 23:03:42 +0900 [thread overview]
Message-ID: <20200921140342.3813-1-yazzep@gmail.com> (raw)
In-Reply-To: <20200920192114.GB1190206@rowland.harvard.edu>
From: Yasushi Asano <yasano@jp.adit-jv.com>
Dear Alan
Thank you very much for providing the patch.
I really appreciate your kindness.
When I added a pseudo error code and checked it,
the for statement of the "operation" in the new scheme
runs unconditionally three times. Therefore It doesn't
seem to meet the requirements (30seconds).
After applying your patch, I added a patch that can
change the loop number of "operation" as shown below,
and it worked fine in the pseudo error environment.
Is this modification acceptable?
If it is good, I'll add this patch and test it.
Since the PET tool is only in the customer,
I will ask the customer to test it. I will report the
result when I receive the results.
Signed-off-by: Yasushi Asano <yasano@jp.adit-jv.com>
---
drivers/usb/core/hub.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 61effd5..2f07f7c 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -2709,12 +2709,14 @@ static unsigned hub_is_wusb(struct usb_hub *hub)
#define PORT_RESET_TRIES 2
#define SET_ADDRESS_TRIES 1
#define GET_DESCRIPTOR_TRIES 1
+#define GET_DESCRIPTOR_OPERATIONS 1
#define PORT_INIT_TRIES 5
#else
#define PORT_RESET_TRIES 5
#define SET_ADDRESS_TRIES 2
#define GET_DESCRIPTOR_TRIES 2
+#define GET_DESCRIPTOR_OPERATIONS 3
#define PORT_INIT_TRIES 4
#endif /* CONFIG_USB_FEW_INIT_RETRIES */
@@ -4699,7 +4701,7 @@ hub_port_init(struct usb_hub *hub, struct usb_device *udev, int port1,
* 255 is for WUSB devices, we actually need to use
* 512 (WUSB1.0[4.8.1]).
*/
- for (operations = 0; operations < 3; ++operations) {
+ for (operations = 0; operations < GET_DESCRIPTOR_OPERATIONS; ++operations) {
buf->bMaxPacketSize0 = 0;
r = usb_control_msg(udev, usb_rcvaddr0pipe(),
USB_REQ_GET_DESCRIPTOR, USB_DIR_IN,
--
2.7.4
next prev parent reply other threads:[~2020-09-21 14:03 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
[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
2020-08-10 0:19 ` [PATCH v2] [RFC] USB: hub.c: decrease the number of attempts of enumeration Yasushi Asano
2020-08-10 0:19 ` [PATCH v2] [RFC] USB: hub.c: decrease the number of attempts of enumeration scheme Yasushi Asano
2020-08-10 7:46 ` Greg KH
2020-08-11 15:20 ` yasushi asano
2020-09-07 15:50 ` [PATCH v3] " Yasushi Asano
2020-09-07 15:50 ` Yasushi Asano
2020-09-08 19:04 ` Alan Stern
2020-09-10 4:49 ` yasushi asano
2020-09-11 8:33 ` yasushi asano
2020-09-11 15:12 ` Alan Stern
2020-09-15 9:45 ` Eugeniu Rosca
2020-09-15 11:01 ` Greg KH
2020-09-15 14:52 ` Alan Stern
2020-09-16 10:16 ` yasushi asano
2020-09-18 15:00 ` yasushi asano
2020-09-20 19:21 ` Alan Stern
2020-09-21 14:03 ` Yasushi Asano [this message]
2020-09-21 14:48 ` [PATCH] " Alan Stern
[not found] ` <CAEt1Rjq-DOwN0+_7F0m-kqUHTzm5YPUaXqUOpTszCsqrfLRt5w@mail.gmail.com>
2020-09-21 15:06 ` Alan Stern
2020-09-25 1:05 ` yasushi asano
2020-09-25 17:21 ` yasushi asano
2020-09-25 18:41 ` Alan Stern
2020-09-27 15:43 ` yasushi asano
2020-09-28 15:20 ` [Patch 1/2]: USB: hub: Clean up use of port initialization schemes and retries Alan Stern
2020-09-28 15:22 ` [Patch 2/2]: USB: hub: Add Kconfig option to reduce number of port initialization retries Alan Stern
2020-09-15 14:48 ` [PATCH v3] USB: hub.c: decrease the number of attempts of enumeration scheme Alan Stern
2020-08-12 17:09 ` [PATCH v2] " 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=20200921140342.3813-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).