From patchwork Thu Aug 21 19:54:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Wysocki, Rafael J" X-Patchwork-Id: 4759631 Return-Path: X-Original-To: patchwork-linux-acpi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id EE9B79F344 for ; Thu, 21 Aug 2014 19:55:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 29A6820172 for ; Thu, 21 Aug 2014 19:55:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3C464200C6 for ; Thu, 21 Aug 2014 19:55:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753993AbaHUTzF (ORCPT ); Thu, 21 Aug 2014 15:55:05 -0400 Received: from mga01.intel.com ([192.55.52.88]:19329 "EHLO mga01.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753817AbaHUTzE convert rfc822-to-8bit (ORCPT ); Thu, 21 Aug 2014 15:55:04 -0400 Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 21 Aug 2014 12:54:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.04,374,1406617200"; d="scan'208";a="588181184" Received: from irsmsx103.ger.corp.intel.com ([163.33.3.157]) by fmsmga002.fm.intel.com with ESMTP; 21 Aug 2014 12:54:39 -0700 Received: from irsmsx104.ger.corp.intel.com ([169.254.5.234]) by IRSMSX103.ger.corp.intel.com ([169.254.3.112]) with mapi id 14.03.0195.001; Thu, 21 Aug 2014 20:54:38 +0100 From: "Wysocki, Rafael J" To: "Zheng, Lv" , "Brown, Len" CC: Lv Zheng , "linux-kernel@vger.kernel.org" , "linux-acpi@vger.kernel.org" Subject: RE: [PATCH 2/2] ACPI/EC: Add support to disallow QR_EC to be issued before completing the previous QR_EC. Thread-Topic: [PATCH 2/2] ACPI/EC: Add support to disallow QR_EC to be issued before completing the previous QR_EC. Thread-Index: AQHPvQryzjBaUJxvYEm9W2/dwnNrEpvbeWSW Date: Thu, 21 Aug 2014 19:54:38 +0000 Message-ID: <8f2s2dygqwh6mr6ccsao7k5m.1408650984840@email.android.com> References: , <54a1dc3591438f6fc5765dbabc17bdaa50df0dd4.1408601898.git.lv.zheng@intel.com> In-Reply-To: <54a1dc3591438f6fc5765dbabc17bdaa50df0dd4.1408601898.git.lv.zheng@intel.com> Reply-To: "Wysocki, Rafael J" Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Looks OK to me. Rafael -------- Original message -------- From "Zheng, Lv" Date: 21/08/2014 08:41 (GMT+01:00) To "Wysocki, Rafael J" ,"Brown, Len" Cc "Zheng, Lv" ,Lv Zheng ,linux-kernel@vger.kernel.org,linux-acpi@vger.kernel.org Subject [PATCH 2/2] ACPI/EC: Add support to disallow QR_EC to be issued before completing the previous QR_EC. There is platform refusing to respond QR_EC when SCI_EVT isn't set. A known such platform is Acer Aspire V5-573G. By disallowing QR_EC issuing without completing the previous one, we are able to reduce the possibilities to trigger issues on such platforms. Note that this fix can only reduce the occurrence rate of this issue, but this issue may still occur when such a platform doesn't clear SCI_EVT before or immediately after completing the previous QR_EC transaction. This patch cannot fix CLEAR_ON_RESUME quirk which also relies on the assumption that the platforms are able to respond even when SCI_EVT isn't set. But this patch is still useful as it can help to reduce the number of scheduled QR_EC work items. Link: https://bugzilla.kernel.org/show_bug.cgi?id=82611 Reported-and-tested-by: Alexander Mezin Signed-off-by: Lv Zheng --- drivers/acpi/ec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 1.7.10 -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 5e1ed31..9922cc4 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -303,11 +303,11 @@ static int acpi_ec_transaction_unlocked(struct acpi_ec *ec, /* following two actions should be kept atomic */ ec->curr = t; start_transaction(ec); - if (ec->curr->command == ACPI_EC_COMMAND_QUERY) - clear_bit(EC_FLAGS_QUERY_PENDING, &ec->flags); spin_unlock_irqrestore(&ec->lock, tmp); ret = ec_poll(ec); spin_lock_irqsave(&ec->lock, tmp); + if (ec->curr->command == ACPI_EC_COMMAND_QUERY) + clear_bit(EC_FLAGS_QUERY_PENDING, &ec->flags); ec->curr = NULL; spin_unlock_irqrestore(&ec->lock, tmp); return ret;