Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752316AbdFWMfN (ORCPT ); Fri, 23 Jun 2017 08:35:13 -0400 Received: from cloudserver094114.home.net.pl ([79.96.170.134]:43393 "EHLO cloudserver094114.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750932AbdFWMfK (ORCPT ); Fri, 23 Jun 2017 08:35:10 -0400 From: "Rafael J. Wysocki" To: "Zheng, Lv" Cc: Linux ACPI , Linux PM , Andy Shevchenko , Darren Hart , LKML , Srinivas Pandruvada , Mika Westerberg , Mario Limonciello , Tom Lanyon , =?ISO-8859-1?Q?J=E9r=3Fme?= de Bretagne , Linus Torvalds Subject: Re: [PATCH] ACPI / sleep: EC-based wakeup from suspend-to-idle on recent systems Date: Fri, 23 Jun 2017 14:27:50 +0200 Message-ID: <32586599.ds5xRoJDge@aspire.rjw.lan> User-Agent: KMail/4.14.10 (Linux/4.12.0-rc1+; KDE/4.14.9; x86_64; ; ) In-Reply-To: <2892243.DJpRz1t3Fg@aspire.rjw.lan> References: <1979543.KIEJ8uyRaT@aspire.rjw.lan> <1AE640813FDE7649BE1B193DEA596E886CED4669@SHSMSX101.ccr.corp.intel.com> <2892243.DJpRz1t3Fg@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 List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1031 Lines: 33 On Friday, June 23, 2017 02:13:57 PM Rafael J. Wysocki wrote: > On Friday, June 23, 2017 06:30:35 AM Zheng, Lv wrote: > > Hi, Rafael > > > > [cut] > > > > > > > Index: linux-pm/drivers/acpi/ec.c > > > =================================================================== > > > --- linux-pm.orig/drivers/acpi/ec.c > > > +++ linux-pm/drivers/acpi/ec.c > > > @@ -1835,7 +1835,7 @@ static int acpi_ec_suspend(struct device > > > struct acpi_ec *ec = > > > acpi_driver_data(to_acpi_device(dev)); > > > > > > - if (ec_freeze_events) > > > + if (acpi_sleep_no_ec_events() && ec_freeze_events) > > > acpi_ec_disable_event(ec); > > > return 0; > > > } > > > > I just notice a slight pontential issue. > > Should we add a similar change to acpi_ec_stop()? > > Yes, it looks like that, thanks! Actually, no, I don't think so, because acpi_ec_block_transactions() is not used for suspend-to-idle, but I need a separate variable for that, because pm_suspend_via_firmware() also returns "false" for hibernation. Thanks, Rafael