Received: by 2002:a4a:311b:0:0:0:0:0 with SMTP id k27-v6csp4305980ooa; Tue, 14 Aug 2018 04:17:34 -0700 (PDT) X-Google-Smtp-Source: AA+uWPw4iWB65mbTncurjKfiyrfPusVi2BRQLQPJvmdz6RyMHvFn6u041BZWgVhPzzdiyDhLlpYJ X-Received: by 2002:a63:551e:: with SMTP id j30-v6mr19963857pgb.92.1534245454791; Tue, 14 Aug 2018 04:17:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534245454; cv=none; d=google.com; s=arc-20160816; b=sQyxDQe08Aow8UAsxl4ZMTn9Ylk4/kJ8u0LWrcmLEzwx/bP/caqvE9iEkt4KRaGw5y +HXbWg/fmvLmZJi6iYgcMY5TlPnSFPL8xStpUgIc+FhEpHC1qJj5kUyHQvkTa8JVGwy0 H5h58xX62kXvmrG0OG2qOkSsE5eKjpSg7o9/oKv/hjQgcscknljbF6StEJDckD26D98y /C3fjukcWs0ozwzcyiKry/zhFC5wd3//GyYwz1q29udJ/gkPFeKbdtl62fKqt929Qxhq 0uY3YcWUbW6Aa+4E5R5yI6mLeEOgql3R7NhpCNCLTjbixZsqwJBlGsMRvVCbRKmyGHcC lMtA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=adSv0A3XV34ZVBQTXnW9yyyutKxal7nWS0x4Bu5tilQ=; b=g7QszTNQoDzGqZjdOgaG5l91AFDEQRFEN7yUWhaO+atp3l5D7ORz93mjQ6GfpayAqr wjGIEeajGAg8279IrOlqGz6WLXHhYPlgQxRDVOqfC52HOgBpdDcOH/PdC0r4dJJhuVR7 /u7OT8kMFDipJpk6ndNfEeQfjwbvjaVUsDafGkCjcTE3/NqXF2rlb6GIbE1EPYn6jY/u H8uByiCqWEtXZoQ1nCRnWtaHToG/oxGoa/mjh0hyPE6/nfP+LzYCalLyPiCnUUMKhH7y KVKSuSDXfzpMDbVb8zlp/uHddcZ7RhA2/7t4T3bIGMPpqJOEEOEc59nrc0n4Wd57Lf6P gEdw== 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 r69-v6si20827241pfl.260.2018.08.14.04.17.19; Tue, 14 Aug 2018 04:17:34 -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 S1732092AbeHNM5v (ORCPT + 99 others); Tue, 14 Aug 2018 08:57:51 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:44936 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728101AbeHNM5u (ORCPT ); Tue, 14 Aug 2018 08:57:50 -0400 Received: from 79.184.254.66.ipv4.supernova.orange.pl (79.184.254.66) (HELO aspire.rjw.lan) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83) id 4113d7ce812c33ff; Tue, 14 Aug 2018 12:11:19 +0200 From: "Rafael J. Wysocki" To: "Schmauss, Erik" Cc: Linux ACPI , Paul Menzel , Linux PM , LKML Subject: Re: [PATCH] ACPICA: Clear status of all events when entering sleep states Date: Tue, 14 Aug 2018 12:09:10 +0200 Message-ID: <8122869.gpExdStrds@aspire.rjw.lan> In-Reply-To: References: <1764673.ub23GCSM6t@aspire.rjw.lan> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday, August 13, 2018 7:15:19 PM CEST Schmauss, Erik wrote: > > > -----Original Message----- > > From: linux-acpi-owner@vger.kernel.org [mailto:linux-acpi- > > owner@vger.kernel.org] On Behalf Of Rafael J. Wysocki > > Sent: Sunday, August 12, 2018 3:50 AM > > To: Linux ACPI > > Cc: Paul Menzel ; Linux PM > pm@vger.kernel.org>; LKML ; Schmauss, Erik > > > > Subject: [PATCH] ACPICA: Clear status of all events when entering sleep states > > > > From: Rafael J. Wysocki > > > > Commit fa85015c0d95 (ACPICA: Clear status of all events when entering > > S5) made the sleep state entry code in ACPICA clear the status of all ACPI events > > when entering S5 to fix a functional regression reported against commit > > 18996f2db918 (ACPICA: Events: Stop unconditionally clearing ACPI IRQs during > > suspend/resume). However, it is reported now that the regression also affects > > system states other than S5 on some systems and causes them to wake up from > > sleep prematurely. > > > > For this reason, make the code in question clear the status of all ACPI events > > when entering all sleep states (in addition to S5) to avoid the premature > > wakeups (this may cause some wakeup events to be missed in theory, but the > > likelihood of that is small and the change here simply restores the previous > > behavior of the code). > > > > Fixes: 18996f2db918 (ACPICA: Events: Stop unconditionally clearing ACPI IRQs > > during suspend/resume) > > Reported-by: Paul Menzel > > Tested-by: Paul Menzel > > Cc: 4.17+ # 4.17+: fa85015c0d95 ACPICA: Clear > > status ... > > Signed-off-by: Rafael J. Wysocki > > --- > > drivers/acpi/acpica/hwsleep.c | 11 +++-------- > > 1 file changed, 3 insertions(+), 8 deletions(-) > > > > Index: linux-pm/drivers/acpi/acpica/hwsleep.c > > ================================================================= > > == > > --- linux-pm.orig/drivers/acpi/acpica/hwsleep.c > > +++ linux-pm/drivers/acpi/acpica/hwsleep.c > > @@ -56,14 +56,9 @@ acpi_status acpi_hw_legacy_sleep(u8 slee > > if (ACPI_FAILURE(status)) { > > return_ACPI_STATUS(status); > > } > > - /* > > - * If the target sleep state is S5, clear all GPEs and fixed events too > > - */ > > - if (sleep_state == ACPI_STATE_S5) { > > - status = acpi_hw_clear_acpi_status(); > > - if (ACPI_FAILURE(status)) { > > - return_ACPI_STATUS(status); > > - } > > + status = acpi_hw_clear_acpi_status(); > > + if (ACPI_FAILURE(status)) { > > + return_ACPI_STATUS(status); > > } > > acpi_gbl_system_awake_and_running = FALSE; > > > > I'll backport this for the next ACPICA release Thanks!