summaryrefslogtreecommitdiff
path: root/drivers/usb/musb
diff options
context:
space:
mode:
authorPascal Huerst <pascal.huerst@gmail.com>2015-09-03 10:50:58 +0200
committerFelipe Balbi <balbi@ti.com>2015-09-14 10:14:53 -0500
commit6fc6f4b87cb32fcd0bf5e5bce434301958a3b624 (patch)
treec92e3127061a31e64bad10b096a013fe02e54d5a /drivers/usb/musb
parent6527cc27761a124de8c08e6488ce17fdcc74dbba (diff)
usb: musb: Disable interrupts on suspend, enable them on resume
In certain situations, an interrupt triggers on resume, before musb_start() has been called. This has been observed to cause enumeration issues after suspend/resume cycles with AM335x. Signed-off-by: Pascal Huerst <pascal.huerst@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/musb')
-rw-r--r--drivers/usb/musb/musb_core.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index d105c6dcbbec..4a518ff12310 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -2449,6 +2449,9 @@ static int musb_suspend(struct device *dev)
struct musb *musb = dev_to_musb(dev);
unsigned long flags;
+ musb_platform_disable(musb);
+ musb_generic_disable(musb);
+
spin_lock_irqsave(&musb->lock, flags);
if (is_peripheral_active(musb)) {
@@ -2502,6 +2505,9 @@ static int musb_resume(struct device *dev)
pm_runtime_disable(dev);
pm_runtime_set_active(dev);
pm_runtime_enable(dev);
+
+ musb_start(musb);
+
return 0;
}