All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hyper-v: Fix wakeup from suspend-to-idle
@ 2018-09-12 16:11 Vitaly Kuznetsov
  2018-09-13  6:55 ` Rafael J. Wysocki
  2018-09-24  9:24 ` Jiri Kosina
  0 siblings, 2 replies; 6+ messages in thread
From: Vitaly Kuznetsov @ 2018-09-12 16:11 UTC (permalink / raw)
  To: linux-pm
  Cc: Rafael J. Wysocki, K. Y. Srinivasan, Haiyang Zhang,
	Stephen Hemminger, Jiri Kosina, Dmitry Torokhov, linux-input,
	linux-kernel

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)
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
---
 drivers/hid/hid-hyperv.c              | 2 +-
 drivers/input/serio/hyperv-keyboard.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/hid/hid-hyperv.c b/drivers/hid/hid-hyperv.c
index b372854cf38d..704049e62d58 100644
--- a/drivers/hid/hid-hyperv.c
+++ b/drivers/hid/hid-hyperv.c
@@ -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:
diff --git a/drivers/input/serio/hyperv-keyboard.c b/drivers/input/serio/hyperv-keyboard.c
index 47a0e81a2989..a8b9be3e28db 100644
--- a/drivers/input/serio/hyperv-keyboard.c
+++ b/drivers/input/serio/hyperv-keyboard.c
@@ -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


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

* Re: [PATCH] hyper-v: Fix wakeup from suspend-to-idle
  2018-09-12 16:11 [PATCH] hyper-v: Fix wakeup from suspend-to-idle Vitaly Kuznetsov
@ 2018-09-13  6:55 ` Rafael J. Wysocki
  2018-09-13 12:58   ` KY Srinivasan
  2018-09-24  9:24 ` Jiri Kosina
  1 sibling, 1 reply; 6+ messages in thread
From: Rafael J. Wysocki @ 2018-09-13  6:55 UTC (permalink / raw)
  To: Vitaly Kuznetsov
  Cc: Linux PM, Rafael J. Wysocki, kys, haiyangz, sthemmin,
	Jiri Kosina, Dmitry Torokhov, linux-input,
	Linux Kernel Mailing List

On Wed, Sep 12, 2018 at 6:11 PM Vitaly Kuznetsov <vkuznets@redhat.com> wrote:
>
> 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)
> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>

Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

> ---
>  drivers/hid/hid-hyperv.c              | 2 +-
>  drivers/input/serio/hyperv-keyboard.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/hid/hid-hyperv.c b/drivers/hid/hid-hyperv.c
> index b372854cf38d..704049e62d58 100644
> --- a/drivers/hid/hid-hyperv.c
> +++ b/drivers/hid/hid-hyperv.c
> @@ -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:
> diff --git a/drivers/input/serio/hyperv-keyboard.c b/drivers/input/serio/hyperv-keyboard.c
> index 47a0e81a2989..a8b9be3e28db 100644
> --- a/drivers/input/serio/hyperv-keyboard.c
> +++ b/drivers/input/serio/hyperv-keyboard.c
> @@ -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
>

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

* RE: [PATCH] hyper-v: Fix wakeup from suspend-to-idle
  2018-09-13  6:55 ` Rafael J. Wysocki
@ 2018-09-13 12:58   ` KY Srinivasan
  0 siblings, 0 replies; 6+ messages in thread
From: KY Srinivasan @ 2018-09-13 12:58 UTC (permalink / raw)
  To: Rafael J. Wysocki, vkuznets
  Cc: Linux PM, Rafael J. Wysocki, Haiyang Zhang, Stephen Hemminger,
	Jiri Kosina, Dmitry Torokhov, linux-input,
	Linux Kernel Mailing List



> -----Original Message-----
> From: Rafael J. Wysocki <rafael@kernel.org>
> Sent: Wednesday, September 12, 2018 11:55 PM
> To: vkuznets <vkuznets@redhat.com>
> Cc: Linux PM <linux-pm@vger.kernel.org>; Rafael J. Wysocki
> <rjw@rjwysocki.net>; KY Srinivasan <kys@microsoft.com>; Haiyang Zhang
> <haiyangz@microsoft.com>; Stephen Hemminger
> <sthemmin@microsoft.com>; Jiri Kosina <jikos@kernel.org>; Dmitry
> Torokhov <dmitry.torokhov@gmail.com>; linux-input@vger.kernel.org;
> Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
> Subject: Re: [PATCH] hyper-v: Fix wakeup from suspend-to-idle
> 
> On Wed, Sep 12, 2018 at 6:11 PM Vitaly Kuznetsov <vkuznets@redhat.com>
> wrote:
> >
> > 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)
> > Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
> 
> Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: K. Y. Srinivasan <kys@microsoft.com>

> 
> > ---
> >  drivers/hid/hid-hyperv.c              | 2 +-
> >  drivers/input/serio/hyperv-keyboard.c | 2 +-
> >  2 files changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/hid/hid-hyperv.c b/drivers/hid/hid-hyperv.c
> > index b372854cf38d..704049e62d58 100644
> > --- a/drivers/hid/hid-hyperv.c
> > +++ b/drivers/hid/hid-hyperv.c
> > @@ -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:
> > diff --git a/drivers/input/serio/hyperv-keyboard.c
> b/drivers/input/serio/hyperv-keyboard.c
> > index 47a0e81a2989..a8b9be3e28db 100644
> > --- a/drivers/input/serio/hyperv-keyboard.c
> > +++ b/drivers/input/serio/hyperv-keyboard.c
> > @@ -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
> >

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

* Re: [PATCH] hyper-v: Fix wakeup from suspend-to-idle
  2018-09-12 16:11 [PATCH] hyper-v: Fix wakeup from suspend-to-idle Vitaly Kuznetsov
  2018-09-13  6:55 ` Rafael J. Wysocki
