All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Bug 13865] New: Can only resume with HP_WMI selected on compaq nc6000 when 4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is reverted
       [not found] <bug-13865-10028@http.bugzilla.kernel.org/>
@ 2009-07-29 20:57 ` Rafael J. Wysocki
  2009-07-29 21:31   ` [Bug 13865] " Frans Pop
                     ` (3 more replies)
  2009-07-29 20:57 ` [Bug 13865] New: Can only resume with HP_WMI selected on compaq nc6000 when 4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is reverted Rafael J. Wysocki
  1 sibling, 4 replies; 23+ messages in thread
From: Rafael J. Wysocki @ 2009-07-29 20:57 UTC (permalink / raw)
  To: Frans Pop
  Cc: bugzilla-daemon, Len Brown, ACPI Devel Maling List, pm list, LKML

On Wednesday 29 July 2009, you wrote:
> http://bugzilla.kernel.org/show_bug.cgi?id=13865
> 
>            Summary: Can only resume with HP_WMI selected on compaq nc6000
>                     when 4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is
>                     reverted
>            Product: Power Management
>            Version: 2.5
>     Kernel Version: 2.6.30
>           Platform: All
>         OS/Version: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: normal
>           Priority: P1
>          Component: Hibernation/Suspend
>         AssignedTo: power-management_other@kernel-bugs.osdl.org
>         ReportedBy: cedric@belbone.be
>         Regression: No
> 
> 
> Just for testing I enabled HP_WMI. But from then, I could not resume anymore.
> I just reverted the last git commit on the 'drivers/platform/x86/hp-wmi.c' code
> (4c395bdd3f2ca8f7e8efad881e16071182c3b8ca) and now I can resume.
> The problem still persists on .31-rc serie

Frans, that's something for you to take care of.

Best,
Rafael

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [Bug 13865] New: Can only resume with HP_WMI selected on compaq nc6000 when 4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is reverted
       [not found] <bug-13865-10028@http.bugzilla.kernel.org/>
  2009-07-29 20:57 ` [Bug 13865] New: Can only resume with HP_WMI selected on compaq nc6000 when 4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is reverted Rafael J. Wysocki
@ 2009-07-29 20:57 ` Rafael J. Wysocki
  1 sibling, 0 replies; 23+ messages in thread
From: Rafael J. Wysocki @ 2009-07-29 20:57 UTC (permalink / raw)
  To: Frans Pop; +Cc: ACPI Devel Maling List, pm list, bugzilla-daemon, LKML

On Wednesday 29 July 2009, you wrote:
> http://bugzilla.kernel.org/show_bug.cgi?id=13865
> 
>            Summary: Can only resume with HP_WMI selected on compaq nc6000
>                     when 4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is
>                     reverted
>            Product: Power Management
>            Version: 2.5
>     Kernel Version: 2.6.30
>           Platform: All
>         OS/Version: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: normal
>           Priority: P1
>          Component: Hibernation/Suspend
>         AssignedTo: power-management_other@kernel-bugs.osdl.org
>         ReportedBy: cedric@belbone.be
>         Regression: No
> 
> 
> Just for testing I enabled HP_WMI. But from then, I could not resume anymore.
> I just reverted the last git commit on the 'drivers/platform/x86/hp-wmi.c' code
> (4c395bdd3f2ca8f7e8efad881e16071182c3b8ca) and now I can resume.
> The problem still persists on .31-rc serie

Frans, that's something for you to take care of.

Best,
Rafael

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug 13865] Can only resume with HP_WMI selected on compaq nc6000 when 4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is reverted
  2009-07-29 20:57 ` [Bug 13865] New: Can only resume with HP_WMI selected on compaq nc6000 when 4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is reverted Rafael J. Wysocki
@ 2009-07-29 21:31   ` Frans Pop
  2009-07-29 22:57     ` Frans Pop
                       ` (3 more replies)
  2009-07-29 21:31   ` Frans Pop
                     ` (2 subsequent siblings)
  3 siblings, 4 replies; 23+ messages in thread
From: Frans Pop @ 2009-07-29 21:31 UTC (permalink / raw)
  To: cedric; +Cc: bugzilla-daemon, ACPI Devel Maling List, pm list, Matthew Garrett

On Wednesday 29 July 2009, Rafael J. Wysocki wrote:
> On Wednesday 29 July 2009, you wrote:
> > Just for testing I enabled HP_WMI. But from then, I could not resume
> > anymore. I just reverted the last git commit on the
> > 'drivers/platform/x86/hp-wmi.c' code
> > (4c395bdd3f2ca8f7e8efad881e16071182c3b8ca) and now I can resume. The
> > problem still persists on .31-rc serie
>
> Frans, that's something for you to take care of.

I'll at least give it a try.

