All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: dwc2: Add extra delay when forcing dr_mode
       [not found] ` <cover.1454633496.git.johnyoun-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
@ 2016-02-05  1:50   ` John Youn
       [not found]     ` <52b1b554810ac3a434e3c570cade28cab3dd6b1e.1454633496.git.johnyoun-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: John Youn @ 2016-02-05  1:50 UTC (permalink / raw)
  To: Felipe Balbi
  Cc: John.Youn-HKixBCOQz3hWk0Htik3J/w,
	linux-usb-u79uwXL29TY76Z2rM5mHXA, Caesar Wang, Doug Anderson,
	Tao Huang, Heiko Stuebner,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Fixes an issue found on rockchip rk3036-based SOC platforms. For some
reason, the existing msleep(25) is not enough after the force mode. The
following patch was reported to fix the issue.

This does increase the probe delay again slightly, but not up to the
level it was before the original series of patches that this fixes. It
does not cause any other issues when tested on Synopsys HAPS and Altera
socfpga platforms.

Need to revisit this series next release to see if we can address these
issues without having an unconditional delay.

Fixes: 09c96980dc72 ("usb: dwc2: Add functions to set and clear force mode")
Reported-by: Caesar Wang <caesar.upstream-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Tested-by: Caesar Wang <caesar.upstream-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Signed-off-by: John Youn <johnyoun-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
---

Hi Felipe,

This is another one for 4.5-rc.

Thanks,
John


 drivers/usb/dwc2/core.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c
index e991d55..627f1d2 100644
--- a/drivers/usb/dwc2/core.c
+++ b/drivers/usb/dwc2/core.c
@@ -619,6 +619,12 @@ void dwc2_force_dr_mode(struct dwc2_hsotg *hsotg)
 			 __func__, hsotg->dr_mode);
 		break;
 	}
+
+	/*
+	 * NOTE: This is required for some rockchip soc based
+	 * platforms.
+	 */
+	msleep(25);
 }
 
 /*
-- 
2.6.3

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] usb: dwc2: Add extra delay when forcing dr_mode
       [not found]     ` <52b1b554810ac3a434e3c570cade28cab3dd6b1e.1454633496.git.johnyoun-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
@ 2016-02-13 21:13       ` Heiko Stuebner
  2016-02-13 21:40         ` Michael Niewoehner
  0 siblings, 1 reply; 4+ messages in thread
From: Heiko Stuebner @ 2016-02-13 21:13 UTC (permalink / raw)
  To: John Youn
  Cc: Felipe Balbi, linux-usb-u79uwXL29TY76Z2rM5mHXA, Caesar Wang,
	Doug Anderson, Tao Huang,
	linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r

