Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=95b937e3f52a7f5546c4bffe29886fe400bad1d1
Commit:     95b937e3f52a7f5546c4bffe29886fe400bad1d1
Parent:     66c5f4e7367b0085652931b2f3366de29e7ff5ec
Author:     Alexey Starikovskiy <[EMAIL PROTECTED]>
AuthorDate: Mon Oct 22 14:19:03 2007 +0400
Committer:  Len Brown <[EMAIL PROTECTED]>
CommitDate: Thu Oct 25 16:31:31 2007 -0400

    ACPI: EC: Output changes to operational mode
    
    Insert printk() for every change in operational mode.
    
    Signed-off-by: Alexey Starikovskiy <[EMAIL PROTECTED]>
    Acked-by: Rafael J. Wysocki <[EMAIL PROTECTED]>
    Signed-off-by: Len Brown <[EMAIL PROTECTED]>
---
 drivers/acpi/ec.c |   17 ++++++++++++++---
 1 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 202db57..bf60b24 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -173,12 +173,17 @@ static int acpi_ec_wait(struct acpi_ec *ec, enum ec_event 
event, int force_poll)
                        return 0;
                clear_bit(EC_FLAGS_WAIT_GPE, &ec->flags);
                if (acpi_ec_check_status(ec, event)) {
-                       if (event == ACPI_EC_EVENT_OBF_1)
+                       if (event == ACPI_EC_EVENT_OBF_1) {
                                /* miss OBF = 1 GPE, don't expect it anymore */
+                               printk(KERN_INFO PREFIX "missing OBF_1 
confirmation,"
+                                       "switching to degraded mode.\n");
                                set_bit(EC_FLAGS_ONLY_IBF_GPE, &ec->flags);
-                       else
+                       } else {
                                /* missing GPEs, switch back to poll mode */
+                               printk(KERN_INFO PREFIX "missing IBF_1 
confirmations,"
+                                       "switch off interrupt mode.\n");
                                clear_bit(EC_FLAGS_GPE_MODE, &ec->flags);
+                       }
                        return 0;
                }
        } else {
@@ -491,8 +496,12 @@ static u32 acpi_ec_gpe_handler(void *data)
                if (!test_and_set_bit(EC_FLAGS_QUERY_PENDING, &ec->flags))
                        status = acpi_os_execute(OSL_EC_BURST_HANDLER,
                                acpi_ec_gpe_query, ec);
-       } else if (unlikely(!test_bit(EC_FLAGS_GPE_MODE, &ec->flags)))
+       } else if (unlikely(!test_bit(EC_FLAGS_GPE_MODE, &ec->flags))) {
+               /* this is non-query, must be confirmation */
+               printk(KERN_INFO PREFIX "non-query interrupt received,"
+                       " switching to interrupt mode\n");
                set_bit(EC_FLAGS_GPE_MODE, &ec->flags);
+       }
 
        return ACPI_SUCCESS(status) ?
            ACPI_INTERRUPT_HANDLED : ACPI_INTERRUPT_NOT_HANDLED;
@@ -740,6 +749,8 @@ static int acpi_ec_add(struct acpi_device *device)
        acpi_ec_add_fs(device);
        printk(KERN_INFO PREFIX "GPE = 0x%lx, I/O: command/status = 0x%lx, data 
= 0x%lx\n",
                          ec->gpe, ec->command_addr, ec->data_addr);
+       printk(KERN_INFO PREFIX "driver started in %s mode\n",
+               (test_bit(EC_FLAGS_GPE_MODE, &ec->flags))?"interrupt":"poll");
        return 0;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to