Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp317376imm; Wed, 12 Sep 2018 23:57:20 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYgIdT+YlxrTzE2OKt+gjiDUkgT6s+J0bSldmMjAoKoJyjf6xV5znk8v2FdZG0wehNgHFuK X-Received: by 2002:a65:560a:: with SMTP id l10-v6mr5757415pgs.130.1536821840184; Wed, 12 Sep 2018 23:57:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536821840; cv=none; d=google.com; s=arc-20160816; b=qNXcoc9XGb0zE5vvwK3C6InR/y57kc3R9ZAO0MSaeZTqy98JzyhiQlre/EUckdXfgy zsh8L9+2AX4LMMSH6JS7mGv4mE+pbRig4wDaGXzKdopFTsYHKpKXE1qhkeYxlBgWzcEP YEhI3zMo8ZtyxtkZ5Gz4r0OSST90Vl4RY9gJFXIvdaMMLyGQXlvv2bJoghyzYoB7S/Fr 6dIN61u/QVlHlrz9U4MJCxl9Wtpn4K97oUI6F588J0DtcWAjULYWSijmPotMkx3OovXs Ghdj5iuIqGasM0bPaw8UgBHZd5Ycs5uBaijkpri3akXpDXzACUyAOHLcADoDHjxDbrc4 HUkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=xi017HFD/HhBVnFaH/DJ3TkuIXV8T6S/rSN0hwxObTc=; b=x7EiWpBCGABvo8NbD2Loze8N7kMZGqqyvma/DzRxCbG21ijexkJTP3dpZUaZf/SESO 9rFUjqz6HKamZYmf2ulQA2DJLbXj+TYtVSW9GH4rwB/m+CKOvcuDNI2re97mErWKTSb5 6+8g1Q7schEz9TlSJTX9aAXkwYxBz4hsUzBDaFGPUooQioo6BeL4A0Xr4mO92F0khTED VFobUQ5NHjXjnh6I6KTBL098ExIzDOU9HzT30KZOLN19ZdM2Xp+DIQrXett5VowNrWKT JpXrF+BvBG6IJmCrBxPbMiQzprHtJ3uTDjMBeLitc6Ucz7iGpqYL09UpWbwY0NkrIfju IjIw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k6-v6si3061701pgb.446.2018.09.12.23.57.04; Wed, 12 Sep 2018 23:57:20 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727194AbeIMMDn (ORCPT + 99 others); Thu, 13 Sep 2018 08:03:43 -0400 Received: from mail-ot1-f68.google.com ([209.85.210.68]:37116 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726694AbeIMMDm (ORCPT ); Thu, 13 Sep 2018 08:03:42 -0400 Received: by mail-ot1-f68.google.com with SMTP id o13-v6so306618otl.4; Wed, 12 Sep 2018 23:55:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=xi017HFD/HhBVnFaH/DJ3TkuIXV8T6S/rSN0hwxObTc=; b=RUJRsrz4QzpfFE5wxIm7mS3cXgaED/6MxJPfBXGbn2VrEGfhCV9ihsBkZEWde7Ip5A JslyH3k/rL1JNknztJRE9L8N9aYbMD/q/v6UzHJrrBq8QH5+4LLTbHtpdzPnua0SpMt9 HBW9WJbOl9War8C7KNFZBXj0V2US/M4g+n7AxAp2VhjuKSOhV0kK/6HJ35V+B+VgEoRk 0N2kB52jRPf0AgOrzKpHmDd8/+/H2MTJVxIxTbnGMMAsSh363Uw82TnnF0e34QyLrWMs Igh7qMmRmBPyFFHqTIos6SF16DB85JQk3Y7QT0mCwcqXxV952glpAqBBQBS88ffmJN8h Z85A== X-Gm-Message-State: APzg51BJ6WA7auAODQM2NwgMxxCWKOW6cT2287ZVs6VIxdDB0ZPQMKqp z8Kv8mM15t5BCk1dIxUrCGWup+fsamKwlGpPlaE= X-Received: by 2002:a9d:2645:: with SMTP id a63-v6mr358732otb.270.1536821734655; Wed, 12 Sep 2018 23:55:34 -0700 (PDT) MIME-Version: 1.0 References: <20180912161101.2634-1-vkuznets@redhat.com> In-Reply-To: <20180912161101.2634-1-vkuznets@redhat.com> From: "Rafael J. Wysocki" Date: Thu, 13 Sep 2018 08:55:22 +0200 Message-ID: Subject: Re: [PATCH] hyper-v: Fix wakeup from suspend-to-idle To: Vitaly Kuznetsov Cc: Linux PM , "Rafael J. Wysocki" , kys@microsoft.com, haiyangz@microsoft.com, sthemmin@microsoft.com, Jiri Kosina , Dmitry Torokhov , linux-input@vger.kernel.org, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Sep 12, 2018 at 6:11 PM 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 Reviewed-by: Rafael J. Wysocki > --- > 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 >