From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Sascha Hauer <sha@pengutronix.de>
Cc: Jules Maselbas <jmaselbas@kalray.eu>, barebox@lists.infradead.org
Subject: Re: [PATCH master] usb: dwc2: increase timeout for waiting on host mode
Date: Wed, 2 Jun 2021 13:21:37 +0200 [thread overview]
Message-ID: <043c037e-f423-c13a-8209-8c569106aed6@pengutronix.de> (raw)
In-Reply-To: <20210507080722.GS19819@pengutronix.de>
On 07.05.21 10:07, Sascha Hauer wrote:
> Instead of applying two patches I suggest we go with the following
> oneliner which is fine for master.
I'd have preferred two patches, because then I've more time to
procrastinate before testing the second one. ;)
FTR: I just tested v2021.05.0 and USB now works (tested by DHCP
over the USB-Ethernet controller).
Thanks,
Ahmad
>
> Sascha
>
> ------------------------------8<--------------------------------
>
> From 9fc2b0364c4b686d110b772be2245be3a513407d Mon Sep 17 00:00:00 2001
> From: Sascha Hauer <s.hauer@pengutronix.de>
> Date: Fri, 7 May 2021 09:58:43 +0200
> Subject: [PATCH] usb: dwc2: Fix wait for mode timeout
>
> The timeout waiting for host mode should be 110ms instead of 110us.
> The timeout is the same as in Linux now and the same it was before
> fdd30cc251. It takes 49ms to go to host mode on the Raspberry Pi 3b,
> so host mode stopped working with 26459ab780 which removed an additional
> 100ms delay before dwc2_wait_for_mode() was actually called.
>
> Fixes: fdd30cc251 ("usb: dwc2: Rework dwc2_wait_for_mode to use wait_on_timeout")
> Fixes: 26459ab780 ("usb: dwc2: Rework wait for host mode during core reset")
> Reported-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
> ---
> drivers/usb/dwc2/core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c
> index 5d04a07b03..8a78d8199e 100644
> --- a/drivers/usb/dwc2/core.c
> +++ b/drivers/usb/dwc2/core.c
> @@ -688,7 +688,7 @@ int dwc2_get_dr_mode(struct dwc2 *dwc2)
> */
> void dwc2_wait_for_mode(struct dwc2 *dwc2, bool host_mode)
> {
> - unsigned int timeout = 110 * USECOND;
> + unsigned int timeout = 110 * MSECOND;
> int ret;
>
> dev_vdbg(dwc2->dev, "Waiting for %s mode\n",
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
prev parent reply other threads:[~2021-06-02 11:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-21 7:27 Ahmad Fatoum
2021-04-21 8:47 ` Jules Maselbas
2021-04-21 8:50 ` Ahmad Fatoum
2021-04-21 9:11 ` Jules Maselbas
2021-05-07 8:07 ` Sascha Hauer
2021-06-02 11:21 ` Ahmad Fatoum [this message]
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=043c037e-f423-c13a-8209-8c569106aed6@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=jmaselbas@kalray.eu \
--cc=sha@pengutronix.de \
/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