Cedric, as a start, can you please provide the output of the following 
commands after the system is booted and with hp-wmi loaded:
$ grep . /sys/devices/platform/hp-wmi/*
$ ls -l /dev/input/*
$ cat /proc/bus/input/devices

Does an unload and reload of the module work correctly? What gets output 
in dmesg by that?

The strange thing is that the resume function does not do anything that's 
not also done in hp_wmi_input_setup(). The only thing I can think of is 
that we might need to test for wmi_has_guid(HPWMI_EVENT_GUID) because 
that model simply does not support input events.

Cheers,
FJP

^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug 13865] Can only resume with HP_WMI selected on compaq nc6000 when 4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is reverted
  2009-07-29 20:57 ` [Bug 13865] New: Can only resume with HP_WMI selected on compaq nc6000 when 4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is reverted Rafael J. Wysocki
  2009-07-29 21:31   ` [Bug 13865] " Frans Pop
@ 2009-07-29 21:31   ` Frans Pop
  2009-07-30 10:42     ` Frans Pop
  2009-07-30 10:42   ` Frans Pop
  3 siblings, 0 replies; 23+ messages in thread
From: Frans Pop @ 2009-07-29 21:31 UTC (permalink / raw)
  To: cedric; +Cc: ACPI Devel Maling List, pm list, bugzilla-daemon

On Wednesday 29 July 2009, Rafael J. Wysocki wrote:
> On Wednesday 29 July 2009, you wrote:
> > Just for testing I enabled HP_WMI. But from then, I could not resume
> > anymore. I just reverted the last git commit on the
> > 'drivers/platform/x86/hp-wmi.c' code
> > (4c395bdd3f2ca8f7e8efad881e16071182c3b8ca) and now I can resume. The
> > problem still persists on .31-rc serie
>
> Frans, that's something for you to take care of.

I'll at least give it a try.

Cedric, as a start, can you please provide the output of the following 
commands after the system is booted and with hp-wmi loaded:
$ grep . /sys/devices/platform/hp-wmi/*
$ ls -l /dev/input/*
$ cat /proc/bus/input/devices

Does an unload and reload of the module work correctly? What gets output 
in dmesg by that?

The strange thing is that the resume function does not do anything that's 
not also done in hp_wmi_input_setup(). The only thing I can think of is 
that we might need to test for wmi_has_guid(HPWMI_EVENT_GUID) because 
that model simply does not support input events.

Cheers,
FJP

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [Bug 13865] Can only resume with HP_WMI selected on compaq nc6000 when 4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is reverted
  2009-07-29 21:31   ` [Bug 13865] " Frans Pop
@ 2009-07-29 22:57     ` Frans Pop
  2009-07-29 22:57     ` Frans Pop
                       ` (2 subsequent siblings)
  3 siblings, 0 replies; 23+ messages in thread
From: Frans Pop @ 2009-07-29 22:57 UTC (permalink / raw)
  To: cedric, linux-kernel
  Cc: bugzilla-daemon, ACPI Devel Maling List, pm list, Matthew Garrett

On Wednesday 29 July 2009, Frans Pop wrote:
> The strange thing is that the resume function does not do anything
> that's not also done in hp_wmi_input_setup(). The only thing I can
> think of is that we might need to test for
> wmi_has_guid(HPWMI_EVENT_GUID) because that model simply does not
> support input events.

If that is the problem, the following patch will hopefully fix it.
This patch is against .31-rc4 but will need only minor changes to
apply against .30.

Subject: hp-wmi: check that an input device exists in resume handler

Some systems may not support input events, or registering the input
handler may have failed. So check that an input device exists before
trying to set the docking and tablet mode state during resume.

Fixes: http://bugzilla.kernel.org/show_bug.cgi?id=13865

Reported-by: cedric@belbone.be
Signed-off-by: Frans Pop <elendil@planet.nl>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>

diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c
index 369bd43..63c9214 100644
--- a/drivers/platform/x86/hp-wmi.c
+++ b/drivers/platform/x86/hp-wmi.c
@@ -540,11 +540,13 @@ static int hp_wmi_resume_handler(struct device *device)
 	 * the input layer will only actually pass it on if the state
 	 * changed.
 	 */
