Skip to content

Commit e1003aa

Browse files
Udipto Goswamigregkh
authored andcommitted
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: 6d73572 ("usb: dwc3: core: Prevent phy suspend during init") Suggested-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Signed-off-by: Udipto Goswami <udipto.goswami@oss.qualcomm.com> Acked-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com> Link: https://patch.msgid.link/20251126054221.120638-1-udipto.goswami@oss.qualcomm.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 74098cc commit e1003aa

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/usb/dwc3/gadget.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4826,7 +4826,7 @@ void dwc3_gadget_exit(struct dwc3 *dwc)
48264826
if (!dwc->gadget)
48274827
return;
48284828

4829-
dwc3_enable_susphy(dwc, false);
4829+
dwc3_enable_susphy(dwc, true);
48304830
usb_del_gadget(dwc->gadget);
48314831
dwc3_gadget_free_endpoints(dwc);
48324832
usb_put_gadget(dwc->gadget);

drivers/usb/dwc3/host.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ void dwc3_host_exit(struct dwc3 *dwc)
227227
if (dwc->sys_wakeup)
228228
device_init_wakeup(&dwc->xhci->dev, false);
229229

230-
dwc3_enable_susphy(dwc, false);
230+
dwc3_enable_susphy(dwc, true);
231231
platform_device_unregister(dwc->xhci);
232232
dwc->xhci = NULL;
233233
}

0 commit comments

Comments
 (0)