aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc2/hcd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/dwc2/hcd.c')
-rw-r--r--drivers/usb/dwc2/hcd.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c
index e79baf73c234..571c21727ff9 100644
--- a/drivers/usb/dwc2/hcd.c
+++ b/drivers/usb/dwc2/hcd.c
@@ -324,12 +324,13 @@ void dwc2_hcd_disconnect(struct dwc2_hsotg *hsotg)
324 */ 324 */
325static void dwc2_hcd_rem_wakeup(struct dwc2_hsotg *hsotg) 325static void dwc2_hcd_rem_wakeup(struct dwc2_hsotg *hsotg)
326{ 326{
327 if (hsotg->lx_state == DWC2_L2) { 327 if (hsotg->bus_suspended) {
328 hsotg->flags.b.port_suspend_change = 1; 328 hsotg->flags.b.port_suspend_change = 1;
329 usb_hcd_resume_root_hub(hsotg->priv); 329 usb_hcd_resume_root_hub(hsotg->priv);
330 } else {
331 hsotg->flags.b.port_l1_change = 1;
332 } 330 }
331
332 if (hsotg->lx_state == DWC2_L1)
333 hsotg->flags.b.port_l1_change = 1;
333} 334}
334 335
335/** 336/**
@@ -1428,8 +1429,8 @@ static void dwc2_wakeup_detected(unsigned long data)
1428 dev_dbg(hsotg->dev, "Clear Resume: HPRT0=%0x\n", 1429 dev_dbg(hsotg->dev, "Clear Resume: HPRT0=%0x\n",
1429 dwc2_readl(hsotg->regs + HPRT0)); 1430 dwc2_readl(hsotg->regs + HPRT0));
1430 1431
1431 hsotg->bus_suspended = 0;
1432 dwc2_hcd_rem_wakeup(hsotg); 1432 dwc2_hcd_rem_wakeup(hsotg);
1433 hsotg->bus_suspended = 0;
1433 1434
1434 /* Change to L0 state */ 1435 /* Change to L0 state */
1435 hsotg->lx_state = DWC2_L0; 1436 hsotg->lx_state = DWC2_L0;