https://bugzilla.kernel.org/show_bug.cgi?id=14733
--- Comment #82 from pcxz <aluigi.te...@alice.it> 2012-06-05 06:27:05 --- This patch work ok for me ( i named it ec.diff ): [code] --- drivers/acpi/ec.c 2011-01-05 01:50:19.000000000 +0100 +++ drivers/acpi/ec.c 2011-01-10 15:55:23.000000000 +0100 @@ -223,6 +223,7 @@ if (ec_transaction_done(ec)) return 0; } else { + msleep(1); if (wait_event_timeout(ec->wait, ec_transaction_done(ec), msecs_to_jiffies(1))) @@ -230,8 +231,8 @@ } advance_transaction(ec, acpi_ec_read_status(ec)); } while (time_before(jiffies, delay)); - if (acpi_ec_read_status(ec) & ACPI_EC_FLAG_IBF) - break; +// if (acpi_ec_read_status(ec) & ACPI_EC_FLAG_IBF) +// break; pr_debug(PREFIX "controller reset, restart transaction\n"); spin_lock_irqsave(&ec->curr_lock, flags); start_transaction(ec); @@ -268,6 +269,15 @@ return (status & ACPI_EC_FLAG_IBF) == 0; } +/* try to clean input buffer with burst_disable transaction */ +static int acpi_ec_clean_buffer(struct acpi_ec *ec) +{ + struct transaction t = {.command = ACPI_EC_BURST_DISABLE, + .wdata = NULL, .rdata = NULL, + .wlen = 0, .rlen = 0}; + return acpi_ec_transaction_unlocked(ec, &t); +} + static int ec_wait_ibf0(struct acpi_ec *ec) { unsigned long delay = jiffies + msecs_to_jiffies(ec_delay); @@ -276,7 +286,8 @@ if (wait_event_timeout(ec->wait, ec_check_ibf0(ec), msecs_to_jiffies(1))) return 0; - return -ETIME; +// return -ETIME; + return acpi_ec_clean_buffer(ec); } static int acpi_ec_transaction(struct acpi_ec *ec, struct transaction *t) [/code] -- 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. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ acpi-bugzilla mailing list acpi-bugzilla@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/acpi-bugzilla