From patchwork Thu Jun 24 23:21:42 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafael Wysocki X-Patchwork-Id: 107948 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o5ONQ8Bt029190 for ; Thu, 24 Jun 2010 23:26:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754188Ab0FXX0K (ORCPT ); Thu, 24 Jun 2010 19:26:10 -0400 Received: from ogre.sisk.pl ([217.79.144.158]:47189 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752918Ab0FXX0J (ORCPT ); Thu, 24 Jun 2010 19:26:09 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by ogre.sisk.pl (Postfix) with ESMTP id 1D9DC18962F; Fri, 25 Jun 2010 01:14:51 +0200 (CEST) Received: from ogre.sisk.pl ([127.0.0.1]) by localhost (ogre.sisk.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 32199-10; Fri, 25 Jun 2010 01:14:39 +0200 (CEST) Received: from ferrari.localnet (220-bem-13.acn.waw.pl [82.210.184.220]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ogre.sisk.pl (Postfix) with ESMTP id F2303189672; Fri, 25 Jun 2010 01:14:22 +0200 (CEST) From: "Rafael J. Wysocki" To: Len Brown Subject: [PATCH 4/6] ACPI / EC: Do not use acpi_set_gpe Date: Fri, 25 Jun 2010 01:21:42 +0200 User-Agent: KMail/1.13.3 (Linux/2.6.35-rc3-rjw+; KDE/4.4.3; x86_64; ; ) Cc: ACPI Devel Maling List , "Lin, Ming M" , Matthew Garrett , "Moore, Robert" , "Linux-pm mailing list" , len.brown@intel.com, Alexey Starikovskiy References: <201006250117.45148.rjw@sisk.pl> In-Reply-To: <201006250117.45148.rjw@sisk.pl> MIME-Version: 1.0 Message-Id: <201006250121.42506.rjw@sisk.pl> X-Virus-Scanned: amavisd-new at ogre.sisk.pl using MkS_Vir for Linux Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Thu, 24 Jun 2010 23:26:12 +0000 (UTC) Index: linux-2.6/drivers/acpi/ec.c =================================================================== --- linux-2.6.orig/drivers/acpi/ec.c +++ linux-2.6/drivers/acpi/ec.c @@ -313,11 +313,8 @@ static int acpi_ec_transaction(struct ac pr_debug(PREFIX "transaction start\n"); /* disable GPE during transaction if storm is detected */ if (test_bit(EC_FLAGS_GPE_STORM, &ec->flags)) { - /* - * It has to be disabled at the hardware level regardless of the - * GPE reference counting, so that it doesn't trigger. - */ - acpi_set_gpe(NULL, ec->gpe, ACPI_GPE_DISABLE); + /* It has to be disabled, so that it doesn't trigger. */ + acpi_disable_gpe(NULL, ec->gpe); } status = acpi_ec_transaction_unlocked(ec, t); @@ -326,12 +323,8 @@ static int acpi_ec_transaction(struct ac ec_check_sci_sync(ec, acpi_ec_read_status(ec)); if (test_bit(EC_FLAGS_GPE_STORM, &ec->flags)) { msleep(1); - /* - * It is safe to enable the GPE outside of the transaction. Use - * acpi_set_gpe() for that, since we used it to disable the GPE - * above. - */ - acpi_set_gpe(NULL, ec->gpe, ACPI_GPE_ENABLE); + /* It is safe to enable the GPE outside of the transaction. */ + acpi_enable_gpe(NULL, ec->gpe); } else if (t->irq_count > ACPI_EC_STORM_THRESHOLD) { pr_info(PREFIX "GPE storm detected, " "transactions will use polling mode\n");