]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - src/patches/suse-2.6.27.31/patches.arch/acpi_thermal_passive_blacklist.patch
Reenabled linux-xen, added patches for Xen Kernel Version 2.6.27.31,
[people/pmueller/ipfire-2.x.git] / src / patches / suse-2.6.27.31 / patches.arch / acpi_thermal_passive_blacklist.patch
diff --git a/src/patches/suse-2.6.27.31/patches.arch/acpi_thermal_passive_blacklist.patch b/src/patches/suse-2.6.27.31/patches.arch/acpi_thermal_passive_blacklist.patch
new file mode 100644 (file)
index 0000000..a07e129
--- /dev/null
@@ -0,0 +1,104 @@
+From: Thomas Renninger <trenn@suse.de>
+Subject: Avoid critical temp shutdowns on specific ThinkPad T4x(p) and R40
+References: https://bugzilla.novell.com/show_bug.cgi?id=333043
+
+---
+ drivers/acpi/thermal.c |   73 +++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 73 insertions(+)
+
+--- a/drivers/acpi/thermal.c
++++ b/drivers/acpi/thermal.c
+@@ -42,6 +42,7 @@
+ #include <linux/kmod.h>
+ #include <linux/seq_file.h>
+ #include <linux/reboot.h>
++#include <linux/dmi.h>
+ #include <asm/uaccess.h>
+ #include <linux/thermal.h>
+ #include <acpi/acpi_bus.h>
+@@ -1640,6 +1641,66 @@ static int acpi_thermal_get_info(struct 
+       return 0;
+ }
++static struct dmi_system_id thermal_psv_dmi_table[] = {
++      {
++              .ident = "IBM ThinkPad T41",
++              .matches = {
++                      DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
++                      DMI_MATCH(DMI_PRODUCT_VERSION,"ThinkPad T41"),
++              },
++      },
++      {
++              .ident = "IBM ThinkPad T42",
++              .matches = {
++                      DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
++                      DMI_MATCH(DMI_PRODUCT_VERSION,"ThinkPad T42"),
++              },
++      },
++      {
++              .ident = "IBM ThinkPad T43",
++              .matches = {
++                      DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
++                      DMI_MATCH(DMI_PRODUCT_VERSION,"ThinkPad T43"),
++              },
++      },
++      {
++              .ident = "IBM ThinkPad T41p",
++              .matches = {
++                      DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
++                      DMI_MATCH(DMI_PRODUCT_VERSION,"ThinkPad T41p"),
++              },
++      },
++      {
++              .ident = "IBM ThinkPad T42p",
++              .matches = {
++                      DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
++                      DMI_MATCH(DMI_PRODUCT_VERSION,"ThinkPad T42p"),
++              },
++      },
++      {
++              .ident = "IBM ThinkPad T43p",
++              .matches = {
++                      DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
++                      DMI_MATCH(DMI_PRODUCT_VERSION,"ThinkPad T43p"),
++              },
++      },
++      {
++              .ident = "IBM ThinkPad R40",
++              .matches = {
++                      DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
++                      DMI_MATCH(DMI_PRODUCT_VERSION,"ThinkPad R40"),
++              },
++      },
++      {
++              .ident = "IBM ThinkPad R50p",
++              .matches = {
++                      DMI_MATCH(DMI_BIOS_VENDOR,"IBM"),
++                      DMI_MATCH(DMI_PRODUCT_VERSION,"ThinkPad R50p"),
++              },
++      },
++      {},
++};
++
+ static int acpi_thermal_add(struct acpi_device *device)
+ {
+       int result = 0;
+@@ -1670,6 +1731,18 @@ static int acpi_thermal_add(struct acpi_
+       if (result)
+               goto free_memory;
++      if (dmi_check_system(thermal_psv_dmi_table)) {
++              if (tz->trips.passive.flags.valid &&
++                  tz->trips.passive.temperature > CELSIUS_TO_KELVIN(85)) {
++                      printk (KERN_INFO "Adjust passive trip point from %lu"
++                              " to %lu\n",
++                              KELVIN_TO_CELSIUS(tz->trips.passive.temperature),
++                              KELVIN_TO_CELSIUS(tz->trips.passive.temperature - 150));
++                      tz->trips.passive.temperature -= 150;
++                      acpi_thermal_set_polling(tz, 5);
++              }
++      }
++
+       result = acpi_thermal_add_fs(device);
+       if (result)
+               goto unregister_thermal_zone;