Hi Jens,
On 2026-05-07T09:27:07, Jens Wiklander <[email protected]> wrote:
> usb: dwc3: import from kernel v4.16
>
> Sync Linux kernel dwc3 changes from v4.15 to v4.16.
>
> The following files are preserved accross the import:
> Makefile Kconfig dwc3-meson-g12a.c dwc3-meson-gxl.c dwc3-omap.c
> dwc3-uniphier.c dwc3-generic.h dwc3-generic.c dwc3-generic-sti.c
> dwc3-layerscape.c ti_usb_phy.c
>
> Skipping unused files:
> debugfs.c drd.c dwc3-exynos.c dwc3-haps.c dwc3-imx8mp.c dwc3-keystone.c
> dwc3-octeon.c dwc3-of-simple.c dwc3-pci.c dwc3-qcom.c dwc3-qcom-legacy.c
> dwc3-rtk.c dwc3-st.c dwc3-xilinx.c host.c trace.c trace.h ulpi.c
>
> Note that this is a raw import and doesn't build.
> A fixup commit at the end of the series fixes that.
>
> List of commits: git log --oneline v4.15..v4.16
> Commits imported:
> 084a804e0120 usb: dwc3: Fix lock-up on ID change during system suspend/resume
> [...]
>
> drivers/usb/dwc3/core.c | 93 ++++++++++++++++++++++++++++++++++-------
> drivers/usb/dwc3/core.h | 26 ++++++++-----
> drivers/usb/dwc3/debug.h | 9 +++++
> drivers/usb/dwc3/ep0.c | 13 ++++---
> drivers/usb/dwc3/gadget.c | 8 +++-
> 5 files changed, 106 insertions(+), 43 deletions(-)
> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
> @@ -221,6 +222,9 @@ static int dwc3_core_soft_reset(struct dwc3 *dwc)
> * for 10 times instead.
> */
> if (DWC3_VER_IS_WITHIN(DWC31, 190A, ANY) || DWC3_IP_IS(DWC32))
> + phy_exit(dwc->usb3_generic_phy);
> + phy_exit(dwc->usb2_generic_phy);
> +
> retries = 10;
Kernel commit 00b42170c86f ('usb: dwc3: Undo PHY init if soft reset
fails') puts these phy_exit() calls just before 'return -ETIMEDOUT;'
at the end of the function.
Regards,
Simon