Am Donnerstag, 4. Februar 2016, 17:50:34 schrieb John Youn:
> Fixes an issue found on rockchip rk3036-based SOC platforms. For some
> reason, the existing msleep(25) is not enough after the force mode. The
> following patch was reported to fix the issue.
> 
> This does increase the probe delay again slightly, but not up to the
> level it was before the original series of patches that this fixes. It
> does not cause any other issues when tested on Synopsys HAPS and Altera
> socfpga platforms.
> 
> Need to revisit this series next release to see if we can address these
> issues without having an unconditional delay.
> 
> Fixes: 09c96980dc72 ("usb: dwc2: Add functions to set and clear force
> mode") Reported-by: Caesar Wang <caesar.upstream-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Tested-by: Caesar Wang <caesar.upstream-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> Signed-off-by: John Youn <johnyoun-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>

Tested-by: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
(also on a rk3036 where I hit the described problem)

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] usb: dwc2: Add extra delay when forcing dr_mode
  2016-02-13 21:13       ` Heiko Stuebner
@ 2016-02-13 21:40         ` Michael Niewoehner
  2016-02-15 23:10           ` John Youn
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Niewoehner @ 2016-02-13 21:40 UTC (permalink / raw)
  To: Heiko Stuebner, John Youn
  Cc: Caesar Wang, Felipe Balbi, Tao Huang,
	linux-usb-u79uwXL29TY76Z2rM5mHXA, Doug Anderson,
	open list:ARM/Rockchip SoC...

Hi John,
Hi Heiko,

on rk3188 25 ms don’t seem to be enough also.
Increasing the sleep time to 50 ms solve the problem for me while 32 ms seem to be the absolute minimum.

Best regards
Michael



Am 13.02.2016 um 22:13 schrieb Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>:

> Am Donnerstag, 4. Februar 2016, 17:50:34 schrieb John Youn:
>> Fixes an issue found on rockchip rk3036-based SOC platforms. For some
>> reason, the existing msleep(25) is not enough after the force mode. The
>> following patch was reported to fix the issue.
>> 
>> This does increase the probe delay again slightly, but not up to the
>> level it was before the original series of patches that this fixes. It
>> does not cause any other issues when tested on Synopsys HAPS and Altera
>> socfpga platforms.
>> 
>> Need to revisit this series next release to see if we can address these
>> issues without having an unconditional delay.
>> 
>> Fixes: 09c96980dc72 ("usb: dwc2: Add functions to set and clear force
>> mode") Reported-by: Caesar Wang <caesar.upstream-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>> Tested-by: Caesar Wang <caesar.upstream-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>> Signed-off-by: John Youn <johnyoun-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
> 
> Tested-by: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
> (also on a rk3036 where I hit the described problem)
> 
> 
> _______________________________________________
> Linux-rockchip mailing list
> Linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
> http://lists.infradead.org/mailman/listinfo/linux-rockchip


--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] usb: dwc2: Add extra delay when forcing dr_mode
  2016-02-13 21:40         ` Michael Niewoehner
@ 2016-02-15 23:10           ` John Youn
  0 siblings, 0 replies; 4+ messages in thread
From: John Youn @ 2016-02-15 23:10 UTC (permalink / raw)
  To: Michael Niewoehner, Heiko Stuebner, John Youn
  Cc: Caesar Wang, Felipe Balbi, Tao Huang,
	linux-usb-u79uwXL29TY76Z2rM5mHXA, Doug Anderson,
	open list:ARM/Rockchip SoC...

On 2/13/2016 1:41 PM, Michael Niewoehner wrote:
> Hi John,
> Hi Heiko,
> 
> on rk3188 25 ms don’t seem to be enough also.
> Increasing the sleep time to 50 ms solve the problem for me while 32 ms seem to be the absolute minimum.
> 
> Best regards
> Michael
> 
> 
> 
> Am 13.02.2016 um 22:13 schrieb Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>:
> 
>> Am Donnerstag, 4. Februar 2016, 17:50:34 schrieb John Youn:
>>> Fixes an issue found on rockchip rk3036-based SOC platforms. For some
>>> reason, the existing msleep(25) is not enough after the force mode. The
>>> following patch was reported to fix the issue.
>>>
>>> This does increase the probe delay again slightly, but not up to the
>>> level it was before the original series of patches that this fixes. It
>>> does not cause any other issues when tested on Synopsys HAPS and Altera
>>> socfpga platforms.
>>>
>>> Need to revisit this series next release to see if we can address these
>>> issues without having an unconditional delay.
>>>
>>> Fixes: 09c96980dc72 ("usb: dwc2: Add functions to set and clear force
>>> mode") Reported-by: Caesar Wang <caesar.upstream-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>> Tested-by: Caesar Wang <caesar.upstream-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
>>> Signed-off-by: John Youn <johnyoun-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
>>
>> Tested-by: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
>> (also on a rk3036 where I hit the described problem)
>>
>>

Ok thanks Heiko and Michael. I will update the patch and resend.

John
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-02-15 23:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <cover.1454633496.git.johnyoun@synopsys.com>
     [not found] ` <cover.1454633496.git.johnyoun-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
2016-02-05  1:50   ` [PATCH] usb: dwc2: Add extra delay when forcing dr_mode John Youn
     [not found]     ` <52b1b554810ac3a434e3c570cade28cab3dd6b1e.1454633496.git.johnyoun-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>
2016-02-13 21:13       ` Heiko Stuebner
2016-02-13 21:40         ` Michael Niewoehner
2016-02-15 23:10           ` John Youn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.