Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5662693imm; Wed, 12 Sep 2018 09:13:15 -0700 (PDT) X-Google-Smtp-Source: ANB0VdavMH0zwN/qNg78nck9JO48TzwBZXbLjvYYG7ji02SZh5yjUAqNZJAJ4ujC8lUGtYtCKoAS X-Received: by 2002:a17:902:7e09:: with SMTP id b9-v6mr3078478plm.221.1536768795770; Wed, 12 Sep 2018 09:13:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536768795; cv=none; d=google.com; s=arc-20160816; b=YuM2Ssg6bg+JcJWhSh6okqhUAr6bTndlw0Hx5yTjceRDeCMfIr2DjOgTiY7r8M8sDh l9eeAvPyhY2cHe3gRnuqlKun+n3oNIFzZTUUQvIXVlPBzBPQX9s/cABI64QCPfPOCNan WKWhy6k4uWPKZZ4MVHBdjxpbvJDu23xfMG6TIxZ4Qht/CwWCY5Dew7oknMuNZGcemKs5 xCDxgb4IkcGUWtsHaRHOu6grdTDd3Ei53x1a4WoxGviuPKP8yiriHr7F+5PfoS1r0zqH Nk5WEL4U/Z0bKY6qm2rXd4EhIAszg96ZxS2NPKZxJrIr6MVShZbCDrPOmmqCfWzgPhZO oGvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=NpvOc6ou4Z50nFlnvihDYpPTXV9YiypxawKNiijK92k=; b=xVspRLRLmqnnGLMO2m7pJpRmOZm/btMhfc/vGTNjguiyFbQB/E0626i6ORjpGnzTsS SuSdpSg+mMB99PP1Jio2D+TVTqsoUwyGPtOmauHRgC9Ip3qgfNcjGGyFNDKFN/pt3bF6 4Mv/4R7IWR1Xd0gmhxJ33Zfk8Iz2HElTB5OlS/T0DjgmIe61wBTSNWjETOQ42bMIfCr7 QAbd1YkkDnnZbLKaMqFseHL85F143pQvQoM8VuiyCBER5M+v4QWbVOI+X9WsHb78imnK FV8+GtDZHTCbinu7Bj1stmdZPBdqougK3eSRdx8KNb64nHDU0VfRpowPRm4Ix1brCW5c r8/Q== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v20-v6si1435017ply.139.2018.09.12.09.12.52; Wed, 12 Sep 2018 09:13:15 -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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727838AbeILVQR (ORCPT + 99 others); Wed, 12 Sep 2018 17:16:17 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:36320 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726819AbeILVQR (ORCPT ); Wed, 12 Sep 2018 17:16:17 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 54B47701E6; Wed, 12 Sep 2018 16:11:04 +0000 (UTC) Received: from vitty.brq.redhat.com (unknown [10.43.2.155]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9D1CCFA997; Wed, 12 Sep 2018 16:11:02 +0000 (UTC) From: Vitaly Kuznetsov To: linux-pm@vger.kernel.org Cc: "Rafael J. Wysocki" , "K. Y. Srinivasan" , Haiyang Zhang , Stephen Hemminger , Jiri Kosina , Dmitry Torokhov , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] hyper-v: Fix wakeup from suspend-to-idle Date: Wed, 12 Sep 2018 18:11:01 +0200 Message-Id: <20180912161101.2634-1-vkuznets@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Wed, 12 Sep 2018 16:11:04 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Wed, 12 Sep 2018 16:11:04 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'vkuznets@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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