Loading drivers/usb/dwc3/dwc3-msm.c +14 −0 Original line number Diff line number Diff line Loading @@ -1663,6 +1663,20 @@ static int dwc3_msm_suspend(struct dwc3_msm *mdwc) (mdwc->charger.chg_type == DWC3_CDP_CHARGER)); if (host_bus_suspend || device_bus_suspend) { /* * Check if device is not in CONFIGURED state * then check cotroller state of L2 and break * LPM sequeunce. */ if (device_bus_suspend && (dwc->gadget.state != USB_STATE_CONFIGURED)) { pr_err("%s(): Trying to go in LPM with state:%d\n", __func__, dwc->gadget.state); pr_err("%s(): LPM is not performed.\n", __func__); return -EBUSY; } ret = dwc3_msm_prepare_suspend(mdwc); if (ret) return ret; Loading drivers/usb/dwc3/gadget.c +6 −1 Original line number Diff line number Diff line Loading @@ -3229,9 +3229,14 @@ static void dwc3_gadget_suspend_interrupt(struct dwc3 *dwc, * DWC3_DEVICE_EVENT_RESET or DWC3_DEVICE_EVENT_CONNECT_DONE * events, the controller sees a DWC3_DEVICE_EVENT_SUSPEND * event. In such a case, ignore. * Ignore suspend event until device side usb is not into * CONFIGURED state. */ if (dwc->gadget.state == USB_STATE_NOTATTACHED) if (dwc->gadget.state != USB_STATE_CONFIGURED) { pr_err("%s(): state:%d. Ignore SUSPEND.\n", __func__, dwc->gadget.state); return; } /* * gadget_driver suspend function might require some dwc3-gadget * operations, such as ep_disable. Hence, dwc->lock must be Loading Loading
drivers/usb/dwc3/dwc3-msm.c +14 −0 Original line number Diff line number Diff line Loading @@ -1663,6 +1663,20 @@ static int dwc3_msm_suspend(struct dwc3_msm *mdwc) (mdwc->charger.chg_type == DWC3_CDP_CHARGER)); if (host_bus_suspend || device_bus_suspend) { /* * Check if device is not in CONFIGURED state * then check cotroller state of L2 and break * LPM sequeunce. */ if (device_bus_suspend && (dwc->gadget.state != USB_STATE_CONFIGURED)) { pr_err("%s(): Trying to go in LPM with state:%d\n", __func__, dwc->gadget.state); pr_err("%s(): LPM is not performed.\n", __func__); return -EBUSY; } ret = dwc3_msm_prepare_suspend(mdwc); if (ret) return ret; Loading
drivers/usb/dwc3/gadget.c +6 −1 Original line number Diff line number Diff line Loading @@ -3229,9 +3229,14 @@ static void dwc3_gadget_suspend_interrupt(struct dwc3 *dwc, * DWC3_DEVICE_EVENT_RESET or DWC3_DEVICE_EVENT_CONNECT_DONE * events, the controller sees a DWC3_DEVICE_EVENT_SUSPEND * event. In such a case, ignore. * Ignore suspend event until device side usb is not into * CONFIGURED state. */ if (dwc->gadget.state == USB_STATE_NOTATTACHED) if (dwc->gadget.state != USB_STATE_CONFIGURED) { pr_err("%s(): state:%d. Ignore SUSPEND.\n", __func__, dwc->gadget.state); return; } /* * gadget_driver suspend function might require some dwc3-gadget * operations, such as ep_disable. Hence, dwc->lock must be Loading