Received: by 10.192.165.148 with SMTP id m20csp536732imm; Wed, 25 Apr 2018 03:53:47 -0700 (PDT) X-Google-Smtp-Source: AIpwx4/h9zluXX7Y4wvrKOI//Zmm3X5nH6p9UZZAbKdzKfq/appFf01qduCnm8PVesE7/kgcQaCX X-Received: by 10.98.35.215 with SMTP id q84mr20316251pfj.31.1524653627228; Wed, 25 Apr 2018 03:53:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524653627; cv=none; d=google.com; s=arc-20160816; b=OWVTil4nnen9wLLx5LHYwPRFddHYqtuh6TuQ+xxRD/DLdXoI5Q2n6xMA65FH3//zN/ eXMFzzfBHkYt1XwwN1zDQIkRe/TVGqf9XB6kZzUlY4A43bHLzyNutiAPDLz9d3QT0x+x y49w48km/DpuTna9ju9f/fz1qsz4nKgp5kIS2zdFjP/aiSITecE4xYiA8n304xJIzGEU 6C2SEGNfUD0kdMzZL+wIpev/txSxKB5iGgrj6epw5aPcOfV0qNLQ6Mvf6esVKxKk1c3G lVGX6LI5thNDCcvMw4CsPy7WWiMftCLgEXA/zEsPp7+RV3OzDA1YOgy7V2VCRZtToe4r Jqwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=7cRwGtzfBvdl0WGQ4EVcjKMw8zg+p3YvsZRq4Wbt+W0=; b=ikHi5BXbXgf9HgEIPHM8BhY5r8SN4SCjzS58b7w4Q8cX4AxXaK2Kf2i36wS01R+s/c S4P2LPPH80tzbLlJTB5lDSeoi73btVkglD/JFWaNOULquymPvbxKWXCLlFofLx2gSdaY ZoTO0T7G5m8ygIPS6prTk6z9OZa3Chk6/GShJQnv1vX95HIytvSHLuPvogJfI3DhZwXo nH4jU0E+MYuYOoE9OGKhQ7VntVPMuhpHhGppKmcw3qtYfehWcat6vYqadbZqsqNofMGP jmRXOf9aHcVO6I56DwuK4krepFFmOgOhdUweskPGlw+HRx9pEn1jOX0AwDAtZ/54UDiO Zruw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r14-v6si17001982plj.341.2018.04.25.03.53.33; Wed, 25 Apr 2018 03:53:47 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753605AbeDYKwe (ORCPT + 99 others); Wed, 25 Apr 2018 06:52:34 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:53166 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753974AbeDYKn4 (ORCPT ); Wed, 25 Apr 2018 06:43:56 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 44671266; Wed, 25 Apr 2018 10:43:55 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Markus Demleitner , "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH 4.14 161/183] ACPI / EC: Restore polling during noirq suspend/resume phases Date: Wed, 25 Apr 2018 12:36:21 +0200 Message-Id: <20180425103248.999623634@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180425103242.532713678@linuxfoundation.org> References: <20180425103242.532713678@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 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 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ 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=197863 Reported-by: Markus Demleitner Tested-by: Markus Demleitner Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/acpi/ec.c | 6 ++++++ 1 file changed, 6 insertions(+) --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -1927,6 +1927,9 @@ static int acpi_ec_suspend_noirq(struct ec->reference_count >= 1) acpi_set_gpe(NULL, ec->gpe, ACPI_GPE_DISABLE); + if (acpi_sleep_no_ec_events()) + acpi_ec_enter_noirq(ec); + return 0; } @@ -1934,6 +1937,9 @@ static int acpi_ec_resume_noirq(struct d { struct acpi_ec *ec = acpi_driver_data(to_acpi_device(dev)); + 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 >= 1) acpi_set_gpe(NULL, ec->gpe, ACPI_GPE_ENABLE);