linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: musb: fix context save over suspend.
@ 2013-01-21  9:28 NeilBrown
  2013-01-21 11:38 ` Igor Grinberg
  0 siblings, 1 reply; 8+ messages in thread
From: NeilBrown @ 2013-01-21  9:28 UTC (permalink / raw)
  To: Felipe Balbi, Greg Kroah-Hartman; +Cc: linux-usb, linux-kernel, linux-omap

[-- Attachment #1: Type: text/plain, Size: 1109 bytes --]



The standard suspend sequence involves runtime_resuming
devices before suspending the system.
So just saving context in runtime_suspend and restoring it
in runtime resume isn't enough.  We  must also save in "suspend"
and restore in "resume".

Without this patch, and OMAP3 system with off_mode enabled will find
the musb port non-functional after suspend/resume.  With the patch it
works perfectly.

Signed-off-by: NeilBrown <neilb@suse.de>

diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index fd34867..b6ccc02 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -2225,6 +2225,7 @@ static int musb_suspend(struct device *dev)
 	}
 
 	spin_unlock_irqrestore(&musb->lock, flags);
+	musb_save_context(musb);
 	return 0;
 }
 
@@ -2234,6 +2235,8 @@ static int musb_resume_noirq(struct device *dev)
 	 * unless for some reason the whole soc powered down or the USB
 	 * module got reset through the PSC (vs just being disabled).
 	 */
+	struct musb	*musb = dev_to_musb(dev);
+	musb_restore_context(musb);
 	return 0;
 }
 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-02-13  1:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-21  9:28 [PATCH] usb: musb: fix context save over suspend NeilBrown
2013-01-21 11:38 ` Igor Grinberg
2013-01-21 21:38   ` NeilBrown
2013-01-22  9:12     ` Igor Grinberg
2013-01-23 11:15       ` Bilovol, Ruslan
2013-02-12 21:03     ` Kevin Hilman
     [not found]       ` <87zjz9i6s7.fsf-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2013-02-13  1:01         ` NeilBrown
2013-02-13  1:13           ` Kevin Hilman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).