diff options
author | Pascal Huerst <pascal.huerst@gmail.com> | 2015-09-03 04:50:58 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2015-09-14 11:14:53 -0400 |
commit | 6fc6f4b87cb32fcd0bf5e5bce434301958a3b624 (patch) | |
tree | c92e3127061a31e64bad10b096a013fe02e54d5a | |
parent | 6527cc27761a124de8c08e6488ce17fdcc74dbba (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>
-rw-r--r-- | drivers/usb/musb/musb_core.c | 6 |
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) | |||
2449 | struct musb *musb = dev_to_musb(dev); | 2449 | struct musb *musb = dev_to_musb(dev); |
2450 | unsigned long flags; | 2450 | unsigned long flags; |
2451 | 2451 | ||
2452 | musb_platform_disable(musb); | ||
2453 | musb_generic_disable(musb); | ||
2454 | |||
2452 | spin_lock_irqsave(&musb->lock, flags); | 2455 | spin_lock_irqsave(&musb->lock, flags); |
2453 | 2456 | ||
2454 | if (is_peripheral_active(musb)) { | 2457 | if (is_peripheral_active(musb)) { |
@@ -2502,6 +2505,9 @@ static int musb_resume(struct device *dev) | |||
2502 | pm_runtime_disable(dev); | 2505 | pm_runtime_disable(dev); |
2503 | pm_runtime_set_active(dev); | 2506 | pm_runtime_set_active(dev); |
2504 | pm_runtime_enable(dev); | 2507 | pm_runtime_enable(dev); |
2508 | |||
2509 | musb_start(musb); | ||
2510 | |||
2505 | return 0; | 2511 | return 0; |
2506 | } | 2512 | } |
2507 | 2513 | ||