-
-	input_report_switch(hp_wmi_input_dev, SW_DOCK, hp_wmi_dock_state());
-	input_report_switch(hp_wmi_input_dev, SW_TABLET_MODE,
-			    hp_wmi_tablet_state());
-	input_sync(hp_wmi_input_dev);
+	if (hp_wmi_input_dev) {
+		input_report_switch(hp_wmi_input_dev, SW_DOCK,
+				    hp_wmi_dock_state());
+		input_report_switch(hp_wmi_input_dev, SW_TABLET_MODE,
+				    hp_wmi_tablet_state());
+		input_sync(hp_wmi_input_dev);
+	}
 
 	if (wifi_rfkill)
 		rfkill_set_states(wifi_rfkill,

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* Re: [Bug 13865] Can only resume with HP_WMI selected on compaq nc6000 when 4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is reverted
  2009-07-29 21:31   ` [Bug 13865] " Frans Pop
  2009-07-29 22:57     ` Frans Pop
@ 2009-07-29 22:57     ` Frans Pop
  2009-07-30  9:20     ` Cédric Godin
  2009-07-30  9:20     ` Cédric Godin
  3 siblings, 0 replies; 23+ messages in thread
From: Frans Pop @ 2009-07-29 22:57 UTC (permalink / raw)
  To: cedric, linux-kernel; +Cc: ACPI Devel Maling List, pm list, bugzilla-daemon

On Wednesday 29 July 2009, Frans Pop wrote:
> The strange thing is that the resume function does not do anything
> that's not also done in hp_wmi_input_setup(). The only thing I can
> think of is that we might need to test for
> wmi_has_guid(HPWMI_EVENT_GUID) because that model simply does not
> support input events.

If that is the problem, the following patch will hopefully fix it.
This patch is against .31-rc4 but will need only minor changes to
apply against .30.

Subject: hp-wmi: check that an input device exists in resume handler

Some systems may not support input events, or registering the input
handler may have failed. So check that an input device exists before
trying to set the docking and tablet mode state during resume.

Fixes: http://bugzilla.kernel.org/show_bug.cgi?id=13865

Reported-by: cedric@belbone.be
Signed-off-by: Frans Pop <elendil@planet.nl>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>

diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c
index 369bd43..63c9214 100644
--- a/drivers/platform/x86/hp-wmi.c
+++ b/drivers/platform/x86/hp-wmi.c
@@ -540,11 +540,13 @@ static int hp_wmi_resume_handler(struct device *device)
 	 * the input layer will only actually pass it on if the state
 	 * changed.
 	 */
-
-	input_report_switch(hp_wmi_input_dev, SW_DOCK, hp_wmi_dock_state());
-	input_report_switch(hp_wmi_input_dev, SW_TABLET_MODE,
-			    hp_wmi_tablet_state());
-	input_sync(hp_wmi_input_dev);
+	if (hp_wmi_input_dev) {
+		input_report_switch(hp_wmi_input_dev, SW_DOCK,
+				    hp_wmi_dock_state());
+		input_report_switch(hp_wmi_input_dev, SW_TABLET_MODE,
+				    hp_wmi_tablet_state());
+		input_sync(hp_wmi_input_dev);
+	}
 
 	if (wifi_rfkill)
 		rfkill_set_states(wifi_rfkill,

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* Re: [Bug 13865] Can only resume with HP_WMI selected on compaq nc6000 when 4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is reverted
  2009-07-29 21:31   ` [Bug 13865] " Frans Pop
  2009-07-29 22:57     ` Frans Pop
  2009-07-29 22:57     ` Frans Pop
@ 2009-07-30  9:20     ` Cédric Godin
  2009-07-30  9:56       ` Frans Pop
  2009-07-30  9:56       ` Frans Pop
  2009-07-30  9:20     ` Cédric Godin
  3 siblings, 2 replies; 23+ messages in thread
From: Cédric Godin @ 2009-07-30  9:20 UTC (permalink / raw)
  To: Frans Pop
  Cc: bugzilla-daemon, ACPI Devel Maling List, pm list, Matthew Garrett

Frans Pop wrote:
> On Wednesday 29 July 2009, Rafael J. Wysocki wrote:
>   
>> On Wednesday 29 July 2009, you wrote:
>>     
>>> Just for testing I enabled HP_WMI. But from then, I could not resume
>>> anymore. I just reverted the last git commit on the
>>> 'drivers/platform/x86/hp-wmi.c' code
>>> (4c395bdd3f2ca8f7e8efad881e16071182c3b8ca) and now I can resume. The
>>> problem still persists on .31-rc serie
>>>       
>> Frans, that's something for you to take care of.
>>     
>
> I'll at least give it a try.
>
> Cedric, as a start, can you please provide the output of the following 
> commands after the system is booted and with hp-wmi loaded:
> $ grep . /sys/devices/platform/hp-wmi/*
> $ ls -l /dev/input/*
> $ cat /proc/bus/input/devices
>
> Does an unload and reload of the module work correctly? What gets output 
> in dmesg by that?
>
> The strange thing is that the resume function does not do anything that's 
> not also done in hp_wmi_input_setup(). The only thing I can think of is 
> that we might need to test for wmi_has_guid(HPWMI_EVENT_GUID) because 
> that model simply does not support input events.
>
> Cheers,
> FJP
>   
I tested your patch (from buzilla) and now I can resume.

Thanks ! You have my tested-by ;-)

PS: I suppose you don't need this infos anymore ?

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [Bug 13865] Can only resume with HP_WMI selected on compaq nc6000 when 4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is reverted
  2009-07-29 21:31   ` [Bug 13865] " Frans Pop
                       ` (2 preceding siblings ...)
  2009-07-30  9:20     ` Cédric Godin
@ 2009-07-30  9:20     ` Cédric Godin
  3 siblings, 0 replies; 23+ messages in thread
From: Cédric Godin @ 2009-07-30  9:20 UTC (permalink / raw)
  To: Frans Pop; +Cc: ACPI Devel Maling List, pm list, bugzilla-daemon

Frans Pop wrote:
> On Wednesday 29 July 2009, Rafael J. Wysocki wrote:
>   
>> On Wednesday 29 July 2009, you wrote:
>>     
>>> Just for testing I enabled HP_WMI. But from then, I could not resume
>>> anymore. I just reverted the last git commit on the
>>> 'drivers/platform/x86/hp-wmi.c' code
>>> (4c395bdd3f2ca8f7e8efad881e16071182c3b8ca) and now I can resume. The
>>> problem still persists on .31-rc serie
>>>       
>> Frans, that's something for you to take care of.
>>     
>
> I'll at least give it a try.
>
> Cedric, as a start, can you please provide the output of the following 
> commands after the system is booted and with hp-wmi loaded:
> $ grep . /sys/devices/platform/hp-wmi/*
> $ ls -l /dev/input/*
> $ cat /proc/bus/input/devices
>
> Does an unload and reload of the module work correctly? What gets output 
> in dmesg by that?
>
> The strange thing is that the resume function does not do anything that's 
> not also done in hp_wmi_input_setup(). The only thing I can think of is 
> that we might need to test for wmi_has_guid(HPWMI_EVENT_GUID) because 
> that model simply does not support input events.
>
> Cheers,
> FJP
>   
I tested your patch (from buzilla) and now I can resume.

Thanks ! You have my tested-by ;-)

PS: I suppose you don't need this infos anymore ?

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [Bug 13865] Can only resume with HP_WMI selected on compaq nc6000 when 4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is reverted
  2009-07-30  9:20     ` Cédric Godin
  2009-07-30  9:56       ` Frans Pop
@ 2009-07-30  9:56       ` Frans Pop
  1 sibling, 0 replies; 23+ messages in thread
From: Frans Pop @ 2009-07-30  9:56 UTC (permalink / raw)
  To: Cédric Godin, linux-kernel
  Cc: bugzilla-daemon, ACPI Devel Maling List, pm list, Matthew Garrett

On Thursday 30 July 2009, Cédric Godin wrote:
> > The strange thing is that the resume function does not do anything
> > that's not also done in hp_wmi_input_setup(). The only thing I can
> > think of is that we might need to test for
> > wmi_has_guid(HPWMI_EVENT_GUID) because that model simply does not
> > support input events.
>
> I tested your patch (from buzilla) and now I can resume.

Great.

> Thanks ! You have my tested-by ;-)
>
> PS: I suppose you don't need this infos anymore ?

I'd still like to see the following if it's not too much trouble, 
basically to confirm that the theory was indeed correct.

$ grep . /sys/devices/platform/hp-wmi/*
$ cat /proc/bus/input/devices

Thanks,
FJP

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [Bug 13865] Can only resume with HP_WMI selected on compaq nc6000 when 4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is reverted
  2009-07-30  9:20     ` Cédric Godin
@ 2009-07-30  9:56       ` Frans Pop
  2009-07-30  9:56       ` Frans Pop
  1 sibling, 0 replies; 23+ messages in thread
From: Frans Pop @ 2009-07-30  9:56 UTC (permalink / raw)
  To: Cédric Godin, linux-kernel
  Cc: ACPI Devel Maling List, pm list, bugzilla-daemon

On Thursday 30 July 2009, Cédric Godin wrote:
> > The strange thing is that the resume function does not do anything
> > that's not also done in hp_wmi_input_setup(). The only thing I can
> > think of is that we might need to test for
> > wmi_has_guid(HPWMI_EVENT_GUID) because that model simply does not
> > support input events.
>
> I tested your patch (from buzilla) and now I can resume.

Great.

> Thanks ! You have my tested-by ;-)
>
> PS: I suppose you don't need this infos anymore ?

I'd still like to see the following if it's not too much trouble, 
basically to confirm that the theory was indeed correct.

$ grep . /sys/devices/platform/hp-wmi/*
$ cat /proc/bus/input/devices

Thanks,
FJP
_______________________________________________
linux-pm mailing list
linux-pm@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/linux-pm

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [Bug 13865] [PATCH] hp-wmi: check that an input device exists in resume handler
  2009-07-29 20:57 ` [Bug 13865] New: Can only resume with HP_WMI selected on compaq nc6000 when 4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is reverted Rafael J. Wysocki
@ 2009-07-30 10:42     ` Frans Pop
  2009-07-29 21:31   ` Frans Pop
                       ` (2 subsequent siblings)
  3 siblings, 0 replies; 23+ messages in thread
From: Frans Pop @ 2009-07-30 10:42 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: bugzilla-daemon, Len Brown, ACPI Devel Maling List, pm list, LKML,
	Cédric Godin

On Wednesday 29 July 2009, Rafael J. Wysocki wrote:
> On Wednesday 29 July 2009, you wrote:
> > http://bugzilla.kernel.org/show_bug.cgi?id=13865
> >
> > Just for testing I enabled HP_WMI. But from then, I could not resume
> > anymore. I just reverted the last git commit on the
> > 'drivers/platform/x86/hp-wmi.c' code
> > (4c395bdd3f2ca8f7e8efad881e16071182c3b8ca) and now I can resume. The
> > problem still persists on .31-rc serie

Here's the final patch, tested by Cédric. (And properly against mainline.)

From: Frans Pop <elendil@planet.nl>
Subject: hp-wmi: check that an input device exists in resume handler

Some systems may not support input events, or registering the input
handler may have failed. So check that an input device exists before
trying to set the docking and tablet mode state during resume.

Fixes: http://bugzilla.kernel.org/show_bug.cgi?id=13865

Reported-and-tested-by: Cédric Godin <cedric@belbone.be>
Signed-off-by: Frans Pop <elendil@planet.nl>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>

diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c
index ca50856..a2ad53e 100644
--- a/drivers/platform/x86/hp-wmi.c
+++ b/drivers/platform/x86/hp-wmi.c
@@ -520,11 +520,13 @@ static int hp_wmi_resume_handler(struct platform_device *device)
 	 * the input layer will only actually pass it on if the state
 	 * changed.
 	 */
-
-	input_report_switch(hp_wmi_input_dev, SW_DOCK, hp_wmi_dock_state());
-	input_report_switch(hp_wmi_input_dev, SW_TABLET_MODE,
-			    hp_wmi_tablet_state());
-	input_sync(hp_wmi_input_dev);
+	if (hp_wmi_input_dev) {
+		input_report_switch(hp_wmi_input_dev, SW_DOCK,
+				    hp_wmi_dock_state());
+		input_report_switch(hp_wmi_input_dev, SW_TABLET_MODE,
+				    hp_wmi_tablet_state());
+		input_sync(hp_wmi_input_dev);
+	}
 
 	return 0;
 }
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* Re: [Bug 13865] [PATCH] hp-wmi: check that an input device exists in resume handler
  2009-07-29 20:57 ` [Bug 13865] New: Can only resume with HP_WMI selected on compaq nc6000 when 4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is reverted Rafael J. Wysocki
                     ` (2 preceding siblings ...)
  2009-07-30 10:42     ` Frans Pop
@ 2009-07-30 10:42   ` Frans Pop
  3 siblings, 0 replies; 23+ messages in thread
