Skip to content

Commit

Permalink
usb: musb: Disable interrupts on suspend, enable them on resume
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Pascal Huerst authored and Felipe Balbi committed Sep 14, 2015
1 parent 6527cc2 commit 6fc6f4b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/usb/musb/musb_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit 6fc6f4b

Please sign in to comment.