@ 2018-09-24  9:24 ` Jiri Kosina
  2018-09-24 22:49   ` Rafael J. Wysocki
  1 sibling, 1 reply; 6+ messages in thread
From: Jiri Kosina @ 2018-09-24  9:24 UTC (permalink / raw)
  To: Vitaly Kuznetsov
  Cc: linux-pm, Rafael J. Wysocki, K. Y. Srinivasan, Haiyang Zhang,
	Stephen Hemminger, Dmitry Torokhov, linux-input, linux-kernel

On Wed, 12 Sep 2018, Vitaly Kuznetsov wrote:

> 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)
> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
> ---
>  drivers/hid/hid-hyperv.c              | 2 +-

	Acked-by: Jiri Kosina <jkosina@suse.cz>

for the above. I guess this'd better go through ACPI tree?

Thanks,

-- 
Jiri Kosina
SUSE Labs


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

* Re: [PATCH] hyper-v: Fix wakeup from suspend-to-idle
  2018-09-24  9:24 ` Jiri Kosina
@ 2018-09-24 22:49   ` Rafael J. Wysocki
  2018-11-06 17:07     ` Vitaly Kuznetsov
  0 siblings, 1 reply; 6+ messages in thread
From: Rafael J. Wysocki @ 2018-09-24 22:49 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: Vitaly Kuznetsov, Linux PM, Rafael J. Wysocki, kys, haiyangz,
	sthemmin, Dmitry Torokhov, linux-input,
	Linux Kernel Mailing List

On Mon, Sep 24, 2018 at 11:24 AM Jiri Kosina <jikos@kernel.org> wrote:
>
> On Wed, 12 Sep 2018, Vitaly Kuznetsov wrote:
>
> > 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)
> > Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
> > ---
> >  drivers/hid/hid-hyperv.c              | 2 +-
>
>         Acked-by: Jiri Kosina <jkosina@suse.cz>
>
> for the above. I guess this'd better go through ACPI tree?

No problem with that if you prefer.

Cheers,
Rafael

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

* Re: [PATCH] hyper-v: Fix wakeup from suspend-to-idle
  2018-09-24 22:49   ` Rafael J. Wysocki
@ 2018-11-06 17:07     ` Vitaly Kuznetsov
  0 siblings, 0 replies; 6+ messages in thread
From: Vitaly Kuznetsov @ 2018-11-06 17:07 UTC (permalink / raw)
  To: Rafael J. Wysocki, Jiri Kosina
  Cc: Linux PM, Rafael J. Wysocki, kys, haiyangz, sthemmin,
	Dmitry Torokhov, linux-input, Linux Kernel Mailing List

"Rafael J. Wysocki" <rafael@kernel.org> writes:

> On Mon, Sep 24, 2018 at 11:24 AM Jiri Kosina <jikos@kernel.org> wrote:
>>
>> On Wed, 12 Sep 2018, Vitaly Kuznetsov wrote:
>>
>> > 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)
>> > Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
>> > ---
>> >  drivers/hid/hid-hyperv.c              | 2 +-
>>
>>         Acked-by: Jiri Kosina <jkosina@suse.cz>
>>
>> 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 :-( 

-- 
Vitaly

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

end of thread, other threads:[~2018-11-06 17:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-12 16:11 [PATCH] hyper-v: Fix wakeup from suspend-to-idle Vitaly Kuznetsov
2018-09-13  6:55 ` Rafael J. Wysocki
2018-09-13 12:58   ` KY Srinivasan
2018-09-24  9:24 ` Jiri Kosina
2018-09-24 22:49   ` Rafael J. Wysocki
2018-11-06 17:07     ` Vitaly Kuznetsov

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.