提交 da1410be 编写于 作者: B Baolin Wang 提交者: Felipe Balbi

usb: dwc3: gadget: Add the suspend state checking when stopping gadget

It will be crash to stop gadget when the dwc3 device had been into suspend
state, thus we need to check if the dwc3 device had been into suspend state
when UDC try to stop gadget.
Signed-off-by: NBaolin Wang <baolin.wang@linaro.org>
Signed-off-by: NFelipe Balbi <felipe.balbi@linux.intel.com>
上级 0e146028
......@@ -1803,6 +1803,9 @@ static int dwc3_gadget_start(struct usb_gadget *g,
static void __dwc3_gadget_stop(struct dwc3 *dwc)
{
if (pm_runtime_suspended(dwc->dev))
return;
dwc3_gadget_disable_irq(dwc);
__dwc3_gadget_ep_disable(dwc->eps[0]);
__dwc3_gadget_ep_disable(dwc->eps[1]);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册