diff options
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/ec.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index e7e197e3a4ff..7222a18a0319 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c | |||
@@ -129,7 +129,6 @@ static struct acpi_ec { | |||
129 | struct mutex lock; | 129 | struct mutex lock; |
130 | wait_queue_head_t wait; | 130 | wait_queue_head_t wait; |
131 | struct list_head list; | 131 | struct list_head list; |
132 | atomic_t irq_count; | ||
133 | u8 handlers_installed; | 132 | u8 handlers_installed; |
134 | } *boot_ec, *first_ec; | 133 | } *boot_ec, *first_ec; |
135 | 134 | ||
@@ -182,8 +181,6 @@ static int acpi_ec_wait(struct acpi_ec *ec, enum ec_event event, int force_poll) | |||
182 | { | 181 | { |
183 | int ret = 0; | 182 | int ret = 0; |
184 | 183 | ||
185 | atomic_set(&ec->irq_count, 0); | ||
186 | |||
187 | if (unlikely(event == ACPI_EC_EVENT_OBF_1 && | 184 | if (unlikely(event == ACPI_EC_EVENT_OBF_1 && |
188 | test_bit(EC_FLAGS_NO_OBF1_GPE, &ec->flags))) | 185 | test_bit(EC_FLAGS_NO_OBF1_GPE, &ec->flags))) |
189 | force_poll = 1; | 186 | force_poll = 1; |
@@ -230,7 +227,6 @@ static int acpi_ec_wait(struct acpi_ec *ec, enum ec_event event, int force_poll) | |||
230 | while (time_before(jiffies, delay)) { | 227 | while (time_before(jiffies, delay)) { |
231 | if (acpi_ec_check_status(ec, event)) | 228 | if (acpi_ec_check_status(ec, event)) |
232 | goto end; | 229 | goto end; |
233 | msleep(5); | ||
234 | } | 230 | } |
235 | } | 231 | } |
236 | pr_err(PREFIX "acpi_ec_wait timeout," | 232 | pr_err(PREFIX "acpi_ec_wait timeout," |
@@ -533,13 +529,6 @@ static u32 acpi_ec_gpe_handler(void *data) | |||
533 | struct acpi_ec *ec = data; | 529 | struct acpi_ec *ec = data; |
534 | 530 | ||
535 | pr_debug(PREFIX "~~~> interrupt\n"); | 531 | pr_debug(PREFIX "~~~> interrupt\n"); |
536 | atomic_inc(&ec->irq_count); | ||
537 | if (atomic_read(&ec->irq_count) > 5) { | ||
538 | pr_err(PREFIX "GPE storm detected, disabling EC GPE\n"); | ||
539 | acpi_disable_gpe(NULL, ec->gpe, ACPI_ISR); | ||
540 | clear_bit(EC_FLAGS_GPE_MODE, &ec->flags); | ||
541 | return ACPI_INTERRUPT_HANDLED; | ||
542 | } | ||
543 | clear_bit(EC_FLAGS_WAIT_GPE, &ec->flags); | 532 | clear_bit(EC_FLAGS_WAIT_GPE, &ec->flags); |
544 | if (test_bit(EC_FLAGS_GPE_MODE, &ec->flags)) | 533 | if (test_bit(EC_FLAGS_GPE_MODE, &ec->flags)) |
545 | wake_up(&ec->wait); | 534 | wake_up(&ec->wait); |