On 3/18/2021 10:13 AM, Artur Petrosyan wrote: > In host mode port connection status flag is "0" when loading > the driver. After loading the driver system asserts suspend > which is handled by "_dwc2_hcd_suspend()" function. Before > the system suspend the port connection status is "0". As > result need to check the "port_connect_status" if it is "0", > then skipping entering to suspend. > > Signed-off-by: Artur Petrosyan <Arthur.Petrosyan@xxxxxxxxxxxx> Acked-by: Minas Harutyunyan <Minas.Harutyunyan@xxxxxxxxxxxx> > --- > drivers/usb/dwc2/hcd.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c > index 40e5655921bf..1a9789ec5847 100644 > --- a/drivers/usb/dwc2/hcd.c > +++ b/drivers/usb/dwc2/hcd.c > @@ -4322,7 +4322,8 @@ static int _dwc2_hcd_suspend(struct usb_hcd *hcd) > if (hsotg->op_state == OTG_STATE_B_PERIPHERAL) > goto unlock; > > - if (hsotg->params.power_down > DWC2_POWER_DOWN_PARAM_PARTIAL) > + if (hsotg->params.power_down != DWC2_POWER_DOWN_PARAM_PARTIAL || > + hsotg->flags.b.port_connect_status == 0) > goto skip_power_saving; > > /* >