summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorKevin Hilman <khilman@ti.com>2011-11-22 17:18:24 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2011-11-29 23:19:03 +0900
commit5d193ce8f1fa7c67c7fd7be2c03ef31eed344a4f (patch)
tree88062b23747c99a753aca4c77aaf356bf1d18aeb /drivers/usb
parent118205d6b6752e22e19b771771174e6426582311 (diff)
downloadblackbird-op-linux-5d193ce8f1fa7c67c7fd7be2c03ef31eed344a4f.tar.gz
blackbird-op-linux-5d193ce8f1fa7c67c7fd7be2c03ef31eed344a4f.zip
usb: musb: PM: fix context save/restore in suspend/resume path
Currently the driver tries to save context in the suspend path, but will cause an abort if the device is already runtime suspended. This happens, for example, if MUSB loaded/compiled-in, in host mode, but no USB devices are attached. MUSB will be runtime suspended, but then attempting a system suspend will crash due to the context save being attempted while the device is disabled. On OMAP, as of v3.1, the driver's ->runtime_suspend() callback will be called late in the suspend path (by the PM domain layer) if the driver is not already runtime suspended, ensuring a full shutdown. Therefore, the context save is not needed in the ->suspend() method since it will be called in the ->runtime_suspend() method anyways (similarily for resume.) NOTE: this leaves the suspend/resume methods basically empty (with some FIXMEs and comments, but I'll leave it to the maintainers to decide whether to remove them. Cc: stable@vger.kernel.org Signed-off-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/musb/musb_core.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index c1fa12ec7a9a..b63ab1570103 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -2301,18 +2301,12 @@ static int musb_suspend(struct device *dev)
*/
}
- musb_save_context(musb);
-
spin_unlock_irqrestore(&musb->lock, flags);
return 0;
}
static int musb_resume_noirq(struct device *dev)
{
- struct musb *musb = dev_to_musb(dev);
-
- musb_restore_context(musb);
-
/* for static cmos like DaVinci, register values were preserved
* unless for some reason the whole soc powered down or the USB
* module got reset through the PSC (vs just being disabled).
OpenPOWER on IntegriCloud