History

i2c-piix4: Blacklist two mainboards

We had a report that running sensors-detect on a Sapphire AM2RD790 motherbord killed the CPU. While the exact cause is still unknown, I'd rather play it safe and prevent any access to the SMBus on that machine by not letting the i2c-piix4 driver attach to the SMBus host device on that machine. Also blacklist a similar board made by DFI.

Jean Delvare committed 18 years ago

Commit c2fc54f1 parent b1c17591 file · +30 −2Browse files

Unified · Split

drivers/i2c/busses/i2c-piix4.c+30−2
@@ -108,7 +108,27 @@ static int srvrworks_csb5_delay; · 107 unmodified lines
108108 static struct pci_driver piix4_driver;
109109 static struct i2c_adapter piix4_adapter;
110110
111−static struct dmi_system_id __devinitdata piix4_dmi_table[] = {
111+static struct dmi_system_id __devinitdata piix4_dmi_blacklist[] = {
112+ {
113+ .ident = "Sapphire AM2RD790",
114+ .matches = {
115+ DMI_MATCH(DMI_BOARD_VENDOR, "SAPPHIRE Inc."),
116+ DMI_MATCH(DMI_BOARD_NAME, "PC-AM2RD790"),
117+ },
118+ },
119+ {
120+ .ident = "DFI Lanparty UT 790FX",
121+ .matches = {
122+ DMI_MATCH(DMI_BOARD_VENDOR, "DFI Inc."),
123+ DMI_MATCH(DMI_BOARD_NAME, "LP UT 790FX"),
124+ },
125+ },
126+ { }
127+};
128+
129+/* The IBM entry is in a separate table because we only check it
130+ on Intel-based systems */
131+static struct dmi_system_id __devinitdata piix4_dmi_ibm[] = {
112132 {
113133 .ident = "IBM",
114134 .matches = { DMI_MATCH(DMI_SYS_VENDOR, "IBM"), },
@@ -127,8 +147,16 @@ static int __devinit piix4_setup(struct pci_dev *PIIX4_dev, · 12 unmodified lines
127147 (PIIX4_dev->device == PCI_DEVICE_ID_SERVERWORKS_CSB5))
128148 srvrworks_csb5_delay = 1;
129149
150+ /* On some motherboards, it was reported that accessing the SMBus
151+ caused severe hardware problems */
152+ if (dmi_check_system(piix4_dmi_blacklist)) {
153+ dev_err(&PIIX4_dev->dev,
154+ "Accessing the SMBus on this system is unsafe!\n");
155+ return -EPERM;
156+ }
157+
130158 /* Don't access SMBus on IBM systems which get corrupted eeproms */
131− if (dmi_check_system(piix4_dmi_table) &&
159+ if (dmi_check_system(piix4_dmi_ibm) &&
132160 PIIX4_dev->vendor == PCI_VENDOR_ID_INTEL) {
133161 dev_err(&PIIX4_dev->dev, "IBM system detected; this module "
134162 "may corrupt your serial eeprom! Refusing to load "