summaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3
diff options
context:
space:
mode:
authorBo He2019-01-14 08:48:32 +0100
committerFelipe Balbi2019-01-14 09:29:42 +0100
commit01c10880d24291a96a4ab0da773e3c5ce4d12da8 (patch)
tree04b4217a0fc159c12c6e9dcbf084c665ca0a245a /drivers/usb/dwc3
parentLinux 5.0-rc2 (diff)
downloadkernel-qcow2-linux-01c10880d24291a96a4ab0da773e3c5ce4d12da8.tar.gz
kernel-qcow2-linux-01c10880d24291a96a4ab0da773e3c5ce4d12da8.tar.xz
kernel-qcow2-linux-01c10880d24291a96a4ab0da773e3c5ce4d12da8.zip
usb: dwc3: gadget: synchronize_irq dwc irq in suspend
We see dwc3 endpoint stopped by unwanted irq during suspend resume test, which is caused dwc3 ep can't be started with error "No Resource". Here, add synchronize_irq before suspend to sync the pending IRQ handlers complete. Signed-off-by: Bo He <bo.he@intel.com> Signed-off-by: Yu Wang <yu.y.wang@intel.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc3')
-rw-r--r--drivers/usb/dwc3/gadget.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
index 07bd31bb2f8a..851fd44d56ad 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -3379,6 +3379,8 @@ int dwc3_gadget_suspend(struct dwc3 *dwc)
dwc3_disconnect_gadget(dwc);
__dwc3_gadget_stop(dwc);
+ synchronize_irq(dwc->irq_gadget);
+
return 0;
}