Skip to content

Commit 4d4d99a

Browse files
Artur Petrosyangregkh
authored andcommitted
usb: dwc2: Add part. power down exit from dwc2_conn_id_status_change().
Before changing to connector B exiting from Partial Power Down is required. - Added exiting from Partial Power Down mode when connector ID status changes to "connId B". Because if connector ID status changed to B connector while core was in partial power down mode, HANG would accrue from a soft reset. Acked-by: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com> Signed-off-by: Artur Petrosyan <Arthur.Petrosyan@synopsys.com> Link: https://lore.kernel.org/r/20210408094534.4AA7AA022E@mailhost.synopsys.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent e97570f commit 4d4d99a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

drivers/usb/dwc2/hcd.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3206,6 +3206,15 @@ static void dwc2_conn_id_status_change(struct work_struct *work)
32063206
if (count > 250)
32073207
dev_err(hsotg->dev,
32083208
"Connection id status change timed out\n");
3209+
3210+
/*
3211+
* Exit Partial Power Down without restoring registers.
3212+
* No need to check the return value as registers
3213+
* are not being restored.
3214+
*/
3215+
if (hsotg->in_ppd && hsotg->lx_state == DWC2_L2)
3216+
dwc2_exit_partial_power_down(hsotg, 0, false);
3217+
32093218
hsotg->op_state = OTG_STATE_B_PERIPHERAL;
32103219
dwc2_core_init(hsotg, false);
32113220
dwc2_enable_global_interrupts(hsotg);

0 commit comments

Comments
 (0)