1 From: Thomas Renninger <trenn@suse.de>
2 Subject: Avoid critical temp shutdowns on specific ThinkPad T4x(p) and R40
3 References: https://bugzilla.novell.com/show_bug.cgi?id=333043
6 drivers/acpi/thermal.c | 73 +++++++++++++++++++++++++++++++++++++++++++++++++
7 1 file changed, 73 insertions(+)
9 --- a/drivers/acpi/thermal.c
10 +++ b/drivers/acpi/thermal.c
12 #include <linux/kmod.h>
13 #include <linux/seq_file.h>
14 #include <linux/reboot.h>
15 +#include <linux/dmi.h>
16 #include <asm/uaccess.h>
17 #include <linux/thermal.h>
18 #include <acpi/acpi_bus.h>
19 @@ -1640,6 +1641,66 @@ static int acpi_thermal_get_info(struct
23 +static struct dmi_system_id thermal_psv_dmi_table[] = {
25 + .ident = "IBM ThinkPad T41",
27 + DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
28 + DMI_MATCH(DMI_PRODUCT_VERSION,"ThinkPad T41"),
32 + .ident = "IBM ThinkPad T42",
34 + DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
35 + DMI_MATCH(DMI_PRODUCT_VERSION,"ThinkPad T42"),
39 + .ident = "IBM ThinkPad T43",
41 + DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
42 + DMI_MATCH(DMI_PRODUCT_VERSION,"ThinkPad T43"),
46 + .ident = "IBM ThinkPad T41p",
48 + DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
49 + DMI_MATCH(DMI_PRODUCT_VERSION,"ThinkPad T41p"),
53 + .ident = "IBM ThinkPad T42p",
55 + DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
56 + DMI_MATCH(DMI_PRODUCT_VERSION,"ThinkPad T42p"),
60 + .ident = "IBM ThinkPad T43p",
62 + DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
63 + DMI_MATCH(DMI_PRODUCT_VERSION,"ThinkPad T43p"),
67 + .ident = "IBM ThinkPad R40",
69 + DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
70 + DMI_MATCH(DMI_PRODUCT_VERSION,"ThinkPad R40"),
74 + .ident = "IBM ThinkPad R50p",
76 + DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
77 + DMI_MATCH(DMI_PRODUCT_VERSION,"ThinkPad R50p"),
83 static int acpi_thermal_add(struct acpi_device *device)
86 @@ -1670,6 +1731,18 @@ static int acpi_thermal_add(struct acpi_
90 + if (dmi_check_system(thermal_psv_dmi_table)) {
91 + if (tz->trips.passive.flags.valid &&
92 + tz->trips.passive.temperature > CELSIUS_TO_KELVIN(85)) {
93 + printk (KERN_INFO "Adjust passive trip point from %lu"
95 + KELVIN_TO_CELSIUS(tz->trips.passive.temperature),
96 + KELVIN_TO_CELSIUS(tz->trips.passive.temperature - 150));
97 + tz->trips.passive.temperature -= 150;
98 + acpi_thermal_set_polling(tz, 5);
102 result = acpi_thermal_add_fs(device);
104 goto unregister_thermal_zone;