Re: ACPI: EC: Fix logspam in "GPE storm avoidance" code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alan Jenkins wrote:
<http://bugzilla.kernel.org/show_bug.cgi?id=11841>
"plenty of line "ACPI: EC: non-query interrupt received,
 switching to interrupt mode" in dmesg"
Probably, it is better to make pr_debug().

GPE storm avoidance involves disabling the EC GPE during transactions.
Unfortunately we forget to re-enable EC_FLAGS_GPE_MODE afterwards.
"We" don't forget it, "we" just use same mechanism as driver init. Thus if
for some reason interrupts do not start to arrive after we issue enable_gpe(),
we will not fall to timeouts.

This happens to work because we re-enable it anyway when we detect
the first confirmation interrupt of the next transaction.  However,
this causes lots of bogus "switching to interrupt mode" messages.
they are not "bogus", it is really switching the mode...

Signed-off-by: Alan Jenkins <alan-jenkins@xxxxxxxxxxxxxx>

diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 7f0d81c..ba47c7c 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -285,6 +285,7 @@ static int acpi_ec_transaction_unlocked(struct acpi_ec *ec, u8 command,
 		/* check if we received SCI during transaction */
 		ec_check_sci(ec, acpi_ec_read_status(ec));
 		/* it is safe to enable GPE outside of transaction */
+		set_bit(EC_FLAGS_GPE_MODE, &ec->flags);
 		acpi_enable_gpe(NULL, ec->gpe, ACPI_NOT_ISR);
 	} else if (test_bit(EC_FLAGS_GPE_MODE, &ec->flags) &&
 		   t.irq_count > ACPI_EC_STORM_THRESHOLD) {



--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux