From 9fc2b0364c4b686d110b772be2245be3a513407d Mon Sep 17 00:00:00 2001 From: Sascha Hauer Date: Fri, 7 May 2021 09:58:43 +0200 Subject: 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 Signed-off-by: Sascha Hauer --- 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", -- cgit v1.2.3