summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorBo He <bo.he@intel.com>2019-01-14 09:48:32 +0200
committerFelipe Balbi <felipe.balbi@linux.intel.com>2019-01-14 10:29:42 +0200
commit01c10880d24291a96a4ab0da773e3c5ce4d12da8 (patch)
tree04b4217a0fc159c12c6e9dcbf084c665ca0a245a /drivers/usb
parent1c7fc5cbc33980acd13d668f1c8f0313d6ae9fd8 (diff)
downloadlinux-stable-01c10880d24291a96a4ab0da773e3c5ce4d12da8.tar.gz
linux-stable-01c10880d24291a96a4ab0da773e3c5ce4d12da8.tar.bz2
linux-stable-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')
-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;
}