lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 4 Dec 2013 09:16:26 -0800
From:	Dmitry Torokhov <dmitry.torokhov@...il.com>
To:	"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>
Cc:	Peter Hurley <peter@...leysoftware.com>,
	linux-kernel@...r.kernel.org, Greg KH <gregkh@...uxfoundation.org>,
	linux-input@...r.kernel.org,
	linux-serial <linux-serial@...r.kernel.org>,
	Shuah Khan <shuah.kh@...sung.com>,
	Manuel Krause <manuelkrause@...scape.net>
Subject: Re: 3.12.x looses serial mouse over hibernate + resume

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@...il.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@...il.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