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@xxxxxxxxx> > > On returning from hibernation 'restore; callback is called, not > 'resume'. > This fixes breakage introduced by commit > eaf140b60ec961252083ab8adaf67aef29a362dd > > Signed-off-by: Dmitry Torokhov <dmitry.torokhov@xxxxxxxxx> > --- > 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-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html