* [PATCH] Input: mark serio and i8042 as suspended when hibernating too. @ 2009-07-05 2:13 Thadeu Lima de Souza Cascardo 2009-07-06 22:40 ` Rafael J. Wysocki 0 siblings, 1 reply; 5+ messages in thread From: Thadeu Lima de Souza Cascardo @ 2009-07-05 2:13 UTC (permalink / raw) To: linux-input Cc: dmitry.torokhov, rjw, maciej.rutecki, alan-jenkins, linux-kernel, Thadeu Lima de Souza Cascardo serio ports are not being restarted any longer because resume operations after hibernate do nothing, since the device has not been marked as suspended. This happens because suspend is only considering the SUSPEND event but not the FREEZE event. Note that this driver has still to migrate to dev_pm_ops, but this fixes this particular bug now. Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> --- drivers/input/serio/i8042.c | 7 ++++--- drivers/input/serio/serio.c | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c index f919bf5..582245c 100644 --- a/drivers/input/serio/i8042.c +++ b/drivers/input/serio/i8042.c @@ -934,10 +934,11 @@ static bool i8042_suspended; static int i8042_suspend(struct platform_device *dev, pm_message_t state) { - if (!i8042_suspended && state.event == PM_EVENT_SUSPEND) { + if (!i8042_suspended && state.event == PM_EVENT_SUSPEND) i8042_controller_reset(); - i8042_suspended = true; - } + + i8042_suspended = state.event == PM_EVENT_SUSPEND || + state.event == PM_EVENT_FREEZE; return 0; } diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c index fb17573..d66f494 100644 --- a/drivers/input/serio/serio.c +++ b/drivers/input/serio/serio.c @@ -935,10 +935,11 @@ static int serio_suspend(struct device *dev, pm_message_t state) { struct serio *serio = to_serio_port(dev); - if (!serio->suspended && state.event == PM_EVENT_SUSPEND) { + if (!serio->suspended && state.event == PM_EVENT_SUSPEND) serio_cleanup(serio); - serio->suspended = true; - } + + serio->suspended = state.event == PM_EVENT_SUSPEND || + state.event == PM_EVENT_FREEZE; return 0; } -- 1.6.3 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] Input: mark serio and i8042 as suspended when hibernating too. 2009-07-05 2:13 [PATCH] Input: mark serio and i8042 as suspended when hibernating too Thadeu Lima de Souza Cascardo @ 2009-07-06 22:40 ` Rafael J. Wysocki 2009-07-06 23:33 ` Thadeu Lima de Souza Cascardo 2009-07-08 6:54 ` Dmitry Torokhov 0 siblings, 2 replies; 5+ messages in thread From: Rafael J. Wysocki @ 2009-07-06 22:40 UTC (permalink / raw) To: Thadeu Lima de Souza Cascardo Cc: linux-input, dmitry.torokhov, maciej.rutecki, alan-jenkins, linux-kernel, pm list On Sunday 05 July 2009, Thadeu Lima de Souza Cascardo wrote: > serio ports are not being restarted any longer because resume operations > after hibernate do nothing, since the device has not been marked as > suspended. This happens because suspend is only considering the SUSPEND > event but not the FREEZE event. > > Note that this driver has still to migrate to dev_pm_ops, but this fixes > this particular bug now. Hmm, this looks like a fix for: http://bugzilla.kernel.org/show_bug.cgi?id=13643 Any objections to merging it through the suspend tree? Best, Rafael > Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> > --- > drivers/input/serio/i8042.c | 7 ++++--- > drivers/input/serio/serio.c | 7 ++++--- > 2 files changed, 8 insertions(+), 6 deletions(-) > > diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c > index f919bf5..582245c 100644 > --- a/drivers/input/serio/i8042.c > +++ b/drivers/input/serio/i8042.c > @@ -934,10 +934,11 @@ static bool i8042_suspended; > > static int i8042_suspend(struct platform_device *dev, pm_message_t state) > { > - if (!i8042_suspended && state.event == PM_EVENT_SUSPEND) { > + if (!i8042_suspended && state.event == PM_EVENT_SUSPEND) > i8042_controller_reset(); > - i8042_suspended = true; > - } > + > + i8042_suspended = state.event == PM_EVENT_SUSPEND || > + state.event == PM_EVENT_FREEZE; > > return 0; > } > diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c > index fb17573..d66f494 100644 > --- a/drivers/input/serio/serio.c > +++ b/drivers/input/serio/serio.c > @@ -935,10 +935,11 @@ static int serio_suspend(struct device *dev, pm_message_t state) > { > struct serio *serio = to_serio_port(dev); > > - if (!serio->suspended && state.event == PM_EVENT_SUSPEND) { > + if (!serio->suspended && state.event == PM_EVENT_SUSPEND) > serio_cleanup(serio); > - serio->suspended = true; > - } > + > + serio->suspended = state.event == PM_EVENT_SUSPEND || > + state.event == PM_EVENT_FREEZE; > > return 0; > } ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Input: mark serio and i8042 as suspended when hibernating too. 2009-07-06 22:40 ` Rafael J. Wysocki @ 2009-07-06 23:33 ` Thadeu Lima de Souza Cascardo 2009-07-08 6:54 ` Dmitry Torokhov 1 sibling, 0 replies; 5+ messages in thread From: Thadeu Lima de Souza Cascardo @ 2009-07-06 23:33 UTC (permalink / raw) To: Rafael J. Wysocki Cc: linux-input, dmitry.torokhov, maciej.rutecki, alan-jenkins, linux-kernel, pm list [-- Attachment #1: Type: text/plain, Size: 3566 bytes --] On Tue, Jul 07, 2009 at 12:40:42AM +0200, Rafael J. Wysocki wrote: > On Sunday 05 July 2009, Thadeu Lima de Souza Cascardo wrote: > > serio ports are not being restarted any longer because resume operations > > after hibernate do nothing, since the device has not been marked as > > suspended. This happens because suspend is only considering the SUSPEND > > event but not the FREEZE event. > > > > Note that this driver has still to migrate to dev_pm_ops, but this fixes > > this particular bug now. > > Hmm, this looks like a fix for: > http://bugzilla.kernel.org/show_bug.cgi?id=13643 > > Any objections to merging it through the suspend tree? > > Best, > Rafael > > I even got to this bug report myself, but 1) I wasn't sure it would fix the original problem; 2) I didn't know how to include the patch as a solution in the report and submit it to the lists in one tackle and was too lazy to do it through the web interface. I found out the two references before I could find the bug report by looking into the mailing list archives (both for linux-input and linux-kernel). And since no one pointed out a solution, I've tried to solve it myself. Fortunately, those references told me that was a problem not found at 2.6.30 and that I should look for commits since then, not since the last git after that I couldn't find the problem in, and that hibernate was the problem. The fact is that I had hibernate totally failing for me for that git version and hibernate was the first thing I've tried, even before using the mouse. Anyway, since you are the PM maintainer and had submitted messages to the bug report and one of the messages, I've decided to copy you and I would be very glad that the merge was done throught your tree as any other tree. As long as this enters rc3, for sure. :-D My best and any tips as to get these regression fixes more noticeable, I'll be glad. Cascardo. > > Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com> > > --- > > drivers/input/serio/i8042.c | 7 ++++--- > > drivers/input/serio/serio.c | 7 ++++--- > > 2 files changed, 8 insertions(+), 6 deletions(-) > > > > diff --git a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c > > index f919bf5..582245c 100644 > > --- a/drivers/input/serio/i8042.c > > +++ b/drivers/input/serio/i8042.c > > @@ -934,10 +934,11 @@ static bool i8042_suspended; > > > > static int i8042_suspend(struct platform_device *dev, pm_message_t state) > > { > > - if (!i8042_suspended && state.event == PM_EVENT_SUSPEND) { > > + if (!i8042_suspended && state.event == PM_EVENT_SUSPEND) > > i8042_controller_reset(); > > - i8042_suspended = true; > > - } > > + > > + i8042_suspended = state.event == PM_EVENT_SUSPEND || > > + state.event == PM_EVENT_FREEZE; > > > > return 0; > > } > > diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c > > index fb17573..d66f494 100644 > > --- a/drivers/input/serio/serio.c > > +++ b/drivers/input/serio/serio.c > > @@ -935,10 +935,11 @@ static int serio_suspend(struct device *dev, pm_message_t state) > > { > > struct serio *serio = to_serio_port(dev); > > > > - if (!serio->suspended && state.event == PM_EVENT_SUSPEND) { > > + if (!serio->suspended && state.event == PM_EVENT_SUSPEND) > > serio_cleanup(serio); > > - serio->suspended = true; > > - } > > + > > + serio->suspended = state.event == PM_EVENT_SUSPEND || > > + state.event == PM_EVENT_FREEZE; > > > > return 0; > > } [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 197 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Input: mark serio and i8042 as suspended when hibernating too. 2009-07-06 22:40 ` Rafael J. Wysocki 2009-07-06 23:33 ` Thadeu Lima de Souza Cascardo @ 2009-07-08 6:54 ` Dmitry Torokhov 2009-07-08 11:06 ` Rafael J. Wysocki 1 sibling, 1 reply; 5+ messages in thread From: Dmitry Torokhov @ 2009-07-08 6:54 UTC (permalink / raw) To: Rafael J. Wysocki Cc: Thadeu Lima de Souza Cascardo, linux-kernel, alan-jenkins, linux-input, pm list, maciej.rutecki On Tue, Jul 07, 2009 at 12:40:42AM +0200, Rafael J. Wysocki wrote: > On Sunday 05 July 2009, Thadeu Lima de Souza Cascardo wrote: > > serio ports are not being restarted any longer because resume operations > > after hibernate do nothing, since the device has not been marked as > > suspended. This happens because suspend is only considering the SUSPEND > > event but not the FREEZE event. > > > > Note that this driver has still to migrate to dev_pm_ops, but this fixes > > this particular bug now. > > Hmm, this looks like a fix for: > http://bugzilla.kernel.org/show_bug.cgi?id=13643 > > Any objections to merging it through the suspend tree? > Oops, just applied it to mine before reading your mail... I hope Linus will pick my pull request soon so it won't matter thoough. -- Dmitry ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] Input: mark serio and i8042 as suspended when hibernating too. 2009-07-08 6:54 ` Dmitry Torokhov @ 2009-07-08 11:06 ` Rafael J. Wysocki 0 siblings, 0 replies; 5+ messages in thread From: Rafael J. Wysocki @ 2009-07-08 11:06 UTC (permalink / raw) To: Dmitry Torokhov Cc: Thadeu Lima de Souza Cascardo, linux-input, maciej.rutecki, alan-jenkins, linux-kernel, pm list On Wednesday 08 July 2009, Dmitry Torokhov wrote: > On Tue, Jul 07, 2009 at 12:40:42AM +0200, Rafael J. Wysocki wrote: > > On Sunday 05 July 2009, Thadeu Lima de Souza Cascardo wrote: > > > serio ports are not being restarted any longer because resume operations > > > after hibernate do nothing, since the device has not been marked as > > > suspended. This happens because suspend is only considering the SUSPEND > > > event but not the FREEZE event. > > > > > > Note that this driver has still to migrate to dev_pm_ops, but this fixes > > > this particular bug now. > > > > Hmm, this looks like a fix for: > > http://bugzilla.kernel.org/show_bug.cgi?id=13643 > > > > Any objections to merging it through the suspend tree? > > > > Oops, just applied it to mine before reading your mail... I hope Linus > will pick my pull request soon so it won't matter thoough. No problem, I haven't added it to my for-linus branch yet. Best, Rafael ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-07-08 11:06 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-07-05 2:13 [PATCH] Input: mark serio and i8042 as suspended when hibernating too Thadeu Lima de Souza Cascardo 2009-07-06 22:40 ` Rafael J. Wysocki 2009-07-06 23:33 ` Thadeu Lima de Souza Cascardo 2009-07-08 6:54 ` Dmitry Torokhov 2009-07-08 11:06 ` Rafael J. Wysocki
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).