Loading drivers/usb/dwc3/gadget.c +10 −0 Original line number Diff line number Diff line Loading @@ -2040,7 +2040,16 @@ static int dwc3_gadget_pullup(struct usb_gadget *g, int is_on) pm_runtime_get_sync(dwc->dev); dbg_event(0xFF, "Pullup gsync", atomic_read(&dwc->dev->power.usage_count)); disable_irq(dwc->irq); /* prevent pending bh to run later */ flush_work(&dwc->bh_work); spin_lock_irqsave(&dwc->lock, flags); if (dwc->ep0state != EP0_SETUP_PHASE) dbg_event(0xFF, "EP0 is not in SETUP phase\n", 0); /* * If we are here after bus suspend notify otg state machine to * increment pm usage count of dwc to prevent pm_runtime_suspend Loading @@ -2051,6 +2060,7 @@ static int dwc3_gadget_pullup(struct usb_gadget *g, int is_on) ret = dwc3_gadget_run_stop(dwc, is_on, false); spin_unlock_irqrestore(&dwc->lock, flags); enable_irq(dwc->irq); pm_runtime_mark_last_busy(dwc->dev); pm_runtime_put_autosuspend(dwc->dev); Loading Loading
drivers/usb/dwc3/gadget.c +10 −0 Original line number Diff line number Diff line Loading @@ -2040,7 +2040,16 @@ static int dwc3_gadget_pullup(struct usb_gadget *g, int is_on) pm_runtime_get_sync(dwc->dev); dbg_event(0xFF, "Pullup gsync", atomic_read(&dwc->dev->power.usage_count)); disable_irq(dwc->irq); /* prevent pending bh to run later */ flush_work(&dwc->bh_work); spin_lock_irqsave(&dwc->lock, flags); if (dwc->ep0state != EP0_SETUP_PHASE) dbg_event(0xFF, "EP0 is not in SETUP phase\n", 0); /* * If we are here after bus suspend notify otg state machine to * increment pm usage count of dwc to prevent pm_runtime_suspend Loading @@ -2051,6 +2060,7 @@ static int dwc3_gadget_pullup(struct usb_gadget *g, int is_on) ret = dwc3_gadget_run_stop(dwc, is_on, false); spin_unlock_irqrestore(&dwc->lock, flags); enable_irq(dwc->irq); pm_runtime_mark_last_busy(dwc->dev); pm_runtime_put_autosuspend(dwc->dev); Loading