diff options
-rw-r--r-- | drivers/i2c/busses/i2c-nforce2.c | 28 |
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 | ||
55 | MODULE_LICENSE("GPL"); | 56 | MODULE_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 */ | ||
114 | static 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 | |||
112 | static struct pci_driver nforce2_driver; | 125 | static struct pci_driver nforce2_driver; |
113 | 126 | ||
114 | static void nforce2_abort(struct i2c_adapter *adap) | 127 | static 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 */ |