Commit e1003aa7 authored by Udipto Goswami's avatar Udipto Goswami Committed by Greg Kroah-Hartman
Browse files

usb: dwc3: keep susphy enabled during exit to avoid controller faults



On some platforms, switching USB roles from host to device can trigger
controller faults due to premature PHY power-down. This occurs when the
PHY is disabled too early during teardown, causing synchronization
issues between the PHY and controller.

Keep susphy enabled during dwc3_host_exit() and dwc3_gadget_exit()
ensures the PHY remains in a low-power state capable of handling
required commands during role switch.

Cc: stable <stable@kernel.org>
Fixes: 6d735722 ("usb: dwc3: core: Prevent phy suspend during init")
Suggested-by: default avatarThinh Nguyen <Thinh.Nguyen@synopsys.com>
Signed-off-by: default avatarUdipto Goswami <udipto.goswami@oss.qualcomm.com>
Acked-by: default avatarThinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://patch.msgid.link/20251126054221.120638-1-udipto.goswami@oss.qualcomm.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 74098cc0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4826,7 +4826,7 @@ void dwc3_gadget_exit(struct dwc3 *dwc)
	if (!dwc->gadget)
		return;

	dwc3_enable_susphy(dwc, false);
	dwc3_enable_susphy(dwc, true);
	usb_del_gadget(dwc->gadget);
	dwc3_gadget_free_endpoints(dwc);
	usb_put_gadget(dwc->gadget);
+1 −1
Original line number Diff line number Diff line
@@ -227,7 +227,7 @@ void dwc3_host_exit(struct dwc3 *dwc)
	if (dwc->sys_wakeup)
		device_init_wakeup(&dwc->xhci->dev, false);

	dwc3_enable_susphy(dwc, false);
	dwc3_enable_susphy(dwc, true);
	platform_device_unregister(dwc->xhci);
	dwc->xhci = NULL;
}