diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-15 12:26:37 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-15 12:26:37 -0400 |
commit | ffaa5b984a9322bbd5d9a7f0814ca2ce70feebe5 (patch) | |
tree | 171ed020ae3f9034150e832c613b650e803b62fb /drivers/acpi/ec.c | |
parent | 024b246ed24492d6c2ee14c34d742b137fce1b94 (diff) | |
parent | 0f2456236459f3ddef48a8a75d10b2d6ecf1a93d (diff) |
Merge branch 'release-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-acpi-2.6
* 'release-2.6.27' of git://git.kernel.org/pub/scm/linux/kernel/git/ak/linux-acpi-2.6:
ACPI: Fix thermal shutdowns
ACPI: bounds check IRQ to prevent memory corruption
ACPI: Avoid bogus EC timeout when EC is in Polling mode
ACPI : Add the EC dmi table to fix the incorrect ECDT table
ACPI: Properly clear flags on false-positives and send uevent on sudden unplug
acpi: trivial cleanups
acer-wmi: Fix wireless and bluetooth on early AMW0 v2 laptops
ACPI: WMI: Set instance for query block calls
ACPICA: Additional error checking for pathname utilities
ACPICA: Fix possible memory leak in Unload() operator
ACPICA: Fix memory leak when deleting thermal/processor objects
Diffstat (limited to 'drivers/acpi/ec.c')
-rw-r--r-- | drivers/acpi/ec.c | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index 5622aee996b2..13593f9f2197 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c | |||
@@ -110,6 +110,31 @@ static struct acpi_ec { | |||
110 | u8 handlers_installed; | 110 | u8 handlers_installed; |
111 | } *boot_ec, *first_ec; | 111 | } *boot_ec, *first_ec; |
112 | 112 | ||
113 | /* | ||
114 | * Some Asus system have exchanged ECDT data/command IO addresses. | ||
115 | */ | ||
116 | static int print_ecdt_error(const struct dmi_system_id *id) | ||
117 | { | ||
118 | printk(KERN_NOTICE PREFIX "%s detected - " | ||
119 | "ECDT has exchanged control/data I/O address\n", | ||
120 | id->ident); | ||
121 | return 0; | ||
122 | } | ||
123 | |||
124 | static struct dmi_system_id __cpuinitdata ec_dmi_table[] = { | ||
125 | { | ||
126 | print_ecdt_error, "Asus L4R", { | ||
127 | DMI_MATCH(DMI_BIOS_VERSION, "1008.006"), | ||
128 | DMI_MATCH(DMI_PRODUCT_NAME, "L4R"), | ||
129 | DMI_MATCH(DMI_BOARD_NAME, "L4R") }, NULL}, | ||
130 | { | ||
131 | print_ecdt_error, "Asus M6R", { | ||
132 | DMI_MATCH(DMI_BIOS_VERSION, "0207"), | ||
133 | DMI_MATCH(DMI_PRODUCT_NAME, "M6R"), | ||
134 | DMI_MATCH(DMI_BOARD_NAME, "M6R") }, NULL}, | ||
135 | {}, | ||
136 | }; | ||
137 | |||
113 | /* -------------------------------------------------------------------------- | 138 | /* -------------------------------------------------------------------------- |
114 | Transaction Management | 139 | Transaction Management |
115 | -------------------------------------------------------------------------- */ | 140 | -------------------------------------------------------------------------- */ |
@@ -196,6 +221,8 @@ static int acpi_ec_wait(struct acpi_ec *ec, enum ec_event event, int force_poll) | |||
196 | return 0; | 221 | return 0; |
197 | msleep(1); | 222 | msleep(1); |
198 | } | 223 | } |
224 | if (acpi_ec_check_status(ec,event)) | ||
225 | return 0; | ||
199 | } | 226 | } |
200 | pr_err(PREFIX "acpi_ec_wait timeout, status = 0x%2.2x, event = %s\n", | 227 | pr_err(PREFIX "acpi_ec_wait timeout, status = 0x%2.2x, event = %s\n", |
201 | acpi_ec_read_status(ec), | 228 | acpi_ec_read_status(ec), |
@@ -911,6 +938,15 @@ int __init acpi_ec_ecdt_probe(void) | |||
911 | pr_info(PREFIX "EC description table is found, configuring boot EC\n"); | 938 | pr_info(PREFIX "EC description table is found, configuring boot EC\n"); |
912 | boot_ec->command_addr = ecdt_ptr->control.address; | 939 | boot_ec->command_addr = ecdt_ptr->control.address; |
913 | boot_ec->data_addr = ecdt_ptr->data.address; | 940 | boot_ec->data_addr = ecdt_ptr->data.address; |
941 | if (dmi_check_system(ec_dmi_table)) { | ||
942 | /* | ||
943 | * If the board falls into ec_dmi_table, it means | ||
944 | * that ECDT table gives the incorrect command/status | ||
945 | * & data I/O address. Just fix it. | ||
946 | */ | ||
947 | boot_ec->data_addr = ecdt_ptr->control.address; | ||
948 | boot_ec->command_addr = ecdt_ptr->data.address; | ||
949 | } | ||
914 | boot_ec->gpe = ecdt_ptr->gpe; | 950 | boot_ec->gpe = ecdt_ptr->gpe; |
915 | boot_ec->handle = ACPI_ROOT_OBJECT; | 951 | boot_ec->handle = ACPI_ROOT_OBJECT; |
916 | acpi_get_handle(ACPI_ROOT_OBJECT, ecdt_ptr->id, &boot_ec->handle); | 952 | acpi_get_handle(ACPI_ROOT_OBJECT, ecdt_ptr->id, &boot_ec->handle); |