Skip to contentSkip to conversation

usb: dwc2: Add extra delay when forcing dr_mode

PATCH Superseded John Youn 3 participants 4 messages Feb 5, 2016 – Feb 15, 2016 3 messages not in the archive

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

A message that is not in the archive (sent off-list or not yet received): cover.1454633496.git.johnyoun-HKixBCOQz3hWk0Htik3J/[email protected]

John Youn

author
#2 lore raw

PATCH 1/1 usb: dwc2: Add extra delay when forcing dr_mode

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")

---

Hi Felipe,

This is another one for 4.5-rc.

Thanks,
John

 drivers/usb/dwc2/core.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/usb/dwc2/core.c +6 -0
index e991d55..627f1d2 100644
@@ -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);
 }
 
 /*
Signature · 6 lines
2.6.3

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 52b1b554810ac3a434e3c570cade28cab3dd6b1e.1454633496.git.johnyoun-HKixBCOQz3hWk0Htik3J/[email protected]

Tested-by
#4 lore raw

Am Donnerstag, 4. Februar 2016, 17:50:34 schrieb John Youn:

Quoted 9 lines

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.

Quoted 7 lines

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 <[email protected]>

(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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

#5 lore raw

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 <[email protected]>:

Quoted 18 lines

Am Donnerstag, 4. Februar 2016, 17:50:34 schrieb John Youn:

Quoted 9 lines

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.

Quoted 7 lines

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 <[email protected]>

Quoted 8 lines

(also on a rk3036 where I hit the described problem)

_______________________________________________
Linux-rockchip mailing list [email protected]
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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

author
#6 lore raw
Quoted 6 lines · Michael Niewoehner

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.

Quoted 29 lines

Best regards
Michael

Am 13.02.2016 um 22:13 schrieb Heiko Stuebner <[email protected]>:

Quoted 22 lines

Am Donnerstag, 4. Februar 2016, 17:50:34 schrieb John Youn:

Quoted 9 lines

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.

Quoted 7 lines

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 <[email protected]>

(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 [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html