summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorBo He <bo.he@intel.com>2019-01-14 09:48:32 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-03-05 17:57:59 +0100
commit887a873e0ce2e5464a5d62f701900a07651e7a47 (patch)
tree8a9c651c182287d20475a929e6ba11d55e7ed863 /drivers/usb
parent7330b4d0088a726876cb855810260e6ed785f123 (diff)
downloadlinux-stable-887a873e0ce2e5464a5d62f701900a07651e7a47.tar.gz
linux-stable-887a873e0ce2e5464a5d62f701900a07651e7a47.tar.bz2
linux-stable-887a873e0ce2e5464a5d62f701900a07651e7a47.zip
usb: dwc3: gadget: synchronize_irq dwc irq in suspend
[ Upstream commit 01c10880d24291a96a4ab0da773e3c5ce4d12da8 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
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 2f96d2d0addd..5da078bf5f76 100644
--- a/drivers/usb/dwc3/gadget.c
+++ b/drivers/usb/dwc3/gadget.c
@@ -3327,6 +3327,8 @@ int dwc3_gadget_suspend(struct dwc3 *dwc)
dwc3_disconnect_gadget(dwc);
__dwc3_gadget_stop(dwc);
+ synchronize_irq(dwc->irq_gadget);
+
return 0;
}