lkml.org 
[lkml]   [2002]   [Aug]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] 2.5.31 blacklist IMB Laptops from I2C-Sensors
Hello Linus,
This patch addresses concerns that Sensor detection corrupts IBM Laptops by
setting a global value "disable_smbus" in dmi_scan. With this set, it will
now be possible to blacklist IBM Laptops and not scan for sensors.
Thanks,
Albert
--
ac9410@attbi.com

--- linux-2.5.31/arch/i386/kernel/dmi_scan.c.orig 2002-07-31 23:10:21.000000000 -0400
+++ linux/arch/i386/kernel/dmi_scan.c 2002-07-31 23:13:52.000000000 -0400
@@ -13,6 +13,7 @@

unsigned long dmi_broken;
int is_sony_vaio_laptop;
+int is_broken_smbus;

struct dmi_header
{
@@ -468,6 +469,20 @@
return 0;
}

+/*
+ * Don't access SMBus on IBM systems which get corrupted eeproms
+ */
+
+static __init int disable_smbus(struct dmi_blacklist *d)
+{
+ if (is_broken_smbus == 0)
+ {
+ is_broken_smbus = 1;
+ printk(KERN_INFO "%s machine detected. Disabling SMBus accesses.\n", d->ident);
+ }
+ return 0;
+}
+
/*
* Simple "print if true" callback
*/
@@ -737,6 +752,15 @@
*/

{ set_apm_ints, "IBM", { /* Allow interrupts during suspend on IBM laptops */
+ MATCH(DMI_SYS_VENDOR, "IBM"),
+ NO_MATCH, NO_MATCH, NO_MATCH
+ } },
+
+ /*
+ * SMBus / sensors settings
+ */
+
+ { disable_smbus, "IBM", {
MATCH(DMI_SYS_VENDOR, "IBM"),
NO_MATCH, NO_MATCH, NO_MATCH
} },
\
 
 \ /
  Last update: 2005-03-22 13:28    [W:0.088 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site