From: Igor Grinberg <grinberg@compulab.co.il>
To: NeilBrown <neilb@suse.de>
Cc: Felipe Balbi <balbi@ti.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-omap@vger.kernel.org, Kevin Hilman <khilman@ti.com>
Subject: Re: [PATCH] usb: musb: fix context save over suspend.
Date: Mon, 21 Jan 2013 13:38:59 +0200 [thread overview]
Message-ID: <50FD28D3.5070107@compulab.co.il> (raw)
In-Reply-To: <20130121202831.40a09bbc@notabene.brown>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi Neil,
On 01/21/13 11:28, NeilBrown wrote:
>
>
> 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.
Hmmm... Some time ago, this has been removed in
5d193ce8 (usb: musb: PM: fix context save/restore in suspend/resume path)
Am I missing something? Or things changed and now this patch is correct?
>
> 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;
> }
>
- --
Regards,
Igor.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQIcBAEBAgAGBQJQ/SjTAAoJEBDE8YO64EfaHrsP/2bl4rP6L/tWLSZ+rNEdz6B+
Qo+HVOhnTVsOxgWbbd5VrfhE28jLoFGMslrLuI+geeCcJ1zgwNsahG9C11bygyfu
54hQgkmaxDJPDKAlalcy7VK9C6tOTgQV5iSbuRlemttK879dTrb+33zP6idn5+zK
kxptY38fpmyojnl8gJiVa6Plik/apQcVr+GIx8CMwj+YQC5vkdg7cUEWyngfyk2C
W0U4NceroS8NSjRbcFV3V6Q912TVjKzl+B2yxVD0OBaSK4BpHEncDBXiVx8APq87
4nDeBB5gDXi1rtN3YjcfDaFu0me5qzpYc3JFFidvdLTdXIdvxDzjHgMqsZB8ZBYC
R0e5PtIw/62I90d63JkXZXVRTB7JeZsGfZFY2R7MxBab9or8zz0OyYwGWoW63vzH
oFrwmAkWoD0IEKcfc8+dd99eicgZrmQL6FDWrEMsX+RS34LRtVU30SVAudRhY+CR
MhNCjKyFySwx7wqkGgJl1ECl0Y6U4ua0v4bv7kdE6eyrgbQIkiGliSJ7DhWBPcP6
iMIOTwC7+LwPYP/MX2uYR3DXDfI0XwiqdtyzhD9LJe4PRol8zjozS2j0Y7FriItw
jFqsgCgwDc9j8ufcpXf5ZynJYnlCG0iLuAPEUugZot83/CpxgU++A8cuHqUrOnhH
76L95rflUTkpiQ76ffP7
=jqXb
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2013-01-21 11:39 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-21 9:28 [PATCH] usb: musb: fix context save over suspend NeilBrown
2013-01-21 11:38 ` Igor Grinberg [this message]
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
2013-02-13 1:01 ` NeilBrown
2013-02-13 1:13 ` Kevin Hilman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50FD28D3.5070107@compulab.co.il \
--to=grinberg@compulab.co.il \
--cc=balbi@ti.com \
--cc=gregkh@linuxfoundation.org \
--cc=khilman@ti.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=neilb@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox