lkml.org 
[lkml]   [2002]   [Aug]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch] 2.4.20-pre5 DMI blacklist IBM Thinkpad in i2c/sensors
Hello Marcelo,
The attached patch add capability to blacklist IBM ThinkPads in i2c/sensors by
updating global variable.
Thanks,
Albert
--
ac9410@attbi.com
--- linux/arch/i386/kernel/dmi_scan.c.orig 2002-07-31 23:10:21.000000000 -0400
+++ linux/arch/i386/kernel/dmi_scan.c 2002-08-19 23:51:07.000000000 -0400
@@ -13,6 +13,7 @@

unsigned long dmi_broken;
int is_sony_vaio_laptop;
+int is_unsafe_smbus;

struct dmi_header
{
@@ -476,6 +477,20 @@
}


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

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