diff options
author | Alexey Starikovskiy <astarikovskiy@suse.de> | 2007-10-22 06:19:03 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2007-10-25 16:31:31 -0400 |
commit | 95b937e3f52a7f5546c4bffe29886fe400bad1d1 (patch) | |
tree | 80865061245cb9151f62d82791c89d3020a37f1b /drivers/acpi/ec.c | |
parent | 66c5f4e7367b0085652931b2f3366de29e7ff5ec (diff) |
ACPI: EC: Output changes to operational mode
Insert printk() for every change in operational mode.
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/ec.c')
-rw-r--r-- | 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 202db575d5db..bf60b24ebf54 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) | |||
173 | return 0; | 173 | return 0; |
174 | clear_bit(EC_FLAGS_WAIT_GPE, &ec->flags); | 174 | clear_bit(EC_FLAGS_WAIT_GPE, &ec->flags); |
175 | if (acpi_ec_check_status(ec, event)) { | 175 | if (acpi_ec_check_status(ec, event)) { |
176 | if (event == ACPI_EC_EVENT_OBF_1) | 176 | if (event == ACPI_EC_EVENT_OBF_1) { |
177 | /* miss OBF = 1 GPE, don't expect it anymore */ | 177 | /* miss OBF = 1 GPE, don't expect it anymore */ |
178 | printk(KERN_INFO PREFIX "missing OBF_1 confirmation," | ||
179 | "switching to degraded mode.\n"); | ||
178 | set_bit(EC_FLAGS_ONLY_IBF_GPE, &ec->flags); | 180 | set_bit(EC_FLAGS_ONLY_IBF_GPE, &ec->flags); |
179 | else | 181 | } else { |
180 | /* missing GPEs, switch back to poll mode */ | 182 | /* missing GPEs, switch back to poll mode */ |
183 | printk(KERN_INFO PREFIX "missing IBF_1 confirmations," | ||
184 | "switch off interrupt mode.\n"); | ||
181 | clear_bit(EC_FLAGS_GPE_MODE, &ec->flags); | 185 | clear_bit(EC_FLAGS_GPE_MODE, &ec->flags); |
186 | } | ||
182 | return 0; | 187 | return 0; |
183 | } | 188 | } |
184 | } else { | 189 | } else { |
@@ -491,8 +496,12 @@ static u32 acpi_ec_gpe_handler(void *data) | |||
491 | if (!test_and_set_bit(EC_FLAGS_QUERY_PENDING, &ec->flags)) | 496 | if (!test_and_set_bit(EC_FLAGS_QUERY_PENDING, &ec->flags)) |
492 | status = acpi_os_execute(OSL_EC_BURST_HANDLER, | 497 | status = acpi_os_execute(OSL_EC_BURST_HANDLER, |
493 | acpi_ec_gpe_query, ec); | 498 | acpi_ec_gpe_query, ec); |
494 | } else if (unlikely(!test_bit(EC_FLAGS_GPE_MODE, &ec->flags))) | 499 | } else if (unlikely(!test_bit(EC_FLAGS_GPE_MODE, &ec->flags))) { |
500 | /* this is non-query, must be confirmation */ | ||
501 | printk(KERN_INFO PREFIX "non-query interrupt received," | ||
502 | " switching to interrupt mode\n"); | ||
495 | set_bit(EC_FLAGS_GPE_MODE, &ec->flags); | 503 | set_bit(EC_FLAGS_GPE_MODE, &ec->flags); |
504 | } | ||
496 | 505 | ||
497 | return ACPI_SUCCESS(status) ? | 506 | return ACPI_SUCCESS(status) ? |
498 | ACPI_INTERRUPT_HANDLED : ACPI_INTERRUPT_NOT_HANDLED; | 507 | ACPI_INTERRUPT_HANDLED : ACPI_INTERRUPT_NOT_HANDLED; |
@@ -740,6 +749,8 @@ static int acpi_ec_add(struct acpi_device *device) | |||
740 | acpi_ec_add_fs(device); | 749 | acpi_ec_add_fs(device); |
741 | printk(KERN_INFO PREFIX "GPE = 0x%lx, I/O: command/status = 0x%lx, data = 0x%lx\n", | 750 | printk(KERN_INFO PREFIX "GPE = 0x%lx, I/O: command/status = 0x%lx, data = 0x%lx\n", |
742 | ec->gpe, ec->command_addr, ec->data_addr); | 751 | ec->gpe, ec->command_addr, ec->data_addr); |
752 | printk(KERN_INFO PREFIX "driver started in %s mode\n", | ||
753 | (test_bit(EC_FLAGS_GPE_MODE, &ec->flags))?"interrupt":"poll"); | ||
743 | return 0; | 754 | return 0; |
744 | } | 755 | } |
745 | 756 | ||