* 2.6.27-rc5 acpi: EC Storm error message on bootup @ 2008-09-02 21:27 jmerkey 2008-09-09 5:15 ` Alexey Starikovskiy 0 siblings, 1 reply; 7+ messages in thread From: jmerkey @ 2008-09-02 21:27 UTC (permalink / raw) To: linux-kernel See an ACPI: EC storm detected message, disabling EC On both a compaq presario 2200 laptop and an Acer 9410 laptop. Looks like a brain dead error message not actually reporting any genuine errors. Jeff ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 2.6.27-rc5 acpi: EC Storm error message on bootup 2008-09-02 21:27 2.6.27-rc5 acpi: EC Storm error message on bootup jmerkey @ 2008-09-09 5:15 ` Alexey Starikovskiy 2008-09-09 14:51 ` jmerkey 0 siblings, 1 reply; 7+ messages in thread From: Alexey Starikovskiy @ 2008-09-09 5:15 UTC (permalink / raw) To: jmerkey; +Cc: linux-kernel It does not disable EC, it disables EC GPE (interrupt from EC). Could you please test patch from comment #81 in bug #9998? http://bugzilla.kernel.org/attachment.cgi?id=17695&action=view Thanks, Alex. jmerkey@wolfmountaingroup.com wrote: > See an ACPI: EC storm detected message, disabling EC > > On both a compaq presario 2200 laptop and an Acer 9410 laptop. Looks like > a brain dead error message not actually reporting any genuine errors. > > Jeff > > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 2.6.27-rc5 acpi: EC Storm error message on bootup 2008-09-09 5:15 ` Alexey Starikovskiy @ 2008-09-09 14:51 ` jmerkey 2008-09-09 14:59 ` jmerkey 0 siblings, 1 reply; 7+ messages in thread From: jmerkey @ 2008-09-09 14:51 UTC (permalink / raw) To: Alexey Starikovskiy; +Cc: jmerkey, linux-kernel > It does not disable EC, it disables EC GPE (interrupt from EC). > Could you please test patch from comment #81 in bug #9998? > http://bugzilla.kernel.org/attachment.cgi?id=17695&action=view > > Thanks, > Alex. Patch does not apply correctly to 2.6.27-rc5 -- do you have a patch a little closer to 2.6.27-rc6? Here is what ended up in the .rej file after I applied it: *************** *** 140,208 **** outb(data, ec->data_addr); } - static inline int acpi_ec_check_status(struct acpi_ec *ec, enum ec_event event) { - if (test_bit(EC_FLAGS_WAIT_GPE, &ec->flags)) - return 0; - if (event == ACPI_EC_EVENT_OBF_1) { - if (acpi_ec_read_status(ec) & ACPI_EC_FLAG_OBF) - return 1; - } else if (event == ACPI_EC_EVENT_IBF_0) { - if (!(acpi_ec_read_status(ec) & ACPI_EC_FLAG_IBF)) - return 1; - } - return 0; } - static void ec_schedule_ec_poll(struct acpi_ec *ec) { - if (test_bit(EC_FLAGS_RESCHEDULE_POLL, &ec->flags)) - schedule_delayed_work(&ec->work, - msecs_to_jiffies(ACPI_EC_DELAY)); } - static void ec_switch_to_poll_mode(struct acpi_ec *ec) { set_bit(EC_FLAGS_NO_GPE, &ec->flags); clear_bit(EC_FLAGS_GPE_MODE, &ec->flags); - acpi_disable_gpe(NULL, ec->gpe, ACPI_NOT_ISR); - set_bit(EC_FLAGS_RESCHEDULE_POLL, &ec->flags); } - static int acpi_ec_wait(struct acpi_ec *ec, enum ec_event event, int force_poll) { - atomic_set(&ec->irq_count, 0); - if (likely(test_bit(EC_FLAGS_GPE_MODE, &ec->flags)) && - likely(!force_poll)) { - if (wait_event_timeout(ec->wait, acpi_ec_check_status(ec, event), - msecs_to_jiffies(ACPI_EC_DELAY))) - return 0; - clear_bit(EC_FLAGS_WAIT_GPE, &ec->flags); - if (acpi_ec_check_status(ec, event)) { - /* missing GPEs, switch back to poll mode */ - if (printk_ratelimit()) - pr_info(PREFIX "missing confirmations, " - "switch off interrupt mode.\n"); - ec_switch_to_poll_mode(ec); - ec_schedule_ec_poll(ec); - return 0; - } - } else { - unsigned long delay = jiffies + msecs_to_jiffies(ACPI_EC_DELAY); - clear_bit(EC_FLAGS_WAIT_GPE, &ec->flags); - while (time_before(jiffies, delay)) { - if (acpi_ec_check_status(ec, event)) - return 0; - msleep(1); - } - if (acpi_ec_check_status(ec,event)) - return 0; } - pr_err(PREFIX "acpi_ec_wait timeout, status = 0x%2.2x, event = %s\n", - acpi_ec_read_status(ec), - (event == ACPI_EC_EVENT_OBF_1) ? "\"b0=1\"" : "\"b1=0\""); - return -ETIME; } static int acpi_ec_transaction_unlocked(struct acpi_ec *ec, u8 command, --- 159,219 ---- outb(data, ec->data_addr); } + static int ec_transaction_done(struct acpi_ec *ec) { + if (!ec_read_command(ec)) + return 1; + if (!ec->t.wlen && !ec->t.rlen) + return 1; return 0; } + static void gpe_transaction(struct acpi_ec *ec, u8 status) { + if (!ec_read_command(ec)) + return; + if (ec->t.wlen > 0) { + if ((status & ACPI_EC_FLAG_IBF) == 0) { + acpi_ec_write_data(ec, *(ec->t.wdata++)); + --ec->t.wlen; + } else + /* false interrupt, state didn't change */ + atomic_inc(&ec->irq_count); + + } else if (ec->t.rlen > 0) { + if ((status & ACPI_EC_FLAG_OBF) == 1) { + *(ec->t.rdata++) = acpi_ec_read_data(ec); + --ec->t.rlen; + } else + /* false interrupt, state didn't change */ + atomic_inc(&ec->irq_count); + } } + static int acpi_ec_wait(struct acpi_ec *ec) { + if (wait_event_timeout(ec->wait, ec_transaction_done(ec), + msecs_to_jiffies(ACPI_EC_DELAY))) + return 0; + /* missing GPEs, switch back to poll mode */ + if (printk_ratelimit()) + pr_info(PREFIX "missing confirmations, " + "switch off interrupt mode.\n"); set_bit(EC_FLAGS_NO_GPE, &ec->flags); clear_bit(EC_FLAGS_GPE_MODE, &ec->flags); + return 1; } + static void acpi_ec_gpe_query(void *ec_cxt); + + static int ec_check_sci(struct acpi_ec *ec, u8 state) { + if (state & ACPI_EC_FLAG_SCI) { + if (!test_and_set_bit(EC_FLAGS_QUERY_PENDING, &ec->flags)) + return acpi_os_execute(OSL_EC_BURST_HANDLER, + acpi_ec_gpe_query, ec); } + return 0; } static int acpi_ec_transaction_unlocked(struct acpi_ec *ec, u8 command, Jeff ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 2.6.27-rc5 acpi: EC Storm error message on bootup 2008-09-09 14:51 ` jmerkey @ 2008-09-09 14:59 ` jmerkey 2008-09-09 17:35 ` Alexey Starikovskiy 0 siblings, 1 reply; 7+ messages in thread From: jmerkey @ 2008-09-09 14:59 UTC (permalink / raw) To: jmerkey; +Cc: Alexey Starikovskiy, jmerkey, linux-kernel >> It does not disable EC, it disables EC GPE (interrupt from EC). >> Could you please test patch from comment #81 in bug #9998? >> http://bugzilla.kernel.org/attachment.cgi?id=17695&action=view >> >> Thanks, >> Alex. > > Patch does not apply correctly to 2.6.27-rc5 -- do you have a patch a > little closer to 2.6.27-rc6? > > Here is what ended up in the .rej file after I applied it: > > Jeff > > Oh shit, my mistake. I applied it to a 2.2.26.4 tree. please disregard. I will test it shortly. Jeff ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 2.6.27-rc5 acpi: EC Storm error message on bootup 2008-09-09 14:59 ` jmerkey @ 2008-09-09 17:35 ` Alexey Starikovskiy 2008-09-09 17:53 ` jmerkey 2008-09-09 19:30 ` jmerkey 0 siblings, 2 replies; 7+ messages in thread From: Alexey Starikovskiy @ 2008-09-09 17:35 UTC (permalink / raw) To: jmerkey; +Cc: linux-kernel [-- Attachment #1: Type: text/plain, Size: 264 bytes --] jmerkey@wolfmountaingroup.com wrote: > Oh shit, my mistake. I applied it to a 2.2.26.4 tree. please disregard. > I will test it shortly. Thanks! I've found more slippery place, could you please add attached patch if the first one doesn't work? Regards, Alex. [-- Attachment #2: 1.diff --] [-- Type: text/x-diff, Size: 427 bytes --] diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 97168d4..961b327 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -538,7 +538,7 @@ static u32 acpi_ec_gpe_handler(void *data) state = acpi_ec_read_status(ec); gpe_transaction(ec, state); - if ((status & ACPI_EC_FLAG_IBF) == 0) + if (ec_transaction_done(ec) && (status & ACPI_EC_FLAG_IBF) == 0) wake_up(&ec->wait); status = ec_check_sci(ec, state); ^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: 2.6.27-rc5 acpi: EC Storm error message on bootup 2008-09-09 17:35 ` Alexey Starikovskiy @ 2008-09-09 17:53 ` jmerkey 2008-09-09 19:30 ` jmerkey 1 sibling, 0 replies; 7+ messages in thread From: jmerkey @ 2008-09-09 17:53 UTC (permalink / raw) To: Alexey Starikovskiy; +Cc: jmerkey, linux-kernel > > jmerkey@wolfmountaingroup.com wrote: >> Oh shit, my mistake. I applied it to a 2.2.26.4 tree. please >> disregard. >> I will test it shortly. > Thanks! > I've found more slippery place, could you please add attached patch if the > first one doesn't work? > > Regards, > Alex. > The first patch corrected the problem. I have regressed the patch on 2.6.27-rc5. The message is now gone. I will test the new patch you just sent later this afternoon (after lunch). :-) Jeff ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: 2.6.27-rc5 acpi: EC Storm error message on bootup 2008-09-09 17:35 ` Alexey Starikovskiy 2008-09-09 17:53 ` jmerkey @ 2008-09-09 19:30 ` jmerkey 1 sibling, 0 replies; 7+ messages in thread From: jmerkey @ 2008-09-09 19:30 UTC (permalink / raw) To: Alexey Starikovskiy; +Cc: jmerkey, linux-kernel > > jmerkey@wolfmountaingroup.com wrote: >> Oh shit, my mistake. I applied it to a 2.2.26.4 tree. please >> disregard. >> I will test it shortly. > Thanks! > I've found more slippery place, could you please add attached patch if the > first one doesn't work? > > Regards, > Alex. > Second patch tested - works great. Jeff ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-09-09 20:01 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-09-02 21:27 2.6.27-rc5 acpi: EC Storm error message on bootup jmerkey 2008-09-09 5:15 ` Alexey Starikovskiy 2008-09-09 14:51 ` jmerkey 2008-09-09 14:59 ` jmerkey 2008-09-09 17:35 ` Alexey Starikovskiy 2008-09-09 17:53 ` jmerkey 2008-09-09 19:30 ` jmerkey
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox