Skip to content

Commit dde6719

Browse files
committed
usb: dwc3: core: Allow phy suspend during init for role_switch_reset_quirk
Disabling phy suspend during init breaks USB3 on Apple silicon systems. The pipehandler lock in atc-phy will not be acked breaking USB3 but not always USB2 and produces following log message | phy-apple-atc b03000000.phy: pipehandler lock not acked, this type-c port is probably dead until the next reboot. Fixes: 6d73572 ("usb: dwc3: core: Prevent phy suspend during init") Signed-off-by: Janne Grunau <j@jannau.net>
1 parent e0be4ed commit dde6719

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

drivers/usb/dwc3/core.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1392,6 +1392,9 @@ static int dwc3_core_init(struct dwc3 *dwc)
13921392
if (ret)
13931393
goto err_exit_phy;
13941394

1395+
if (dwc->role_switch_reset_quirk)
1396+
dwc3_enable_susphy(dwc, true);
1397+
13951398
dwc3_core_setup_global_control(dwc);
13961399
dwc3_core_num_eps(dwc);
13971400

drivers/usb/dwc3/host.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,8 @@ void dwc3_host_exit(struct dwc3 *dwc)
223223
if (dwc->sys_wakeup)
224224
device_init_wakeup(&dwc->xhci->dev, false);
225225

226-
dwc3_enable_susphy(dwc, false);
226+
if (!dwc->role_switch_reset_quirk)
227+
dwc3_enable_susphy(dwc, false);
227228
platform_device_unregister(dwc->xhci);
228229
dwc->xhci = NULL;
229230
}

0 commit comments

Comments
 (0)