From: Frans Pop @ 2009-07-30 10:42 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: bugzilla-daemon, LKML, Cédric Godin, ACPI Devel Maling List,
	pm list

On Wednesday 29 July 2009, Rafael J. Wysocki wrote:
> On Wednesday 29 July 2009, you wrote:
> > http://bugzilla.kernel.org/show_bug.cgi?id=13865
> >
> > Just for testing I enabled HP_WMI. But from then, I could not resume
> > anymore. I just reverted the last git commit on the
> > 'drivers/platform/x86/hp-wmi.c' code
> > (4c395bdd3f2ca8f7e8efad881e16071182c3b8ca) and now I can resume. The
> > problem still persists on .31-rc serie

Here's the final patch, tested by Cédric. (And properly against mainline.)

From: Frans Pop <elendil@planet.nl>
Subject: hp-wmi: check that an input device exists in resume handler

Some systems may not support input events, or registering the input
handler may have failed. So check that an input device exists before
trying to set the docking and tablet mode state during resume.

Fixes: http://bugzilla.kernel.org/show_bug.cgi?id=13865

Reported-and-tested-by: Cédric Godin <cedric@belbone.be>
Signed-off-by: Frans Pop <elendil@planet.nl>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>

diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c
index ca50856..a2ad53e 100644
--- a/drivers/platform/x86/hp-wmi.c
+++ b/drivers/platform/x86/hp-wmi.c
@@ -520,11 +520,13 @@ static int hp_wmi_resume_handler(struct platform_device *device)
 	 * the input layer will only actually pass it on if the state
 	 * changed.
 	 */
