hyper-v: Fix wakeup from suspend-to-idle
Subsystems (3)
PATCH 1/1 hyper-v: Fix wakeup from suspend-to-idle
It makes little sense but still possible to put Hyper-V guests into suspend-to-idle state. To wake them up two wakeup sources were registered in the past: hyperv-keyboard and hid-hyperv. However, since commit eed4d47efe95 ("ACPI / sleep: Ignore spurious SCI wakeups from suspend-to-idle") pm_wakeup_event() from these devices is ignored. Switch to pm_wakeup_hard_event() API as these devices are actually the only possible way to wakeup Hyper-V guests.
--- drivers/hid/hid-hyperv.c | 2 +- drivers/input/serio/hyperv-keyboard.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/hid/hid-hyperv.c +1 -1
@@ -309,7 +309,7 @@ static void mousevsc_on_receive(struct hv_device *device,hid_input_report (input_dev->hid_device,HID_INPUT_REPORT , input_dev->input_buf, len,1 ); -pm_wakeup_event (&input_dev->device->device,0 ); +pm_wakeup_hard_event (&input_dev->device->device);break ;default :
drivers/input/serio/hyperv-keyboard.c +1 -1
@@ -177,7 +177,7 @@ static void hv_kbd_on_receive(struct hv_device *hv_dev,* state because the Enter-UP can trigger a wakeup at once. */ if (!(info &IS_BREAK )) -pm_wakeup_event (&hv_dev->device,0 ); +pm_wakeup_hard_event (&hv_dev->device);break ;
Signature · 1 line
2.14.4
Quoted 11 lines · Vitaly Kuznetsov
It makes little sense but still possible to put Hyper-V guests into suspend-to-idle state. To wake them up two wakeup sources were registered in the past: hyperv-keyboard and hid-hyperv. However, since commit
eed4d47efe95("ACPI / sleep: Ignore spurious SCI wakeups from suspend-to-idle")pm_wakeup_event()from these devices is ignored. Switch topm_wakeup_hard_event()API as these devices are actually the only possible way to wakeup Hyper-V guests.Fixes eed4d47efe95 (ACPI / sleep: Ignore spurious SCI wakeups from suspend-to-idle)Signed-off-by Vitaly Kuznetsov <[email protected]>
Quoted 34 lines
--- drivers/hid/hid-hyperv.c | 2 +- drivers/input/serio/hyperv-keyboard.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)drivers/hid/hid-hyperv.c +1
-1@@ -309,7 +309,7 @@ static void mousevsc_on_receive(struct hv_device *device,hid_input_report (input_dev->hid_device,HID_INPUT_REPORT , input_dev->input_buf, len,1 ); -pm_wakeup_event (&input_dev->device->device,0 ); +pm_wakeup_hard_event (&input_dev->device->device);break ;default :drivers/input/serio/hyperv-keyboard.c +1
-2@@ -177,7 +177,7 @@ static void hv_kbd_on_receive(struct hv_device *hv_dev,* state because the Enter-UP can trigger a wakeup at once. */ if (!(info &IS_BREAK )) -pm_wakeup_event (&hv_dev->device,0 ); +pm_wakeup_hard_event (&hv_dev->device);break ; --2.14.4
KY Srinivasan
Acked-byQuoted 24 lines
-----Original Message-----
From: Rafael J. Wysocki <[email protected]>
Sent: Wednesday, September 12, 2018 11:55 PM
To: vkuznets <[email protected]>
Cc: Linux PM <[email protected]>; Rafael J. Wysocki <[email protected]>; KY Srinivasan <[email protected]>; Haiyang Zhang <[email protected]>; Stephen Hemminger <[email protected]>; Jiri Kosina <[email protected]>; Dmitry Torokhov <[email protected]>; [email protected]; Linux Kernel Mailing List <[email protected]>
Subject: Re: [PATCH] hyper-v: Fix wakeup from suspend-to-idleQuoted 3 lines · Vitaly Kuznetsov
It makes little sense but still possible to put Hyper-V guests into suspend-to-idle state. To wake them up two wakeup sources were
registered
Quoted 3 lines
in the past: hyperv-keyboard and hid-hyperv. However, since commit
eed4d47efe95("ACPI / sleep: Ignore spurious SCI wakeups from suspend-to-idle")pm_wakeup_event()from these devices is ignored.Switch
Quoted 8 lines
Quoted 4 lines
to
pm_wakeup_hard_event()API as these devices are actually the only possible way to wakeup Hyper-V guests.Fixes eed4d47efe95 (ACPI / sleep: Ignore spurious SCI wakeups fromsuspend-to-idle)
Quoted 1 line
Signed-off-by Vitaly Kuznetsov <[email protected]>Reviewed-by Rafael J. Wysocki <[email protected]>
Quoted 38 lines
drivers/hid/hid-hyperv.c static void mousevsc_on_receive(struct hv_device
Quoted 11 lines
--- drivers/hid/hid-hyperv.c | 2 +- drivers/input/serio/hyperv-keyboard.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)drivers/hid/hid-hyperv.c +0
-0@@ -309,7 +309,7 @@ static void mousevsc_on_receive(struct hv_device*device,
Review
Quoted 9 lines
drivers/hid/hid-hyperv.c +1
-1hid_input_report (input_dev->hid_device,HID_INPUT_REPORT , input_dev->input_buf, len,1 ); -pm_wakeup_event (&input_dev->device->device,0 ); +pm_wakeup_hard_event (&input_dev->device->device);break ;default :(quoted diff) +0
-0
b/drivers/input/serio/hyperv-keyboard.cdrivers/input/serio/hyperv-keyboard.c static void hv_kbd_on_receive(struct hv_device
Quoted 4 lines
index
47a0e81a2989..a8b9be3e28db100644drivers/input/serio/hyperv-keyboard.c +0
-0@@ -177,7 +177,7 @@ static void hv_kbd_on_receive(struct hv_device
*hv_dev,Quoted 11 lines
drivers/input/serio/hyperv-keyboard.c +1
-2* state because the Enter-UP can trigger a wakeup at once. */ if (!(info &IS_BREAK )) -pm_wakeup_event (&hv_dev->device,0 ); +pm_wakeup_hard_event (&hv_dev->device);break ; --2.14.4
Quoted 8 lines · Vitaly Kuznetsov
It makes little sense but still possible to put Hyper-V guests into suspend-to-idle state. To wake them up two wakeup sources were registered in the past: hyperv-keyboard and hid-hyperv. However, since commit
eed4d47efe95("ACPI / sleep: Ignore spurious SCI wakeups from suspend-to-idle")pm_wakeup_event()from these devices is ignored. Switch topm_wakeup_hard_event()API as these devices are actually the only possible way to wakeup Hyper-V guests.
Quoted 4 lines
Fixes eed4d47efe95 (ACPI / sleep: Ignore spurious SCI wakeups from suspend-to-idle)Signed-off-by Vitaly Kuznetsov <[email protected]>--- drivers/hid/hid-hyperv.c | 2 +-
for the above. I guess this'd better go through ACPI tree?
Thanks,
Signature · 2 lines
Jiri Kosina SUSE Labs
Quoted 11 lines · Jiri Kosina
Quoted 8 lines · Vitaly Kuznetsov
It makes little sense but still possible to put Hyper-V guests into suspend-to-idle state. To wake them up two wakeup sources were registered in the past: hyperv-keyboard and hid-hyperv. However, since commit
eed4d47efe95("ACPI / sleep: Ignore spurious SCI wakeups from suspend-to-idle")pm_wakeup_event()from these devices is ignored. Switch topm_wakeup_hard_event()API as these devices are actually the only possible way to wakeup Hyper-V guests.
Quoted 8 lines
Quoted 4 lines
Fixes eed4d47efe95 (ACPI / sleep: Ignore spurious SCI wakeups from suspend-to-idle)Signed-off-by Vitaly Kuznetsov <[email protected]>--- drivers/hid/hid-hyperv.c | 2 +-Acked-by Jiri Kosina <[email protected]>for the above. I guess this'd better go through ACPI tree?
No problem with that if you prefer.
Cheers,
Rafael
Quoted 17 lines · Rafael J. Wysocki
Quoted 16 lines · Jiri Kosina
Quoted 12 lines · Vitaly Kuznetsov
It makes little sense but still possible to put Hyper-V guests into suspend-to-idle state. To wake them up two wakeup sources were registered in the past: hyperv-keyboard and hid-hyperv. However, since commit
eed4d47efe95("ACPI / sleep: Ignore spurious SCI wakeups from suspend-to-idle")pm_wakeup_event()from these devices is ignored. Switch topm_wakeup_hard_event()API as these devices are actually the only possible way to wakeup Hyper-V guests.Fixes eed4d47efe95 (ACPI / sleep: Ignore spurious SCI wakeups from suspend-to-idle)Signed-off-by Vitaly Kuznetsov <[email protected]>--- drivers/hid/hid-hyperv.c | 2 +-
Quoted 6 lines
Quoted 3 lines
Acked-by Jiri Kosina <[email protected]>for the above. I guess this'd better go through ACPI tree?
No problem with that if you prefer.
It seems this patch got lost somewhere :-(
Signature · 1 line
Vitaly