lkml.org 
[lkml]   [2013]   [Dec]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: 3.12.x looses serial mouse over hibernate + resume
On 2013-12-04 18:16, Dmitry Torokhov wrote:
> 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.
>

This patch works very well for many following hibernate/resume
cyles, now, since the patch is applied. And it doesn't show any
side-effects for me.
Thank you for "taking it in".

Best regards, Manuel Krause



\
 
 \ /
  Last update: 2013-12-04 21:41    [W:0.073 / U:1.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site