Commenting out the goto end; line in acpi_ec_transaction and recompiling the kernel from source works around the bug for me -- I still get the "input buffer not empty" error messages in dmesg, but the brightness keys and AC adapter detection continue to work.
static int acpi_ec_transaction(struct acpi_ec *ec, struct transaction *t, int force_poll)
{
int status;
u32 glk;
if (!ec || (!t) || (t->wlen && !t->wdata) || (t->rlen && !t->rdata)) return -EINVAL;
if (t->rdata) memset(t->rdata, 0, t->rlen); mutex_lock(&ec->lock);
if (ec->global_lock) { status = acpi_acquire_global_lock(ACPI_EC_UDELAY_GLK, &glk);
if (ACPI_FAILURE(status)) { status = -ENODEV; goto unlock;
}
}
if (ec_wait_ibf0(ec)) { pr_err(PREFIX "input buffer is not empty, " "aborting transaction--\n"); status = -ETIME; //goto end;
}
status = acpi_ec_transaction_unlocked(ec, t, force_poll);
end:
if (ec->global_lock) acpi_release_global_lock(glk);
unlock: mutex_unlock(&ec->lock);
return status;
}
Commenting out the goto end; line in acpi_ec_transaction and recompiling the kernel from source works around the bug for me -- I still get the "input buffer not empty" error messages in dmesg, but the brightness keys and AC adapter detection continue to work.
static int acpi_ec_ transaction( struct acpi_ec *ec, struct transaction *t,
int force_poll)
return -EINVAL;
memset( t->rdata, 0, t->rlen);
mutex_ lock(&ec- >lock);
status = acpi_acquire_ global_ lock(ACPI_ EC_UDELAY_ GLK, &glk); status) ) {
status = -ENODEV;
goto unlock;
pr_err( PREFIX "input buffer is not empty, "
"aborting transaction--\n");
status = -ETIME;
//goto end;
{
int status;
u32 glk;
if (!ec || (!t) || (t->wlen && !t->wdata) || (t->rlen && !t->rdata))
if (t->rdata)
if (ec->global_lock) {
if (ACPI_FAILURE(
}
}
if (ec_wait_ibf0(ec)) {
} transaction_ unlocked( ec, t, force_poll);
acpi_ release_ global_ lock(glk) ;
mutex_ unlock( &ec->lock) ;
status = acpi_ec_
end:
if (ec->global_lock)
unlock:
return status;
}