diff options
author | Alan Jenkins <alan-jenkins@tuffmail.co.uk> | 2008-11-01 07:05:26 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-11-11 18:34:06 -0500 |
commit | f8248434e6a11d7cd314281be3b39bbcf82fc243 (patch) | |
tree | c056e1185944da12dd31a74ee280a89989764ec7 /drivers/acpi | |
parent | 1cfe62c8010ac56e1bd3827e30386a87cc2f3594 (diff) |
ACPI: EC: make kernel messages more useful when GPE storm is detected
Make sure we can tell if the GPE storm workaround gets activated,
and avoid flooding the logs afterwards.
http://bugzilla.kernel.org/show_bug.cgi?id=11841
"plenty of line "ACPI: EC: non-query interrupt received,
switching to interrupt mode" in dmesg"
Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Acked-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/ec.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 3ef5b796a685..b340e08cf1d9 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c | |||
@@ -286,7 +286,8 @@ static int acpi_ec_transaction_unlocked(struct acpi_ec *ec, | |||
286 | acpi_enable_gpe(NULL, ec->gpe, ACPI_NOT_ISR); | 286 | acpi_enable_gpe(NULL, ec->gpe, ACPI_NOT_ISR); |
287 | } else if (test_bit(EC_FLAGS_GPE_MODE, &ec->flags) && | 287 | } else if (test_bit(EC_FLAGS_GPE_MODE, &ec->flags) && |
288 | t->irq_count > ACPI_EC_STORM_THRESHOLD) { | 288 | t->irq_count > ACPI_EC_STORM_THRESHOLD) { |
289 | pr_debug(PREFIX "GPE storm detected\n"); | 289 | pr_info(PREFIX "GPE storm detected, " |
290 | "transactions will use polling mode\n"); | ||
290 | set_bit(EC_FLAGS_GPE_STORM, &ec->flags); | 291 | set_bit(EC_FLAGS_GPE_STORM, &ec->flags); |
291 | } | 292 | } |
292 | return ret; | 293 | return ret; |
@@ -566,9 +567,15 @@ static u32 acpi_ec_gpe_handler(void *data) | |||
566 | if (!test_bit(EC_FLAGS_GPE_MODE, &ec->flags) && | 567 | if (!test_bit(EC_FLAGS_GPE_MODE, &ec->flags) && |
567 | !test_bit(EC_FLAGS_NO_GPE, &ec->flags)) { | 568 | !test_bit(EC_FLAGS_NO_GPE, &ec->flags)) { |
568 | /* this is non-query, must be confirmation */ | 569 | /* this is non-query, must be confirmation */ |
569 | if (printk_ratelimit()) | 570 | if (!test_bit(EC_FLAGS_GPE_STORM, &ec->flags)) { |
570 | pr_info(PREFIX "non-query interrupt received," | 571 | if (printk_ratelimit()) |
572 | pr_info(PREFIX "non-query interrupt received," | ||
573 | " switching to interrupt mode\n"); | ||
574 | } else { | ||
575 | /* hush, STORM switches the mode every transaction */ | ||
576 | pr_debug(PREFIX "non-query interrupt received," | ||
571 | " switching to interrupt mode\n"); | 577 | " switching to interrupt mode\n"); |
578 | } | ||
572 | set_bit(EC_FLAGS_GPE_MODE, &ec->flags); | 579 | set_bit(EC_FLAGS_GPE_MODE, &ec->flags); |
573 | } | 580 | } |
574 | return ACPI_INTERRUPT_HANDLED; | 581 | return ACPI_INTERRUPT_HANDLED; |