-
-	input_report_switch(hp_wmi_input_dev, SW_DOCK, hp_wmi_dock_state());
-	input_report_switch(hp_wmi_input_dev, SW_TABLET_MODE,
-			    hp_wmi_tablet_state());
-	input_sync(hp_wmi_input_dev);
+	if (hp_wmi_input_dev) {
+		input_report_switch(hp_wmi_input_dev, SW_DOCK,
+				    hp_wmi_dock_state());
+		input_report_switch(hp_wmi_input_dev, SW_TABLET_MODE,
+				    hp_wmi_tablet_state());
+		input_sync(hp_wmi_input_dev);
+	}
 
 	return 0;
 }
_______________________________________________
linux-pm mailing list
linux-pm@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/linux-pm

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* Re: [Bug 13865] [PATCH] hp-wmi: check that an input device exists in resume handler
@ 2009-07-30 10:42     ` Frans Pop
  0 siblings, 0 replies; 23+ messages in thread
From: Frans Pop @ 2009-07-30 10:42 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: bugzilla-daemon, Len Brown, ACPI Devel Maling List, pm list, LKML,
	Cédric Godin

On Wednesday 29 July 2009, Rafael J. Wysocki wrote:
> On Wednesday 29 July 2009, you wrote:
> > http://bugzilla.kernel.org/show_bug.cgi?id=13865
> >
> > Just for testing I enabled HP_WMI. But from then, I could not resume
> > anymore. I just reverted the last git commit on the
> > 'drivers/platform/x86/hp-wmi.c' code
> > (4c395bdd3f2ca8f7e8efad881e16071182c3b8ca) and now I can resume. The
> > problem still persists on .31-rc serie

Here's the final patch, tested by Cédric. (And properly against mainline.)

From: Frans Pop <elendil@planet.nl>
Subject: hp-wmi: check that an input device exists in resume handler

Some systems may not support input events, or registering the input
handler may have failed. So check that an input device exists before
trying to set the docking and tablet mode state during resume.

Fixes: http://bugzilla.kernel.org/show_bug.cgi?id=13865

Reported-and-tested-by: Cédric Godin <cedric@belbone.be>
Signed-off-by: Frans Pop <elendil@planet.nl>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>

diff --git a/drivers/platform/x86/hp-wmi.c b/drivers/platform/x86/hp-wmi.c
index ca50856..a2ad53e 100644
--- a/drivers/platform/x86/hp-wmi.c
+++ b/drivers/platform/x86/hp-wmi.c
@@ -520,11 +520,13 @@ static int hp_wmi_resume_handler(struct platform_device *device)
 	 * the input layer will only actually pass it on if the state
 	 * changed.
 	 */
-
-	input_report_switch(hp_wmi_input_dev, SW_DOCK, hp_wmi_dock_state());
-	input_report_switch(hp_wmi_input_dev, SW_TABLET_MODE,
-			    hp_wmi_tablet_state());
-	input_sync(hp_wmi_input_dev);
+	if (hp_wmi_input_dev) {
+		input_report_switch(hp_wmi_input_dev, SW_DOCK,
+				    hp_wmi_dock_state());
+		input_report_switch(hp_wmi_input_dev, SW_TABLET_MODE,
+				    hp_wmi_tablet_state());
+		input_sync(hp_wmi_input_dev);
+	}
 
 	return 0;
 }

^ permalink raw reply related	[flat|nested] 23+ messages in thread

* Re: [Bug 13865] [PATCH] hp-wmi: check that an input device exists in resume handler
  2009-07-30 10:42     ` Frans Pop
