Skip to content

usb: dwc2: fix hang during suspend or shutdown

Jisheng Zhang linux-usb lkml 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2usb: dwc2: fix hang during shutdown if set as peripheraldrivers/usb/dwc2/platform.c+4 -40 replies
2/2usb: dwc2: fix hang during suspend if set as peripheraldrivers/usb/dwc2/platform.c+8 -10 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] usb: dwc2: fix hang during suspend or shutdown

dwc2 on most platforms needs phy controller, clock and power supply. All of them must be enabled/activated to properly operate. If dwc2 is configured as peripheral mode, then all the above three hardware resources are disabled at the end of the probe:

	/* Gadget code manages lowlevel hw on its own */
	if (hsotg->dr_mode == USB_DR_MODE_PERIPHERAL)
		dwc2_lowlevel_hw_disable(hsotg);

But both dwc2_driver_shutdown() and dwc2_suspend() tries to access the dwc2 registers, this would result in hang during suspend or shutdown if dwc2 is configured as peripheral mode.

This series tries to fix both issues.

Jisheng Zhang (2):
usb: dwc2: fix hang during shutdown if set as peripheral
usb: dwc2: fix hang during suspend if set as peripheral

 drivers/usb/dwc2/platform.c | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)
Signature · 1 line
2.50.0