diff options
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/ec.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 9bf7a7546bd4..1e6d4184f0ea 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c | |||
@@ -313,11 +313,8 @@ static int acpi_ec_transaction(struct acpi_ec *ec, struct transaction *t) | |||
313 | pr_debug(PREFIX "transaction start\n"); | 313 | pr_debug(PREFIX "transaction start\n"); |
314 | /* disable GPE during transaction if storm is detected */ | 314 | /* disable GPE during transaction if storm is detected */ |
315 | if (test_bit(EC_FLAGS_GPE_STORM, &ec->flags)) { | 315 | if (test_bit(EC_FLAGS_GPE_STORM, &ec->flags)) { |
316 | /* | 316 | /* It has to be disabled, so that it doesn't trigger. */ |
317 | * It has to be disabled at the hardware level regardless of the | 317 | acpi_disable_gpe(NULL, ec->gpe); |
318 | * GPE reference counting, so that it doesn't trigger. | ||
319 | */ | ||
320 | acpi_set_gpe(NULL, ec->gpe, ACPI_GPE_DISABLE); | ||
321 | } | 318 | } |
322 | 319 | ||
323 | status = acpi_ec_transaction_unlocked(ec, t); | 320 | status = acpi_ec_transaction_unlocked(ec, t); |
@@ -326,12 +323,8 @@ static int acpi_ec_transaction(struct acpi_ec *ec, struct transaction *t) | |||
326 | ec_check_sci_sync(ec, acpi_ec_read_status(ec)); | 323 | ec_check_sci_sync(ec, acpi_ec_read_status(ec)); |
327 | if (test_bit(EC_FLAGS_GPE_STORM, &ec->flags)) { | 324 | if (test_bit(EC_FLAGS_GPE_STORM, &ec->flags)) { |
328 | msleep(1); | 325 | msleep(1); |
329 | /* | 326 | /* It is safe to enable the GPE outside of the transaction. */ |
330 | * It is safe to enable the GPE outside of the transaction. Use | 327 | acpi_enable_gpe(NULL, ec->gpe); |
331 | * acpi_set_gpe() for that, since we used it to disable the GPE | ||
332 | * above. | ||
333 | */ | ||
334 | acpi_set_gpe(NULL, ec->gpe, ACPI_GPE_ENABLE); | ||
335 | } else if (t->irq_count > ACPI_EC_STORM_THRESHOLD) { | 328 | } else if (t->irq_count > ACPI_EC_STORM_THRESHOLD) { |
336 | pr_info(PREFIX "GPE storm detected, " | 329 | pr_info(PREFIX "GPE storm detected, " |
337 | "transactions will use polling mode\n"); | 330 | "transactions will use polling mode\n"); |