diff options
author | Fenghua Yu <fenghua.yu@intel.com> | 2011-07-04 04:36:16 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2011-07-13 23:51:49 -0400 |
commit | 8f9c91273e36e5762c617c23e4fd48d5172e0dac (patch) | |
tree | 98773e4e0b5f5d4da1648ba841ec3945fdfda728 /drivers/acpi/acpica | |
parent | d57b23ad0ca7a46931e4d98eb6b4b73b112f0969 (diff) |
ACPICA: Do not repair _TSS return package if _PSS is present
We can only sort the _TSS return package if there is no _PSS
in the same scope. This is because if _PSS is present, the ACPI
specification dictates that the _TSS Power Dissipation field is
to be ignored, and therefore some BIOSs leave garbage values in
the _TSS Power field(s). In this case, it is best to just return
the _TSS package as-is.
Reported-by: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Fenghua Yu <fenghua.yu@intel.com>
Signed-off-by: Bob Moore <robert.moore@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/acpica')
-rw-r--r-- | drivers/acpi/acpica/aclocal.h | 1 | ||||
-rw-r--r-- | drivers/acpi/acpica/nspredef.c | 1 | ||||
-rw-r--r-- | drivers/acpi/acpica/nsrepair2.c | 15 |
3 files changed, 17 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/aclocal.h b/drivers/acpi/acpica/aclocal.h index c7f743ca395b..5552125d8340 100644 --- a/drivers/acpi/acpica/aclocal.h +++ b/drivers/acpi/acpica/aclocal.h | |||
@@ -357,6 +357,7 @@ struct acpi_predefined_data { | |||
357 | char *pathname; | 357 | char *pathname; |
358 | const union acpi_predefined_info *predefined; | 358 | const union acpi_predefined_info *predefined; |
359 | union acpi_operand_object *parent_package; | 359 | union acpi_operand_object *parent_package; |
360 | struct acpi_namespace_node *node; | ||
360 | u32 flags; | 361 | u32 flags; |
361 | u8 node_flags; | 362 | u8 node_flags; |
362 | }; | 363 | }; |
diff --git a/drivers/acpi/acpica/nspredef.c b/drivers/acpi/acpica/nspredef.c index 607a9a035262..c845c8089f39 100644 --- a/drivers/acpi/acpica/nspredef.c +++ b/drivers/acpi/acpica/nspredef.c | |||
@@ -218,6 +218,7 @@ acpi_ns_check_predefined_names(struct acpi_namespace_node *node, | |||
218 | goto cleanup; | 218 | goto cleanup; |
219 | } | 219 | } |
220 | data->predefined = predefined; | 220 | data->predefined = predefined; |
221 | data->node = node; | ||
221 | data->node_flags = node->flags; | 222 | data->node_flags = node->flags; |
222 | data->pathname = pathname; | 223 | data->pathname = pathname; |
223 | 224 | ||
diff --git a/drivers/acpi/acpica/nsrepair2.c b/drivers/acpi/acpica/nsrepair2.c index 973883babee1..024c4f263f87 100644 --- a/drivers/acpi/acpica/nsrepair2.c +++ b/drivers/acpi/acpica/nsrepair2.c | |||
@@ -503,6 +503,21 @@ acpi_ns_repair_TSS(struct acpi_predefined_data *data, | |||
503 | { | 503 | { |
504 | union acpi_operand_object *return_object = *return_object_ptr; | 504 | union acpi_operand_object *return_object = *return_object_ptr; |
505 | acpi_status status; | 505 | acpi_status status; |
506 | struct acpi_namespace_node *node; | ||
507 | |||
508 | /* | ||
509 | * We can only sort the _TSS return package if there is no _PSS in the | ||
510 | * same scope. This is because if _PSS is present, the ACPI specification | ||
511 | * dictates that the _TSS Power Dissipation field is to be ignored, and | ||
512 | * therefore some BIOSs leave garbage values in the _TSS Power field(s). | ||
513 | * In this case, it is best to just return the _TSS package as-is. | ||
514 | * (May, 2011) | ||
515 | */ | ||
516 | status = | ||
517 | acpi_ns_get_node(data->node, "^_PSS", ACPI_NS_NO_UPSEARCH, &node); | ||
518 | if (ACPI_SUCCESS(status)) { | ||
519 | return (AE_OK); | ||
520 | } | ||
506 | 521 | ||
507 | status = acpi_ns_check_sorted_list(data, return_object, 5, 1, | 522 | status = acpi_ns_check_sorted_list(data, return_object, 5, 1, |
508 | ACPI_SORT_DESCENDING, | 523 | ACPI_SORT_DESCENDING, |