Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp822991pxb; Tue, 3 Nov 2020 13:33:11 -0800 (PST) X-Google-Smtp-Source: ABdhPJwjJF+Z0i1CRBZQLUbiVPgGOZfSFQtoAj/5X4BYsVP3UVu6X4wDMiAItFoCOBG+I+EylcbG X-Received: by 2002:a17:906:1614:: with SMTP id m20mr21672879ejd.258.1604439191066; Tue, 03 Nov 2020 13:33:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604439191; cv=none; d=google.com; s=arc-20160816; b=nqV9ZKFnTiqFwLAeomqtDcJWvW4yjR0un32mfwH1TSvQFCb6ypxaCiTIxGRDfzIApV ooqIQr+mJzGVfqV9NSBxItUbKC/FbmN+ZvmPOr8fMIIkZs1KxMnJNyh/tqIYr0aIcvYA aVyx/rj+4i6LjBRq+HDX8vST6Y184HycOrEdoUkTcftmw7+smXocSEc076FNw81sjoGC mhqNWxOIwfRHFJ//wu1V5+VU3DbPXMGM1y5EcMxls5dKQ7XwCUJYy72bZtSUy8Oaj+7N cbbMYznDto2p0XH/C3mia5pCEuytl5g/kaXldWV4NcRD/xdVvFmvkmmIeZtzy7dmNMR0 Q7Zw== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=p3lHR2mgspA4M5lXbg3k6swDtoIpm/tlLPC8pqmKAtM=; b=0Jet5Ly94BI+WFon/nqARld6vmmw+6UrSHQq/OCikCkMJW6Npki3VQvY0KchO5d2wu Y8RupZS30feV/Q/0DXBeGc7IRngEYHWbLIWQqd0llxN7w7SxC33e2u0cumFnJpKkJXqK YSxzbQcTM8Qjl0+x/P7nPTcRub+QQorUwiUcTaM96HXTKOHsGDYJ10IuyUmeCjg5fu3G dnu5CdvYzcLncGmM5r6Z4Kl8c0+13sQ38uRA1c3Vm8VADCsrCPQswpA9KHZJ5uqCWqDG oQuidqiNvF9LHLKA1cugpO37JwKsmdDzoCEsZAXkM6z6Jaf4kROpz8/dEZE5OdGMkW6b YClw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=E9q+Jo+X; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b26si69642ejd.476.2020.11.03.13.32.48; Tue, 03 Nov 2020 13:33:11 -0800 (PST) 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; dkim=pass header.i=@kernel.org header.s=default header.b=E9q+Jo+X; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732943AbgKCU6S (ORCPT + 99 others); Tue, 3 Nov 2020 15:58:18 -0500 Received: from mail.kernel.org ([198.145.29.99]:60780 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731846AbgKCU6L (ORCPT ); Tue, 3 Nov 2020 15:58:11 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 6A3BA223AC; Tue, 3 Nov 2020 20:58:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604437090; bh=m8Yc0AMDiC0orHwfyeGZ+Kph9cEuyK8UTRSjXVz/zPo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E9q+Jo+XIt/qsegn2nTG6C1lQbM+tLZHt9hsCWkMg1tjdQvdjwC9HTKoPGSeGqXo6 NHb0xSNXg2UJgKqQS6Nx3Yl4qIfPg/g3bfueJKtjZgl/6nUH0Zz4hdOsxrdBaw85cS x9pf2MVqD3WnJ4GTd7AMtk8LgcY+8AXNzGocVl7o= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Raymond Tan , "Rafael J. Wysocki" Subject: [PATCH 5.4 115/214] ACPI: EC: PM: Flush EC work unconditionally after wakeup Date: Tue, 3 Nov 2020 21:36:03 +0100 Message-Id: <20201103203301.657099491@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201103203249.448706377@linuxfoundation.org> References: <20201103203249.448706377@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rafael J. Wysocki commit 5e92442bb4121562231e6daf8a2d1306cb5f8805 upstream. 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") Reported-by: Raymond Tan Cc: 5.4+ # 5.4+ Signed-off-by: Rafael J. Wysocki Signed-off-by: Greg Kroah-Hartman --- drivers/acpi/ec.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -1976,12 +1976,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("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; }