Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: 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.

Fixes: eed4d47efe95 (ACPI / sleep: Ignore spurious SCI wakeups from suspend-to-idle)
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: K. Y. Srinivasan <kys@microsoft.com>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Vitaly Kuznetsov and committed by
Dmitry Torokhov
10f91c73 e94b9f12

+2 -2
+1 -1
drivers/hid/hid-hyperv.c
··· 309 309 hid_input_report(input_dev->hid_device, HID_INPUT_REPORT, 310 310 input_dev->input_buf, len, 1); 311 311 312 - pm_wakeup_event(&input_dev->device->device, 0); 312 + pm_wakeup_hard_event(&input_dev->device->device); 313 313 314 314 break; 315 315 default:
+1 -1
drivers/input/serio/hyperv-keyboard.c
··· 177 177 * state because the Enter-UP can trigger a wakeup at once. 178 178 */ 179 179 if (!(info & IS_BREAK)) 180 - pm_wakeup_event(&hv_dev->device, 0); 180 + pm_wakeup_hard_event(&hv_dev->device); 181 181 182 182 break; 183 183