linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Cc: Peter Hurley <peter@hurleysoftware.com>,
	linux-kernel@vger.kernel.org,
	Greg KH <gregkh@linuxfoundation.org>,
	linux-input@vger.kernel.org,
	linux-serial <linux-serial@vger.kernel.org>,
	Shuah Khan <shuah.kh@samsung.com>,
	Manuel Krause <manuelkrause@netscape.net>
Subject: Re: 3.12.x looses serial mouse over hibernate + resume
Date: Wed, 4 Dec 2013 09:16:26 -0800	[thread overview]
Message-ID: <20131204171626.GD8838@core.coreip.homeip.net> (raw)
In-Reply-To: <529CF034.1060505@netscape.net>

On Mon, Dec 02, 2013 at 09:40:20PM +0100, Manuel Krause wrote:
> On 2013-12-02 20:07, Dmitry Torokhov wrote:
> >
> >Thank you Manuel, but IO think the patch is not complete as we need to
> >re-enable PNP devices after we make a snapshot to make sure they are
> >working and can handle saving the data. Coudl you please try the patch
> >below?
> >
> 
> PNP: fix restoring devices after hibernation
> 
> From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> 
> On returning from hibernation 'restore; callback is called, not
> 'resume'.
> This fixes breakage introduced by commit
> eaf140b60ec961252083ab8adaf67aef29a362dd
> 
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
> ---
>  drivers/pnp/driver.c |   12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/pnp/driver.c b/drivers/pnp/driver.c
> index a39ee38..2bd5c5f 100644
> --- a/drivers/pnp/driver.c
> +++ b/drivers/pnp/driver.c
> @@ -197,6 +197,11 @@ static int pnp_bus_freeze(struct device *dev)
>  	return __pnp_bus_suspend(dev, PMSG_FREEZE);
>  }
> 
> +static int pnp_bus_poweroff(struct device *dev)
> +{
> +	return __pnp_bus_suspend(dev, PMSG_HIBERNATE);
> +}
> +
>  static int pnp_bus_resume(struct device *dev)
>  {
>  	struct pnp_dev *pnp_dev = to_pnp_dev(dev);
> @@ -234,9 +239,14 @@ static int pnp_bus_resume(struct device *dev)
>  }
> 
>  static const struct dev_pm_ops pnp_bus_dev_pm_ops = {
> +	/* Suspend callbacks */
>  	.suspend = pnp_bus_suspend,
> -	.freeze = pnp_bus_freeze,
>  	.resume = pnp_bus_resume,
> +	/* Hibernate callbacks */
> +	.freeze = pnp_bus_freeze,
> +	.thaw = pnp_bus_resume,
> +	.poweroff = pnp_bus_poweroff,
> +	.restore = pnp_bus_resume,
>  };
> 
>  struct bus_type pnp_bus_type = {
> 
> ALSO, YES, this second patch version does cure the issue, on here,
> too.

Rafael,

Will you please take this patch in? It would also make sense to add it
to stable I think.

Thanks.

-- 
Dmitry

  reply	other threads:[~2013-12-04 17:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <52951E69.7090602@netscape.net>
2013-12-01 15:43 ` 3.12.x looses serial mouse over hibernate + resume Peter Hurley
2013-12-02 16:08   ` Manuel Krause
2013-12-02 16:38     ` Dmitry Torokhov
2013-12-02 16:45       ` Dmitry Torokhov
2013-12-02 18:35         ` Manuel Krause
2013-12-02 18:44           ` Shuah Khan
2013-12-02 19:08             ` Dmitry Torokhov
2013-12-02 19:30               ` Shuah Khan
2013-12-02 19:07           ` Dmitry Torokhov
2013-12-02 20:40             ` Manuel Krause
2013-12-04 17:16               ` Dmitry Torokhov [this message]
2013-12-04 20:33                 ` Manuel Krause
2013-12-05  0:41                 ` Rafael J. Wysocki

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=20131204171626.GD8838@core.coreip.homeip.net \
    --to=dmitry.torokhov@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=manuelkrause@netscape.net \
    --cc=peter@hurleysoftware.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=shuah.kh@samsung.com \
    /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;
as well as URLs for NNTP newsgroup(s).