Commit 6fc6f4b8 authored by Pascal Huerst's avatar Pascal Huerst Committed by Felipe Balbi

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: default avatarPascal Huerst <pascal.huerst@gmail.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 6527cc27
...@@ -2449,6 +2449,9 @@ static int musb_suspend(struct device *dev) ...@@ -2449,6 +2449,9 @@ static int musb_suspend(struct device *dev)
struct musb *musb = dev_to_musb(dev); struct musb *musb = dev_to_musb(dev);
unsigned long flags; unsigned long flags;
musb_platform_disable(musb);
musb_generic_disable(musb);
spin_lock_irqsave(&musb->lock, flags); spin_lock_irqsave(&musb->lock, flags);
if (is_peripheral_active(musb)) { if (is_peripheral_active(musb)) {
...@@ -2502,6 +2505,9 @@ static int musb_resume(struct device *dev) ...@@ -2502,6 +2505,9 @@ static int musb_resume(struct device *dev)
pm_runtime_disable(dev); pm_runtime_disable(dev);
pm_runtime_set_active(dev); pm_runtime_set_active(dev);
pm_runtime_enable(dev); pm_runtime_enable(dev);
musb_start(musb);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment