aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/ec.c
diff options
context:
space:
mode:
authorZhao Yakui <yakui.zhao@intel.com>2008-10-17 02:02:44 -0400
committerLen Brown <len.brown@intel.com>2008-10-17 02:02:44 -0400
commit20edd74fcf9ad02c19efba0c13670a7b6b045099 (patch)
treeb9576014744865556b4e4a6f796a8782467270ba /drivers/acpi/ec.c
parent3fa8749e584b55f1180411ab1b51117190bac1e5 (diff)
ACPI: Ignore AE_NOT_FOUND error of EC _REG method and continue to initialize EC
On some broken BIOS the ACPI object in EC _REG method can't be found in ACPI namespace, which causes that the status code of AE_NOT_FOUND is returned by the EC _REG object. In such case the EC device can't be initialized correctly, which causes that battery/AC adapter can't work normally. As the EC address space handler is not removed and the memory pointed by its input argument is already free, sometimes the kernel will also be panic when EC internal register is still accessed. But the windows can work well on such broken BIOS. Maybe it will be reasonable that OS ignores the AE_NOT_FOUND error returned by the EC _REG object and continues to initialize EC device on some broken BIOS. For example: the ACPI object in EC _REG method can't be found and status error code is AE_NOT_FOUND. http://bugzilla.kernel.org/show_bug.cgi?id=8953 http://bugzilla.kernel.org/show_bug.cgi?id=10237 lenb: we may find a more general solution to this in the future. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'drivers/acpi/ec.c')
-rw-r--r--drivers/acpi/ec.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c
index 13593f9f2197..4c004286b3d9 100644
--- a/drivers/acpi/ec.c
+++ b/drivers/acpi/ec.c
@@ -862,8 +862,19 @@ static int ec_install_handlers(struct acpi_ec *ec)
862 &acpi_ec_space_handler, 862 &acpi_ec_space_handler,
863 NULL, ec); 863 NULL, ec);
864 if (ACPI_FAILURE(status)) { 864 if (ACPI_FAILURE(status)) {
865 acpi_remove_gpe_handler(NULL, ec->gpe, &acpi_ec_gpe_handler); 865 if (status == AE_NOT_FOUND) {
866 return -ENODEV; 866 /*
867 * Maybe OS fails in evaluating the _REG object.
868 * The AE_NOT_FOUND error will be ignored and OS
869 * continue to initialize EC.
870 */
871 printk(KERN_ERR "Fail in evaluating the _REG object"
872 " of EC device. Broken bios is suspected.\n");
873 } else {
874 acpi_remove_gpe_handler(NULL, ec->gpe,
875 &acpi_ec_gpe_handler);
876 return -ENODEV;
877 }
867 } 878 }
868 879
869 ec->handlers_installed = 1; 880 ec->handlers_installed = 1;