linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] 2.4.20-pre5 DMI blacklist IBM Thinkpad in i2c/sensors
@ 2002-08-29  5:44 Albert Cranford
  0 siblings, 0 replies; only message in thread
From: Albert Cranford @ 2002-08-29  5:44 UTC (permalink / raw)
  To: Marcelo Tosatti; +Cc: Kernel mailing list

[-- Attachment #1: Type: TEXT/PLAIN, Size: 156 bytes --]

Hello Marcelo,
The attached patch add capability to blacklist IBM ThinkPads in i2c/sensors by
updating global variable.
Thanks,
Albert
-- 
ac9410@attbi.com

[-- Attachment #2: Type: TEXT/PLAIN, Size: 931 bytes --]

--- 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, }
 };
 	

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2002-08-29  5:39 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-08-29  5:44 [patch] 2.4.20-pre5 DMI blacklist IBM Thinkpad in i2c/sensors Albert Cranford

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).