aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/busses
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2008-05-18 14:49:40 -0400
committerJean Delvare <khali@hyperion.delvare>2008-05-18 14:49:40 -0400
commit08851d6eb4eeb0894f4d095dfdf8ab61c435ad57 (patch)
tree432df7d12116b099c12451966335ec4bcabc5f31 /drivers/i2c/busses
parent710cf7e75076e8d95ce677876b0655d37d14c1b8 (diff)
i2c-nforce2: Disable the second SMBus channel on the DFI Lanparty NF4 Expert
There is a strange chip at 0x2e on the second SMBus channel of the DFI Lanparty NF4 Expert motherboard. Accessing the chip reboots the system. As there's nothing interesting on this SMBus channel, the easiest and safest thing to do is to disable it on that board. This is a better fix to bug #5889 than the it87 driver update that was done originally: http://bugzilla.kernel.org/show_bug.cgi?id=5889 Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/i2c/busses')
-rw-r--r--drivers/i2c/busses/i2c-nforce2.c28
1 files changed, 24 insertions, 4 deletions
diff --git a/drivers/i2c/busses/i2c-nforce2.c b/drivers/i2c/busses/i2c-nforce2.c
index 3dac920e53ea..43c9f8df9509 100644
--- a/drivers/i2c/busses/i2c-nforce2.c
+++ b/drivers/i2c/busses/i2c-nforce2.c
@@ -50,6 +50,7 @@
50#include <linux/init.h> 50#include <linux/init.h>
51#include <linux/i2c.h> 51#include <linux/i2c.h>
52#include <linux/delay.h> 52#include <linux/delay.h>
53#include <linux/dmi.h>
53#include <asm/io.h> 54#include <asm/io.h>
54 55
55MODULE_LICENSE("GPL"); 56MODULE_LICENSE("GPL");
@@ -109,6 +110,18 @@ struct nforce2_smbus {
109/* Misc definitions */ 110/* Misc definitions */
110#define MAX_TIMEOUT 100 111#define MAX_TIMEOUT 100
111 112
113/* We disable the second SMBus channel on these boards */
114static struct dmi_system_id __devinitdata nforce2_dmi_blacklist2[] = {
115 {
116 .ident = "DFI Lanparty NF4 Expert",
117 .matches = {
118 DMI_MATCH(DMI_BOARD_VENDOR, "DFI Corp,LTD"),
119 DMI_MATCH(DMI_BOARD_NAME, "LP UT NF4 Expert"),
120 },
121 },
122 { }
123};
124
112static struct pci_driver nforce2_driver; 125static struct pci_driver nforce2_driver;
113 126
114static void nforce2_abort(struct i2c_adapter *adap) 127static void nforce2_abort(struct i2c_adapter *adap)
@@ -367,10 +380,17 @@ static int __devinit nforce2_probe(struct pci_dev *dev, const struct pci_device_
367 smbuses[0].base = 0; /* to have a check value */ 380 smbuses[0].base = 0; /* to have a check value */
368 } 381 }
369 /* SMBus adapter 2 */ 382 /* SMBus adapter 2 */
370 res2 = nforce2_probe_smb(dev, 5, NFORCE_PCI_SMB2, &smbuses[1], "SMB2"); 383 if (dmi_check_system(nforce2_dmi_blacklist2)) {
371 if (res2 < 0) { 384 dev_err(&dev->dev, "Disabling SMB2 for safety reasons.\n");
372 dev_err(&dev->dev, "Error probing SMB2.\n"); 385 res2 = -EPERM;
373 smbuses[1].base = 0; /* to have a check value */ 386 smbuses[1].base = 0;
387 } else {
388 res2 = nforce2_probe_smb(dev, 5, NFORCE_PCI_SMB2, &smbuses[1],
389 "SMB2");
390 if (res2 < 0) {
391 dev_err(&dev->dev, "Error probing SMB2.\n");
392 smbuses[1].base = 0; /* to have a check value */
393 }
374 } 394 }
375 if ((res1 < 0) && (res2 < 0)) { 395 if ((res1 < 0) && (res2 < 0)) {
376 /* we did not find even one of the SMBuses, so we give up */ 396 /* we did not find even one of the SMBuses, so we give up */