From patchwork Thu Oct 1 22:53:15 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Starikovskiy X-Patchwork-Id: 51046 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n91Ms4YS016590 for ; Thu, 1 Oct 2009 22:54:04 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754100AbZJAWxO (ORCPT ); Thu, 1 Oct 2009 18:53:14 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754116AbZJAWxO (ORCPT ); Thu, 1 Oct 2009 18:53:14 -0400 Received: from charybdis-ext.suse.de ([195.135.221.2]:37149 "EHLO emea5-mh.id5.novell.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754100AbZJAWxN (ORCPT ); Thu, 1 Oct 2009 18:53:13 -0400 Received: from [127.0.1.1] ([149.44.162.75]) by emea5-mh.id5.novell.com with ESMTP; Fri, 02 Oct 2009 00:53:15 +0200 From: Alexey Starikovskiy To: Len Brown Cc: Linux-acpi@vger.kernel.org Subject: [PATCH] ACPI: EC: Restart command even if no interrupts from EC Date: Fri, 02 Oct 2009 02:53:15 +0400 Message-ID: <20091001225315.31207.88668.stgit@thinkpad> User-Agent: StGIT/0.14.2 MIME-Version: 1.0 Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index da7da37..9c34515 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -234,10 +234,8 @@ static int ec_poll(struct acpi_ec *ec) } advance_transaction(ec, acpi_ec_read_status(ec)); } while (time_before(jiffies, delay)); - if (!ec->curr->irq_count || - (acpi_ec_read_status(ec) & ACPI_EC_FLAG_IBF)) + if (acpi_ec_read_status(ec) & ACPI_EC_FLAG_IBF) break; - /* try restart command if we get any false interrupts */ pr_debug(PREFIX "controller reset, restart transaction\n"); spin_lock_irqsave(&ec->curr_lock, flags); start_transaction(ec);