Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp565962imu; Thu, 20 Dec 2018 01:28:45 -0800 (PST) X-Google-Smtp-Source: AFSGD/VNgqo/SMzO7FKlN3k8RpMmtS+0jn6gfrlSCW8kQrSBJ5Vf9HxVyZxyAFSRlh/g+0D3izwQ X-Received: by 2002:a63:8d44:: with SMTP id z65mr22526381pgd.57.1545298125646; Thu, 20 Dec 2018 01:28:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1545298125; cv=none; d=google.com; s=arc-20160816; b=ysPBNT9EEk2sMzb9GGse1VO4EwqtAvNh5ogLL4vDGyaxttG1RtupzVIDObvrf4jUwM R0lXTtTt9UwUM8ZYf8y6M2zH5uODDp4Bs6QevenpIuX/90JILIMyAR+3Lpp5AMXG8AIV Z+DcU0ddbo/rBJi52qZ98tWltWYDec4EbDyLGa6VLlm5OXnFDM7mwSMFPcRtLHLnT4yd 47tOYxwyZYVHI/wty9mfR/W5x4PMJKgK/ymKZLUsE0t3thwAfHNmQgk4uscYoQeP4v7G cpPtrSsiXMJwvMHUNnSu9kPd1fVM05EWBhpXxsKweTmrUmY+mx9nyP8oGUP4iqjw0pIX sCyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=KuGyDT9UZAiED8ncCkVzGOPZpeAzteiYEUnH1kXZ728=; b=D2Oyzrv+EXRx/1kXz9y3ivqyKtftk2CcddalrBhLnpDnina8Bgif8Axruid0lmSea8 LZLQsEXd16/AWjjlCAox+AR+dbdKmvv70nky0rMVgdh3Kkkq/5zVwBmG0LR+awec8/e/ +ROd09uStKCfopMdDPOVcxZw1nK1DfTB+4tLGp+yhBxzfr3UY7YExZWDPg3cznEkt47N sMevQgICSwLBbzZ/SQShI3k4XyAmNLaNdet9EDquIFa4vKIC0bdC7FB/MD53/FhZS0Hy taidoH+vrpVvCCTGVuCGkYCibwlDtubhXIiyIpyn768QDzNxYW9YFWtTZC7DNd77cWFO JX4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=zG7yjDmM; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u123si4645902pgb.516.2018.12.20.01.28.30; Thu, 20 Dec 2018 01:28:45 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=zG7yjDmM; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732176AbeLTJ0t (ORCPT + 99 others); Thu, 20 Dec 2018 04:26:49 -0500 Received: from mail.kernel.org ([198.145.29.99]:58318 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732166AbeLTJ0r (ORCPT ); Thu, 20 Dec 2018 04:26:47 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 4E40E2186A; Thu, 20 Dec 2018 09:26:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1545298006; bh=+1ZjmLNRcrFm1onXxkJyJB6hMC62/4eI09rO5RBytho=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=zG7yjDmMfwpVcbIBf4/YsLcbFCuO8FSvFL6dZ3GLFZVfX8H5uCF+9L6nyNtF/xzlX ze/NCe09NRUIx5PTHixkgk+RMR2guFVkXIvC9Y029T07LA7cCaXhUwnT3wg/FMQ2nk DIHDpLIg9y7KNVWBs8a2aYk1KAHK/dcsAxsMdTe4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "Rafael J. Wysocki" , "K. Y. Srinivasan" , Jiri Kosina , Vitaly Kuznetsov , Dmitry Torokhov , Sasha Levin Subject: [PATCH 4.14 37/72] Input: hyper-v - fix wakeup from suspend-to-idle Date: Thu, 20 Dec 2018 10:18:36 +0100 Message-Id: <20181220085923.804253512@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20181220085922.332225035@linuxfoundation.org> References: <20181220085922.332225035@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ [ Upstream commit 10f91c73cc41ceead210a905dbd196398e99c7d2 ] 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 Acked-by: K. Y. Srinivasan Acked-by: Jiri Kosina Signed-off-by: Vitaly Kuznetsov Signed-off-by: Dmitry Torokhov Signed-off-by: Sasha Levin --- 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 6039f071fab1..5f1de24206ab 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 25151d9214e0..55288a026e4e 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.19.1