@ 2009-07-30 12:37       ` Matthew Garrett
  -1 siblings, 0 replies; 23+ messages in thread
From: Matthew Garrett @ 2009-07-30 12:37 UTC (permalink / raw)
  To: Frans Pop
  Cc: Rafael J. Wysocki, bugzilla-daemon, Len Brown,
	ACPI Devel Maling List, pm list, LKML, Cédric Godin

On Thu, Jul 30, 2009 at 12:42:05PM +0200, Frans Pop wrote:
> From: Frans Pop <elendil@planet.nl>
> Subject: hp-wmi: check that an input device exists in resume handler
> 
> Some systems may not support input events, or registering the input
> handler may have failed. So check that an input device exists before
> trying to set the docking and tablet mode state during resume.
> 
> Fixes: http://bugzilla.kernel.org/show_bug.cgi?id=13865
> 
> Reported-and-tested-by: Cédric Godin <cedric@belbone.be>
> Signed-off-by: Frans Pop <elendil@planet.nl>
> Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Acked-by: Matthew Garrett <mjg@redhat.com>

-- 
Matthew Garrett | mjg59@srcf.ucam.org
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [Bug 13865] [PATCH] hp-wmi: check that an input device exists in resume handler
  2009-07-30 10:42     ` Frans Pop
  (?)
@ 2009-07-30 12:37     ` Matthew Garrett
  -1 siblings, 0 replies; 23+ messages in thread
From: Matthew Garrett @ 2009-07-30 12:37 UTC (permalink / raw)
  To: Frans Pop
  Cc: bugzilla-daemon, LKML, Cédric Godin, ACPI Devel Maling List,
	pm list

On Thu, Jul 30, 2009 at 12:42:05PM +0200, Frans Pop wrote:
> From: Frans Pop <elendil@planet.nl>
> Subject: hp-wmi: check that an input device exists in resume handler
> 
> Some systems may not support input events, or registering the input
> handler may have failed. So check that an input device exists before
> trying to set the docking and tablet mode state during resume.
> 
> Fixes: http://bugzilla.kernel.org/show_bug.cgi?id=13865
> 
> Reported-and-tested-by: Cédric Godin <cedric@belbone.be>
> Signed-off-by: Frans Pop <elendil@planet.nl>
> Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Acked-by: Matthew Garrett <mjg@redhat.com>

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [Bug 13865] [PATCH] hp-wmi: check that an input device exists in resume handler
@ 2009-07-30 12:37       ` Matthew Garrett
  0 siblings, 0 replies; 23+ messages in thread
From: Matthew Garrett @ 2009-07-30 12:37 UTC (permalink / raw)
  To: Frans Pop
  Cc: Rafael J. Wysocki, bugzilla-daemon, Len Brown,
	ACPI Devel Maling List, pm list, LKML, Cédric Godin

On Thu, Jul 30, 2009 at 12:42:05PM +0200, Frans Pop wrote:
> From: Frans Pop <elendil@planet.nl>
> Subject: hp-wmi: check that an input device exists in resume handler
> 
> Some systems may not support input events, or registering the input
> handler may have failed. So check that an input device exists before
> trying to set the docking and tablet mode state during resume.
> 
> Fixes: http://bugzilla.kernel.org/show_bug.cgi?id=13865
> 
> Reported-and-tested-by: Cédric Godin <cedric@belbone.be>
> Signed-off-by: Frans Pop <elendil@planet.nl>
> Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Acked-by: Matthew Garrett <mjg@redhat.com>

