linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] usb: dwc2: fix hang during suspend or shutdown
@ 2025-11-04  0:25 Jisheng Zhang
  2025-11-04  0:25 ` [PATCH 1/2] usb: dwc2: fix hang during shutdown if set as peripheral Jisheng Zhang
  2025-11-04  0:25 ` [PATCH 2/2] usb: dwc2: fix hang during suspend " Jisheng Zhang
  0 siblings, 2 replies; 3+ messages in thread
From: Jisheng Zhang @ 2025-11-04  0:25 UTC (permalink / raw)
  To: Minas Harutyunyan, Greg Kroah-Hartman; +Cc: linux-usb, linux-kernel

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

-- 
2.50.0


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

end of thread, other threads:[~2025-11-04  0:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-04  0:25 [PATCH 0/2] usb: dwc2: fix hang during suspend or shutdown Jisheng Zhang
2025-11-04  0:25 ` [PATCH 1/2] usb: dwc2: fix hang during shutdown if set as peripheral Jisheng Zhang
2025-11-04  0:25 ` [PATCH 2/2] usb: dwc2: fix hang during suspend " Jisheng Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).