https://bugzilla.kernel.org/show_bug.cgi?id=14733
--- Comment #93 from Lan Tianyu <tianyu....@intel.com> 2013-04-10 14:52:24 --- Hi Andrey & pcxz: Great thanks for your test. Could you provide dmesg with ec.c in debug mode and the following patch? diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index d45b287..9fe9a37 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -242,7 +242,7 @@ static int ec_poll(struct acpi_ec *ec) advance_transaction(ec, acpi_ec_read_status(ec)); } while (time_before(jiffies, delay)); if (acpi_ec_read_status(ec) & ACPI_EC_FLAG_IBF) - break; + return -EAGAIN; pr_debug(PREFIX "controller reset, restart transaction\n"); spin_lock_irqsave(&ec->lock, flags); start_transaction(ec); @@ -255,19 +255,26 @@ static int acpi_ec_transaction_unlocked(struct acpi_ec *ec, struct transaction *t) { unsigned long tmp; - int ret = 0; + int ret = 0, count = 0; + if (EC_FLAGS_MSI) udelay(ACPI_EC_MSI_UDELAY); /* start transaction */ spin_lock_irqsave(&ec->lock, tmp); /* following two actions should be kept atomic */ ec->curr = t; +retry: 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 (ret == -EAGAIN && count < 10) { + pr_info("%s: retry %d \n", __func__, ++count); + goto retry; + } + ec->curr = NULL; spin_unlock_irqrestore(&ec->lock, tmp); return ret; -- Configure bugmail: https://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug. ------------------------------------------------------------------------------ Precog is a next-generation analytics platform capable of advanced analytics on semi-structured data. The platform includes APIs for building apps and a phenomenal toolset for data science. Developers can use our toolset for easy data analysis & visualization. Get a free account! http://www2.precog.com/precogplatform/slashdotnewsletter _______________________________________________ acpi-bugzilla mailing list acpi-bugzilla@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/acpi-bugzilla