mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
UPSTREAM: 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.
Change-Id: I1a49d4c52131ef4b4357d4a12b5da55e8127d750
Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Wu Liang feng <wulf@rock-chips.com>
(cherry picked from commit da1410be21)
This commit is contained in:
@@ -1807,6 +1807,9 @@ err0:
|
||||
|
||||
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]);
|
||||
|
||||
Reference in New Issue
Block a user