-- 
Matthew Garrett | mjg59@srcf.ucam.org

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [Bug 13865] [PATCH] hp-wmi: check that an input device exists in resume handler
  2009-07-30 12:37       ` Matthew Garrett
  (?)
@ 2009-07-30 21:17       ` Len Brown
  -1 siblings, 0 replies; 23+ messages in thread
From: Len Brown @ 2009-07-30 21:17 UTC (permalink / raw)
  To: Matthew Garrett
  Cc: Frans Pop, Rafael J. Wysocki, bugzilla-daemon,
	ACPI Devel Maling List, pm list, LKML, Cédric Godin

[-- Attachment #1: Type: TEXT/PLAIN, Size: 317 bytes --]

> > Reported-and-tested-by: Cédric Godin <cedric@belbone.be>
> > Signed-off-by: Frans Pop <elendil@planet.nl>
> > Cc: Matthew Garrett <mjg59@srcf.ucam.org>

> Acked-by: Matthew Garrett <mjg@redhat.com>

Applied -- and i'll put it on my queue for 2.6.30.stable.

thanks,
Len Brown, Intel Open Source Technology Center

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [Bug 13865] [PATCH] hp-wmi: check that an input device exists in resume handler
  2009-07-30 12:37       ` Matthew Garrett
  (?)
  (?)
@ 2009-07-30 21:17       ` Len Brown
  -1 siblings, 0 replies; 23+ messages in thread
From: Len Brown @ 2009-07-30 21:17 UTC (permalink / raw)
  To: Matthew Garrett
  Cc: Frans Pop, bugzilla-daemon, LKML, Cédric Godin,
	ACPI Devel Maling List, pm list

[-- Attachment #1: Type: TEXT/PLAIN, Size: 327 bytes --]

> > Reported-and-tested-by: Cédric Godin <cedric@belbone.be>
> > Signed-off-by: Frans Pop <elendil@planet.nl>
> > Cc: Matthew Garrett <mjg59@srcf.ucam.org>

> Acked-by: Matthew Garrett <mjg@redhat.com>

Applied -- and i'll put it on my queue for 2.6.30.stable.

thanks,
Len Brown, Intel Open Source Technology Center

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 23+ messages in thread

* [Bug #13865] Can only resume with HP_WMI selected on compaq nc6000 when 4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is reverted
  2009-08-02 19:06 2.6.31-rc5: Reported regressions 2.6.29 -> 2.6.30 Rafael J. Wysocki
@ 2009-08-02 19:09 ` Rafael J. Wysocki
  2009-08-02 22:53     ` Frans Pop
  0 siblings, 1 reply; 23+ messages in thread
From: Rafael J. Wysocki @ 2009-08-02 19:09 UTC (permalink / raw)
  To: Linux Kernel Mailing List
  Cc: Kernel Testers List, cedric, Frans Pop, Matthew Garrett

This message has been generated automatically as a part of a report
of regressions introduced between 2.6.29 and 2.6.30.

The following bug entry is on the current list of known regressions
introduced between 2.6.29 and 2.6.30.  Please verify if it still should
be listed and let me know (either way).


Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=13865
Subject		: Can only resume with HP_WMI selected on compaq nc6000 when 4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is reverted
Submitter	: cedric <cedric@belbone.be>
Date		: 2009-07-29 12:47 (5 days old)


^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [Bug #13865] Can only resume with HP_WMI selected on compaq nc6000 when 4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is reverted
  2009-08-02 19:09 ` [Bug #13865] Can only resume with HP_WMI selected on compaq nc6000 when 4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is reverted Rafael J. Wysocki
@ 2009-08-02 22:53     ` Frans Pop
  0 siblings, 0 replies; 23+ messages in thread
From: Frans Pop @ 2009-08-02 22:53 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Linux Kernel Mailing List, Kernel Testers List, cedric,
	Matthew Garrett

On Sunday 02 August 2009, Rafael J. Wysocki wrote:
> The following bug entry is on the current list of known regressions
> introduced between 2.6.29 and 2.6.30.  Please verify if it still should
> be listed and let me know (either way).
>
> Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=13865
> Subject	: Can only resume with HP_WMI selected on compaq nc6000 when
>		  4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is reverted
> Submitter	: cedric <cedric-x1Cn44Nr1HaZIoH1IeqzKA@public.gmane.org>
> Date		: 2009-07-29 12:47 (5 days old)

Fix just made it into mainline: daed953721850381673687c59f3a0df553eb6626

Cheers,
FJP

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [Bug #13865] Can only resume with HP_WMI selected on compaq nc6000 when 4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is reverted
@ 2009-08-02 22:53     ` Frans Pop
  0 siblings, 0 replies; 23+ messages in thread
From: Frans Pop @ 2009-08-02 22:53 UTC (permalink / raw)
  To: Rafael J. Wysocki
  Cc: Linux Kernel Mailing List, Kernel Testers List, cedric,
	Matthew Garrett

On Sunday 02 August 2009, Rafael J. Wysocki wrote:
> The following bug entry is on the current list of known regressions
> introduced between 2.6.29 and 2.6.30.  Please verify if it still should
> be listed and let me know (either way).
>
> Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=13865
> Subject	: Can only resume with HP_WMI selected on compaq nc6000 when
>		  4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is reverted
> Submitter	: cedric <cedric@belbone.be>
> Date		: 2009-07-29 12:47 (5 days old)

Fix just made it into mainline: daed953721850381673687c59f3a0df553eb6626

Cheers,
FJP

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [Bug #13865] Can only resume with HP_WMI selected on compaq nc6000 when 4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is reverted
  2009-08-02 22:53     ` Frans Pop
@ 2009-08-03 15:18         ` Rafael J. Wysocki
  -1 siblings, 0 replies; 23+ messages in thread
From: Rafael J. Wysocki @ 2009-08-03 15:18 UTC (permalink / raw)
  To: Frans Pop
  Cc: Linux Kernel Mailing List, Kernel Testers List, cedric,
	Matthew Garrett

On Monday 03 August 2009, Frans Pop wrote:
> On Sunday 02 August 2009, Rafael J. Wysocki wrote:
> > The following bug entry is on the current list of known regressions
> > introduced between 2.6.29 and 2.6.30.  Please verify if it still should
> > be listed and let me know (either way).
> >
> > Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=13865
> > Subject	: Can only resume with HP_WMI selected on compaq nc6000 when
> >		  4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is reverted
> > Submitter	: cedric <cedric-x1Cn44Nr1HaZIoH1IeqzKA@public.gmane.org>
> > Date		: 2009-07-29 12:47 (5 days old)
> 
> Fix just made it into mainline: daed953721850381673687c59f3a0df553eb6626

Thanks, closed.

Rafael

^ permalink raw reply	[flat|nested] 23+ messages in thread

* Re: [Bug #13865] Can only resume with HP_WMI selected on compaq nc6000 when 4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is reverted
@ 2009-08-03 15:18         ` Rafael J. Wysocki
  0 siblings, 0 replies; 23+ messages in thread
From: Rafael J. Wysocki @ 2009-08-03 15:18 UTC (permalink / raw)
  To: Frans Pop
  Cc: Linux Kernel Mailing List, Kernel Testers List, cedric,
	Matthew Garrett

On Monday 03 August 2009, Frans Pop wrote:
> On Sunday 02 August 2009, Rafael J. Wysocki wrote:
> > The following bug entry is on the current list of known regressions
> > introduced between 2.6.29 and 2.6.30.  Please verify if it still should
> > be listed and let me know (either way).
> >
> > Bug-Entry	: http://bugzilla.kernel.org/show_bug.cgi?id=13865
> > Subject	: Can only resume with HP_WMI selected on compaq nc6000 when
> >		  4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is reverted
> > Submitter	: cedric <cedric@belbone.be>
> > Date		: 2009-07-29 12:47 (5 days old)
> 
> Fix just made it into mainline: daed953721850381673687c59f3a0df553eb6626

Thanks, closed.

Rafael

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2009-08-03 15:18 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <bug-13865-10028@http.bugzilla.kernel.org/>
2009-07-29 20:57 ` [Bug 13865] New: Can only resume with HP_WMI selected on compaq nc6000 when 4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is reverted Rafael J. Wysocki
2009-07-29 21:31   ` [Bug 13865] " Frans Pop
2009-07-29 22:57     ` Frans Pop
2009-07-29 22:57     ` Frans Pop
2009-07-30  9:20     ` Cédric Godin
2009-07-30  9:56       ` Frans Pop
2009-07-30  9:56       ` Frans Pop
2009-07-30  9:20     ` Cédric Godin
2009-07-29 21:31   ` Frans Pop
2009-07-30 10:42   ` [Bug 13865] [PATCH] hp-wmi: check that an input device exists in resume handler Frans Pop
2009-07-30 10:42     ` Frans Pop
2009-07-30 12:37     ` Matthew Garrett
2009-07-30 12:37     ` Matthew Garrett
2009-07-30 12:37       ` Matthew Garrett
2009-07-30 21:17       ` Len Brown
2009-07-30 21:17       ` Len Brown
2009-07-30 10:42   ` Frans Pop
2009-07-29 20:57 ` [Bug 13865] New: Can only resume with HP_WMI selected on compaq nc6000 when 4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is reverted Rafael J. Wysocki
2009-08-02 19:06 2.6.31-rc5: Reported regressions 2.6.29 -> 2.6.30 Rafael J. Wysocki
2009-08-02 19:09 ` [Bug #13865] Can only resume with HP_WMI selected on compaq nc6000 when 4c395bdd3f2ca8f7e8efad881e16071182c3b8ca is reverted Rafael J. Wysocki
2009-08-02 22:53   ` Frans Pop
2009-08-02 22:53     ` Frans Pop
     [not found]     ` <200908030053.27869.elendil-EIBgga6/0yRmR6Xm/wNWPw@public.gmane.org>
2009-08-03 15:18       ` Rafael J. Wysocki
2009-08-03 15:18         ` Rafael J. Wysocki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.