Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3465554pxk; Mon, 5 Oct 2020 10:18:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwoHwzpvEFNm4Yszx2vGiAfiFEO03/C3V6H+jmsHb/pjSPYoctbn7q1/2uuvjKXIfx6wmqS X-Received: by 2002:a50:da45:: with SMTP id a5mr748246edk.152.1601918323000; Mon, 05 Oct 2020 10:18:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601918322; cv=none; d=google.com; s=arc-20160816; b=P2Bu/pcI0TbRrCi5f8Ow/yTbHHdI0O7YEIhf7LILC9ec5CflfPKyPde3ku6x0IzL5I CjA3a0qgQGp5s/swY2pWK1Xa7QXp9PZ0zpPx5q8NyZaui1Kc21l8ISUsPtQ1VaFXEHSj NBU+3VDBfP50KZ69BVKuB8ok8OkSR78rYwLzDoVBRHWa3S/T04aEFZEAAXQgtWPdE5JK IIOhWE1PnPiCe1pb0Y9M09Wh4+mTSPGZaVTMISORgiaOtwyUfDl3N5Uyfrpv2aF7g7Ke MSwvSaf1VP+quWRXpOcAlbhcU6SyKbqwAcrfojkm6ngobrf91eAh2t/8pUNNgMAoX7eV Xvsg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=J2HRAupwBxR/jfTL4p+oAqgMF0a0ijlT1uQIaoW5SKI=; b=wDA5YueRk9J3A09NyKcVuzSzzkpfHCIeMVT3aQET7RoLXao4kBGHUKmLmGnokohbnV cyvZ2oGUi3tc6+UJJzyBTF4c6Lj+tWpKI31uPZmz1rOwk/c+EttMXle2qkaSOSEYhvT/ ++JZRR14vMeWMPaQm0J00k+JgxWEToSrthtp1T5vbqxDwg6OIxUJwQP7oLbkWkSXBTPH 64hma6Cg6Z17jATP88rxiXLiNkD7qVv31tmmF6WnC/2JAV/gqqOK6hRepQ0wJFLiWTLj ViPZBRrY1Cqvq7y2x8CqYbORVv16IuVmra1ECy5lRUdOUz4R5O422GjET5if8dq5Kk24 R0cQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id kt25si156532ejb.438.2020.10.05.10.18.20; Mon, 05 Oct 2020 10:18:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727571AbgJERN6 (ORCPT + 99 others); Mon, 5 Oct 2020 13:13:58 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:54784 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726691AbgJERNy (ORCPT ); Mon, 5 Oct 2020 13:13:54 -0400 Received: from 89-64-89-50.dynamic.chello.pl (89.64.89.50) (HELO kreacher.localnet) by serwer1319399.home.pl (79.96.170.134) with SMTP (IdeaSmtpServer 0.83.489) id d247e9a3d79801fb; Mon, 5 Oct 2020 19:13:51 +0200 From: "Rafael J. Wysocki" To: Linux ACPI Cc: Linux PM , LKML , Raymond Tan Subject: [PATCH 1/2] ACPI: EC: PM: Flush EC work unconditionally after wakeup Date: Mon, 05 Oct 2020 19:13:15 +0200 Message-ID: <66772207.vZgp7G9zJX@kreacher> In-Reply-To: <1969699.iD4Ik4PeQO@kreacher> References: <1969699.iD4Ik4PeQO@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rafael J. Wysocki Subject: [PATCH] ACPI: EC: PM: Flush EC work unconditionally after wakeup Commit 607b9df63057 ("ACPI: EC: PM: Avoid flushing EC work when EC GPE is inactive") has been reported to cause some power button wakeup events to be missed on some systems, so modify acpi_ec_dispatch_gpe() to call acpi_ec_flush_work() unconditionally to effectively reverse the changes made by that commit. Also note that the problem which prompted commit 607b9df63057 is not reproducible any more on the affected machine. Fixes: 607b9df63057 ("ACPI: EC: PM: Avoid flushing EC work when EC GPE is inactive") Cc: 5.4+ # 5.4+ Reported-by: Raymond Tan Signed-off-by: Rafael J. Wysocki --- drivers/acpi/ec.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) Index: linux-pm/drivers/acpi/ec.c =================================================================== --- linux-pm.orig/drivers/acpi/ec.c +++ linux-pm/drivers/acpi/ec.c @@ -2019,12 +2019,11 @@ bool acpi_ec_dispatch_gpe(void) * to allow the caller to process events properly after that. */ ret = acpi_dispatch_gpe(NULL, first_ec->gpe); - if (ret == ACPI_INTERRUPT_HANDLED) { + if (ret == ACPI_INTERRUPT_HANDLED) pm_pr_dbg("ACPI EC GPE dispatched\n"); - /* Flush the event and query workqueues. */ - acpi_ec_flush_work(); - } + /* Flush the event and query workqueues. */ + acpi_ec_flush_work(); return false; }