Commit 8f9c9127 authored by Fenghua Yu's avatar Fenghua Yu Committed by Len Brown

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: default avatarFenghua Yu <fenghua.yu@intel.com>
Signed-off-by: default avatarFenghua Yu <fenghua.yu@intel.com>
Signed-off-by: default avatarBob Moore <robert.moore@intel.com>
Signed-off-by: default avatarLin Ming <ming.m.lin@intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent d57b23ad
...@@ -357,6 +357,7 @@ struct acpi_predefined_data { ...@@ -357,6 +357,7 @@ struct acpi_predefined_data {
char *pathname; char *pathname;
const union acpi_predefined_info *predefined; const union acpi_predefined_info *predefined;
union acpi_operand_object *parent_package; union acpi_operand_object *parent_package;
struct acpi_namespace_node *node;
u32 flags; u32 flags;
u8 node_flags; u8 node_flags;
}; };
......
...@@ -218,6 +218,7 @@ acpi_ns_check_predefined_names(struct acpi_namespace_node *node, ...@@ -218,6 +218,7 @@ acpi_ns_check_predefined_names(struct acpi_namespace_node *node,
goto cleanup; goto cleanup;
} }
data->predefined = predefined; data->predefined = predefined;
data->node = node;
data->node_flags = node->flags; data->node_flags = node->flags;
data->pathname = pathname; data->pathname = pathname;
......
...@@ -503,6 +503,21 @@ acpi_ns_repair_TSS(struct acpi_predefined_data *data, ...@@ -503,6 +503,21 @@ acpi_ns_repair_TSS(struct acpi_predefined_data *data,
{ {
union acpi_operand_object *return_object = *return_object_ptr; union acpi_operand_object *return_object = *return_object_ptr;
acpi_status status; 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, status = acpi_ns_check_sorted_list(data, return_object, 5, 1,
ACPI_SORT_DESCENDING, ACPI_SORT_DESCENDING,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment