]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/suse-2.6.27.31/patches.arch/acpi_thermal_passive_blacklist.patch
Add a patch to fix Intel E100 wake-on-lan problems.
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.arch / acpi_thermal_passive_blacklist.patch
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
4
5 ---
6 drivers/acpi/thermal.c | 73 +++++++++++++++++++++++++++++++++++++++++++++++++
7 1 file changed, 73 insertions(+)
8
9 --- a/drivers/acpi/thermal.c
10 +++ b/drivers/acpi/thermal.c
11 @@ -42,6 +42,7 @@
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
20 return 0;
21 }
22
23 +static struct dmi_system_id thermal_psv_dmi_table[] = {
24 + {
25 + .ident = "IBM ThinkPad T41",
26 + .matches = {
27 + DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
28 + DMI_MATCH(DMI_PRODUCT_VERSION,"ThinkPad T41"),
29 + },
30 + },
31 + {
32 + .ident = "IBM ThinkPad T42",
33 + .matches = {
34 + DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
35 + DMI_MATCH(DMI_PRODUCT_VERSION,"ThinkPad T42"),
36 + },
37 + },
38 + {
39 + .ident = "IBM ThinkPad T43",
40 + .matches = {
41 + DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
42 + DMI_MATCH(DMI_PRODUCT_VERSION,"ThinkPad T43"),
43 + },
44 + },
45 + {
46 + .ident = "IBM ThinkPad T41p",
47 + .matches = {
48 + DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
49 + DMI_MATCH(DMI_PRODUCT_VERSION,"ThinkPad T41p"),
50 + },
51 + },
52 + {
53 + .ident = "IBM ThinkPad T42p",
54 + .matches = {
55 + DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
56 + DMI_MATCH(DMI_PRODUCT_VERSION,"ThinkPad T42p"),
57 + },
58 + },
59 + {
60 + .ident = "IBM ThinkPad T43p",
61 + .matches = {
62 + DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
63 + DMI_MATCH(DMI_PRODUCT_VERSION,"ThinkPad T43p"),
64 + },
65 + },
66 + {
67 + .ident = "IBM ThinkPad R40",
68 + .matches = {
69 + DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
70 + DMI_MATCH(DMI_PRODUCT_VERSION,"ThinkPad R40"),
71 + },
72 + },
73 + {
74 + .ident = "IBM ThinkPad R50p",
75 + .matches = {
76 + DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
77 + DMI_MATCH(DMI_PRODUCT_VERSION,"ThinkPad R50p"),
78 + },
79 + },
80 + {},
81 +};
82 +
83 static int acpi_thermal_add(struct acpi_device *device)
84 {
85 int result = 0;
86 @@ -1670,6 +1731,18 @@ static int acpi_thermal_add(struct acpi_
87 if (result)
88 goto free_memory;
89
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"
94 + " to %lu\n",
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);
99 + }
100 + }
101 +
102 result = acpi_thermal_add_fs(device);
103 if (result)
104 goto unregister_thermal_zone;