thermal fixup for broken BIOS which has invalid trip points.
ACPI thermal driver only re-evaluate VALID trip points. For the broken BIOS show in http://bugzilla.kernel.org/show_bug.cgi?id=8544 the active[0] is set to invalid at boot time and it will not be re-evaluated again. We can still get a single warning message at boot time. http://marc.info/?l=linux-kernel&m=120496222629983&w=2 http://bugzilla.kernel.org/show_bug.cgi?id=12203 Signed-off-by: Zhang Rui<rui.zhang@intel.com> Tested-by: Márton Németh <nm127@freemail.hu> Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
parent
c59765042f
commit
0e4240d946
1 changed files with 12 additions and 4 deletions
|
@ -416,7 +416,8 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Passive (optional) */
|
/* Passive (optional) */
|
||||||
if (flag & ACPI_TRIPS_PASSIVE) {
|
if (((flag & ACPI_TRIPS_PASSIVE) && tz->trips.passive.flags.valid) ||
|
||||||
|
(flag == ACPI_TRIPS_INIT)) {
|
||||||
valid = tz->trips.passive.flags.valid;
|
valid = tz->trips.passive.flags.valid;
|
||||||
if (psv == -1) {
|
if (psv == -1) {
|
||||||
status = AE_SUPPORT;
|
status = AE_SUPPORT;
|
||||||
|
@ -462,8 +463,11 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
|
||||||
memset(&devices, 0, sizeof(struct acpi_handle_list));
|
memset(&devices, 0, sizeof(struct acpi_handle_list));
|
||||||
status = acpi_evaluate_reference(tz->device->handle, "_PSL",
|
status = acpi_evaluate_reference(tz->device->handle, "_PSL",
|
||||||
NULL, &devices);
|
NULL, &devices);
|
||||||
if (ACPI_FAILURE(status))
|
if (ACPI_FAILURE(status)) {
|
||||||
|
printk(KERN_WARNING PREFIX
|
||||||
|
"Invalid passive threshold\n");
|
||||||
tz->trips.passive.flags.valid = 0;
|
tz->trips.passive.flags.valid = 0;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
tz->trips.passive.flags.valid = 1;
|
tz->trips.passive.flags.valid = 1;
|
||||||
|
|
||||||
|
@ -487,7 +491,8 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
|
||||||
if (act == -1)
|
if (act == -1)
|
||||||
break; /* disable all active trip points */
|
break; /* disable all active trip points */
|
||||||
|
|
||||||
if (flag & ACPI_TRIPS_ACTIVE) {
|
if ((flag == ACPI_TRIPS_INIT) || ((flag & ACPI_TRIPS_ACTIVE) &&
|
||||||
|
tz->trips.active[i].flags.valid)) {
|
||||||
status = acpi_evaluate_integer(tz->device->handle,
|
status = acpi_evaluate_integer(tz->device->handle,
|
||||||
name, NULL, &tmp);
|
name, NULL, &tmp);
|
||||||
if (ACPI_FAILURE(status)) {
|
if (ACPI_FAILURE(status)) {
|
||||||
|
@ -521,8 +526,11 @@ static int acpi_thermal_trips_update(struct acpi_thermal *tz, int flag)
|
||||||
memset(&devices, 0, sizeof(struct acpi_handle_list));
|
memset(&devices, 0, sizeof(struct acpi_handle_list));
|
||||||
status = acpi_evaluate_reference(tz->device->handle,
|
status = acpi_evaluate_reference(tz->device->handle,
|
||||||
name, NULL, &devices);
|
name, NULL, &devices);
|
||||||
if (ACPI_FAILURE(status))
|
if (ACPI_FAILURE(status)) {
|
||||||
|
printk(KERN_WARNING PREFIX
|
||||||
|
"Invalid active%d threshold\n", i);
|
||||||
tz->trips.active[i].flags.valid = 0;
|
tz->trips.active[i].flags.valid = 0;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
tz->trips.active[i].flags.valid = 1;
|
tz->trips.active[i].flags.valid = 1;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue