summaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpica/nsrepair2.c
diff options
context:
space:
mode:
authorFenghua Yu <fenghua.yu@intel.com>2011-07-04 08:36:16 +0000
committerLen Brown <len.brown@intel.com>2011-07-13 23:51:49 -0400
commit8f9c91273e36e5762c617c23e4fd48d5172e0dac (patch)
tree98773e4e0b5f5d4da1648ba841ec3945fdfda728 /drivers/acpi/acpica/nsrepair2.c
parentd57b23ad0ca7a46931e4d98eb6b4b73b112f0969 (diff)
downloadlinux-8f9c91273e36e5762c617c23e4fd48d5172e0dac.tar.gz
linux-8f9c91273e36e5762c617c23e4fd48d5172e0dac.tar.bz2
linux-8f9c91273e36e5762c617c23e4fd48d5172e0dac.zip
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/nsrepair2.c')
-rw-r--r--drivers/acpi/acpica/nsrepair2.c15
1 files changed, 15 insertions, 0 deletions
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,
{
union acpi_operand_object *return_object = *return_object_ptr;
acpi_status status;
+ struct acpi_namespace_node *node;
+
+ /*
+ * 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.
+ * (May, 2011)
+ */
+ status =
+ acpi_ns_get_node(data->node, "^_PSS", ACPI_NS_NO_UPSEARCH, &node);
+ if (ACPI_SUCCESS(status)) {
+ return (AE_OK);
+ }
status = acpi_ns_check_sorted_list(data, return_object, 5, 1,
ACPI_SORT_DESCENDING,