Received: by 10.213.65.68 with SMTP id h4csp2118798imn; Sun, 8 Apr 2018 20:10:15 -0700 (PDT) X-Google-Smtp-Source: AIpwx48+FuI3+PopbPTnzgCPlYZr53Gdoy9m24ESZToxY66K19cOcTKWL3cGuCqwdK4CG1dckB2H X-Received: by 10.98.59.4 with SMTP id i4mr27769433pfa.26.1523243415650; Sun, 08 Apr 2018 20:10:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1523243415; cv=none; d=google.com; s=arc-20160816; b=bSIs1ev7VSt3VAMEldLnBxUVQfXgmuxHPhQQgGZd7zpFLwqfZiupmgXnCPrxVLpKRp 8LrlLJIsppp+RpfUSofBgybAzdgx8yU58E2SAki+G9DoJJjlNvHMKQGe41hu+USGdYXf 5vSMeK2hxSFXg0U9gJa7i/1BGAtXpDiyby9dKACqhLOCn3b5irUZ7mNQh//Y2bR3lQWF ztqAF/Ls4kwjDo7xcgi6keGO7fo+qmSwdhvf2LmKcylNMtQFXZIk7GprnLlw/Paxvvxw aRT5tmcpHZh7+wH4yLqiSwmFheYli0hRmpIxGnEw9UC5ZpkTEsDslJPLJWtk9u0NhN8A knfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :spamdiagnosticmetadata:spamdiagnosticoutput:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=CgGN1tm4HXeivXXeBMHNQUWEWw+hNCj1Cudq+NXtuyA=; b=oe4ukejsmBxuxC0flqgJJqVw7LWwkl7nZbCMcm52hQcZtR+N+ucBUBehEgRnsIldMa 06TFiehzcRAy4pJHwcU/q9jJ4OPWA0NP95yJuA3n5nyEup7k65vkLEGCHsrYr1/jlGno FM9nMBuhdKhhs7aU5Ue1DlRssBpo6ZUPV8fhMdpcPyfFYi81jxW7a3kanCO5Oja8eKJk OzOP65AZlcIrTk7/SM8S8AU/NE7N3rcAzMiThmkW2diqa5HAiMgSKCMruOKn2KIdBai0 Vo8/fc0pBUoQOzI7FqYjTcKn6Y8RFzKizcYIA6Lzto485TrrazegDSLXZ+npAgmqum7C ibQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=SZDp2StQ; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l185si10681163pgd.108.2018.04.08.20.09.38; Sun, 08 Apr 2018 20:10: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; dkim=pass header.i=@microsoft.com header.s=selector1 header.b=SZDp2StQ; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=microsoft.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757967AbeDICwW (ORCPT + 99 others); Sun, 8 Apr 2018 22:52:22 -0400 Received: from mail-sn1nam02on0138.outbound.protection.outlook.com ([104.47.36.138]:42256 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1755339AbeDIA0b (ORCPT ); Sun, 8 Apr 2018 20:26:31 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=CgGN1tm4HXeivXXeBMHNQUWEWw+hNCj1Cudq+NXtuyA=; b=SZDp2StQw4rdnt2PLEaTboVE+FQoHth6/zBVH0K0sThZJokA4v6a87FmtU66os7I+IjEibTiK4tJYrY+NlqnW/7ZZVTrgJdMjVzXGk32mlLRl7mI4AVD+YwcNIjxB3JHKkYdmTA/MMFYJbUF7ftrpzooF6cRKDHCNz9ps0PQR+Y= Received: from DM5PR2101MB1032.namprd21.prod.outlook.com (52.132.128.13) by DM5PR2101MB0725.namprd21.prod.outlook.com (10.167.107.167) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.696.0; Mon, 9 Apr 2018 00:26:22 +0000 Received: from DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059]) by DM5PR2101MB1032.namprd21.prod.outlook.com ([fe80::8109:aef0:a777:7059%2]) with mapi id 15.20.0696.003; Mon, 9 Apr 2018 00:26:22 +0000 From: Sasha Levin To: "stable@vger.kernel.org" , "linux-kernel@vger.kernel.org" CC: "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH AUTOSEL for 4.14 151/161] ACPI / EC: Restore polling during noirq suspend/resume phases Thread-Topic: [PATCH AUTOSEL for 4.14 151/161] ACPI / EC: Restore polling during noirq suspend/resume phases Thread-Index: AQHTz5jEP27F740jn02iEhpkyjg/UQ== Date: Mon, 9 Apr 2018 00:21:56 +0000 Message-ID: <20180409001936.162706-151-alexander.levin@microsoft.com> References: <20180409001936.162706-1-alexander.levin@microsoft.com> In-Reply-To: <20180409001936.162706-1-alexander.levin@microsoft.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [52.168.54.252] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;DM5PR2101MB0725;7:v2xhOEQyV04SP3pQUdG5pSFRDoOR4nUccQbdlivP/nZ4YzVSz+xF2em2Q/wq2l32gbKrFIOWJsPjP/Nlf8CPBc4V8O6mgpKWgk0hD91TNdWbwrHL9ngiNuC6GympvEufx4jvriVswQpyOapm941T1QtSpegLlRqAQ+gUB/VqQDGFunx/jkqsdihZSLRfWiDE6zBm7V1W8oiZ5aRBc+6v4nONnT1kPrHviPASwp2YzEnAxUD8bThXa8kOzFrph/ss;20:vkOXeQHoIZjMdWLyMr2MNonpwwCUxtwACsbmiA0YmqtaJloDY7PzaEVKuPCyci5pCjPKrp2gYLlpl5jU6fUIwGu7d4CtxsgsDdxElmF8n1kmia6sDwL2ueUVb3paB2CFzlsReUA2d5/vYfCobPEq7o+gW6689V1lZ3MDl7Rzef0= x-ms-office365-filtering-ht: Tenant X-MS-Office365-Filtering-Correlation-Id: 9b1e08c5-6add-4de8-8d75-08d59db08587 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(7020095)(4652020)(48565401081)(5600026)(4604075)(3008032)(4534165)(4627221)(201703031133081)(201702281549075)(2017052603328)(7193020);SRVR:DM5PR2101MB0725; x-ms-traffictypediagnostic: DM5PR2101MB0725: authentication-results: spf=none (sender IP is ) smtp.mailfrom=Alexander.Levin@microsoft.com; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(28532068793085)(89211679590171)(228905959029699); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(8211001083)(61425038)(6040522)(2401047)(5005006)(8121501046)(10201501046)(3231221)(944501327)(52105095)(93006095)(93001095)(3002001)(6055026)(61426038)(61427038)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123562045)(20161123558120)(20161123560045)(6072148)(201708071742011);SRVR:DM5PR2101MB0725;BCL:0;PCL:0;RULEID:;SRVR:DM5PR2101MB0725; x-forefront-prvs: 0637FCE711 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(39380400002)(346002)(366004)(376002)(396003)(39860400002)(199004)(189003)(6486002)(81166006)(26005)(6512007)(6306002)(4326008)(6666003)(6436002)(81156014)(8676002)(97736004)(15650500001)(186003)(36756003)(72206003)(53936002)(107886003)(2906002)(966005)(86362001)(76176011)(110136005)(305945005)(10090500001)(486006)(3660700001)(102836004)(5660300001)(14454004)(476003)(86612001)(446003)(99286004)(68736007)(66066001)(11346002)(54906003)(2616005)(1076002)(7736002)(5250100002)(25786009)(8936002)(478600001)(2900100001)(2501003)(3280700002)(105586002)(59450400001)(316002)(106356001)(22452003)(6506007)(3846002)(10290500003)(6116002)(22906009)(217873001);DIR:OUT;SFP:1102;SCL:1;SRVR:DM5PR2101MB0725;H:DM5PR2101MB1032.namprd21.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: hYdrAelBv+/RJs4TgHBaalgzF8ZWywDU4D06LtDdsKw2DuY56Bit6qZhwuM/bsfoEEbZSMGaC51x+Gv4kqnzxuXA46b/CHBuY7f5qVdgLD9a3HuZzng6GMsmZYGgmZ5T6QcLDPGwJMgXPTvfRGhfK1b1M+EAG3KnbGew1UeA5PPFzuHp6vxi58s1G9DOF4aeslCzoFNSFN1bOmwburQ1xKin79SHfnN9D3y57yWgg1DG1JMHQ1NWgwoTHUUBfefdYuAMpYlgLHEtLpIx1Tx3W8L6u++ndd00ybb5iuEXR6QsF1K2BczGxdkOXC7f5z2bEQI6I+ZY3A2273JVw985i7/FNai1pyKAW0lws5dNUETLWSqqtrsQlaUdk0kcXsvDvf2P7Uuc0a4UrwN7FrqnBHXld/WTcHma23CBZi2pcnM= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9b1e08c5-6add-4de8-8d75-08d59db08587 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Apr 2018 00:21:56.7685 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR2101MB0725 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Rafael J. Wysocki" [ Upstream commit 3cd091a773936c54344a519f7ee1379ccb620bee ] Commit 662591461c4b (ACPI / EC: Drop EC noirq hooks to fix a regression) modified the ACPI EC driver so that it doesn't switch over to busy polling mode during noirq stages of system suspend and resume in an attempt to fix an issue resulting from that behavior. However, that modification introduced a system resume regression on Thinkpad X240, so make the EC driver switch over to the polling mode during noirq stages of system suspend and resume again, which effectively reverts the problematic commit. Fixes: 662591461c4b (ACPI / EC: Drop EC noirq hooks to fix a regression) Link: https://bugzilla.kernel.org/show_bug.cgi?id=3D197863 Reported-by: Markus Demleitner Tested-by: Markus Demleitner Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- drivers/acpi/ec.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index df842465634a..fedbcfd45b67 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -1927,6 +1927,9 @@ static int acpi_ec_suspend_noirq(struct device *dev) ec->reference_count >=3D 1) acpi_set_gpe(NULL, ec->gpe, ACPI_GPE_DISABLE); =20 + if (acpi_sleep_no_ec_events()) + acpi_ec_enter_noirq(ec); + return 0; } =20 @@ -1934,6 +1937,9 @@ static int acpi_ec_resume_noirq(struct device *dev) { struct acpi_ec *ec =3D acpi_driver_data(to_acpi_device(dev)); =20 + if (acpi_sleep_no_ec_events()) + acpi_ec_leave_noirq(ec); + if (ec_no_wakeup && test_bit(EC_FLAGS_STARTED, &ec->flags) && ec->reference_count >=3D 1) acpi_set_gpe(NULL, ec->gpe, ACPI_GPE_ENABLE); --=20 2.15.1