Hi, On Fri, Apr 19, 2019 at 11:53 AM Artur Petrosyan <Arthur.Petrosyan@xxxxxxxxxxxx> wrote: > > Added port connection status checking which prevents exiting from > Partial Power Down mode from _dwc2_hcd_resume() when no entering > to Partial Power Down mode happened. > > Signed-off-by: Artur Petrosyan <arturp@xxxxxxxxxxxx> > --- > drivers/usb/dwc2/hcd.c | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c > index 1d18258b5ff8..8367902a47eb 100644 > --- a/drivers/usb/dwc2/hcd.c > +++ b/drivers/usb/dwc2/hcd.c > @@ -4544,6 +4544,9 @@ static int _dwc2_hcd_resume(struct usb_hcd *hcd) > struct dwc2_hsotg *hsotg = dwc2_hcd_to_hsotg(hcd); > unsigned long flags; > int ret = 0; > + u32 hprt0; > + > + hprt0 = dwc2_read_hprt0(hsotg); > > spin_lock_irqsave(&hsotg->lock, flags); In this patch you put the reading of hprt0 before the spinlock (which seems wrong) and then you move it after the spinlock in the last patch in the series, AKA ("usb: dwc2: Add enter/exit hibernation from system issued suspend/resume"). Can you just put it in the right place here so you don't need to move it in a later patch? -Doug