From: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
To: achim <achim-888L293l2dDzs492ZWNkEA@public.gmane.org>
Cc: Linux I2C <i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org>,
LM Sensors <lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org>
Subject: [PATCH] i2c-piix4: Blacklist the Sapphire AM2RD790 motherboard
Date: Sat, 3 May 2008 20:16:59 +0200 [thread overview]
Message-ID: <20080503201659.2ab17cbc@hyperion.delvare> (raw)
In-Reply-To: <20080503182701.58a0c146-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
On Sat, 3 May 2008 18:27:01 +0200, Jean Delvare wrote:
> The good news is that the motherboard DMI data is present:
>
> Base Board Information
> Manufacturer: SAPPHIRE Inc.
> Product Name: PC-AM2RD790
>
> So we can blacklist it from i2c-piix4. I'll prepare a patch later today.
>
Here you go. Would you have the possibility to test the patch below?
You'll have to rebuild your kernel (or at least the i2c-piix4 driver)
with this patch applied, then try loading the i2c-piix4 driver, you
should see an error message in the logs and no i2c bus created.
* * * * *
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.
Signed-off-by: Jean Delvare <khali-PUYAD+kWke1g9hUCZPvPmw@public.gmane.org>
---
drivers/i2c/busses/i2c-piix4.c | 25 +++++++++++++++++++++++--
1 file changed, 23 insertions(+), 2 deletions(-)
--- linux-2.6.25.orig/drivers/i2c/busses/i2c-piix4.c 2008-04-19 11:11:56.000000000 +0200
+++ linux-2.6.25/drivers/i2c/busses/i2c-piix4.c 2008-05-03 19:32:46.000000000 +0200
@@ -108,7 +108,20 @@ static unsigned short piix4_smba;
static struct pci_driver piix4_driver;
static struct i2c_adapter piix4_adapter;
-static struct dmi_system_id __devinitdata piix4_dmi_table[] = {
+static struct dmi_system_id __devinitdata piix4_dmi_blacklist[] = {
+ {
+ .ident = "Sapphire AM2RD790",
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "SAPPHIRE Inc."),
+ DMI_MATCH(DMI_BOARD_NAME, "PC-AM2RD790"),
+ },
+ },
+ { }
+};
+
+/* The IBM entry is in a separate table because we only check it
+ on Intel-based systems */
+static struct dmi_system_id __devinitdata piix4_dmi_ibm[] = {
{
.ident = "IBM",
.matches = { DMI_MATCH(DMI_SYS_VENDOR, "IBM"), },
@@ -123,8 +136,16 @@ static int __devinit piix4_setup(struct
dev_info(&PIIX4_dev->dev, "Found %s device\n", pci_name(PIIX4_dev));
+ /* On some motherboards, it was reported that accessing the SMBus
+ caused severe hardware problems */
+ if (dmi_check_system(piix4_dmi_blacklist)) {
+ dev_err(&PIIX4_dev->dev,
+ "Accessing the SMBus on this system is unsafe!\n");
+ return -EPERM;
+ }
+
/* Don't access SMBus on IBM systems which get corrupted eeproms */
- if (dmi_check_system(piix4_dmi_table) &&
+ if (dmi_check_system(piix4_dmi_ibm) &&
PIIX4_dev->vendor == PCI_VENDOR_ID_INTEL) {
dev_err(&PIIX4_dev->dev, "IBM system detected; this module "
"may corrupt your serial eeprom! Refusing to load "
--
Jean Delvare
_______________________________________________
i2c mailing list
i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org
http://lists.lm-sensors.org/mailman/listinfo/i2c
WARNING: multiple messages have this Message-ID (diff)
From: Jean Delvare <khali@linux-fr.org>
To: achim <achim-888L293l2dDzs492ZWNkEA@public.gmane.org>
Cc: Linux I2C <i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org>,
LM Sensors <lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org>
Subject: [lm-sensors] [PATCH] i2c-piix4: Blacklist the Sapphire AM2RD790
Date: Sat, 03 May 2008 18:16:59 +0000 [thread overview]
Message-ID: <20080503201659.2ab17cbc@hyperion.delvare> (raw)
In-Reply-To: <20080503182701.58a0c146-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
On Sat, 3 May 2008 18:27:01 +0200, Jean Delvare wrote:
> The good news is that the motherboard DMI data is present:
>
> Base Board Information
> Manufacturer: SAPPHIRE Inc.
> Product Name: PC-AM2RD790
>
> So we can blacklist it from i2c-piix4. I'll prepare a patch later today.
>
Here you go. Would you have the possibility to test the patch below?
You'll have to rebuild your kernel (or at least the i2c-piix4 driver)
with this patch applied, then try loading the i2c-piix4 driver, you
should see an error message in the logs and no i2c bus created.
* * * * *
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.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
---
drivers/i2c/busses/i2c-piix4.c | 25 +++++++++++++++++++++++--
1 file changed, 23 insertions(+), 2 deletions(-)
--- linux-2.6.25.orig/drivers/i2c/busses/i2c-piix4.c 2008-04-19 11:11:56.000000000 +0200
+++ linux-2.6.25/drivers/i2c/busses/i2c-piix4.c 2008-05-03 19:32:46.000000000 +0200
@@ -108,7 +108,20 @@ static unsigned short piix4_smba;
static struct pci_driver piix4_driver;
static struct i2c_adapter piix4_adapter;
-static struct dmi_system_id __devinitdata piix4_dmi_table[] = {
+static struct dmi_system_id __devinitdata piix4_dmi_blacklist[] = {
+ {
+ .ident = "Sapphire AM2RD790",
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "SAPPHIRE Inc."),
+ DMI_MATCH(DMI_BOARD_NAME, "PC-AM2RD790"),
+ },
+ },
+ { }
+};
+
+/* The IBM entry is in a separate table because we only check it
+ on Intel-based systems */
+static struct dmi_system_id __devinitdata piix4_dmi_ibm[] = {
{
.ident = "IBM",
.matches = { DMI_MATCH(DMI_SYS_VENDOR, "IBM"), },
@@ -123,8 +136,16 @@ static int __devinit piix4_setup(struct
dev_info(&PIIX4_dev->dev, "Found %s device\n", pci_name(PIIX4_dev));
+ /* On some motherboards, it was reported that accessing the SMBus
+ caused severe hardware problems */
+ if (dmi_check_system(piix4_dmi_blacklist)) {
+ dev_err(&PIIX4_dev->dev,
+ "Accessing the SMBus on this system is unsafe!\n");
+ return -EPERM;
+ }
+
/* Don't access SMBus on IBM systems which get corrupted eeproms */
- if (dmi_check_system(piix4_dmi_table) &&
+ if (dmi_check_system(piix4_dmi_ibm) &&
PIIX4_dev->vendor = PCI_VENDOR_ID_INTEL) {
dev_err(&PIIX4_dev->dev, "IBM system detected; this module "
"may corrupt your serial eeprom! Refusing to load "
--
Jean Delvare
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
next prev parent reply other threads:[~2008-05-03 18:16 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-02 21:18 [lm-sensors] sensors-detect killed my CPU Achim Gottinger
2008-05-03 7:18 ` Jean Delvare
2008-05-03 11:02 ` Ruzicka Pavel
2008-05-03 15:27 ` achim
2008-05-03 16:27 ` Jean Delvare
[not found] ` <20080503182701.58a0c146-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-05-03 18:16 ` Jean Delvare [this message]
2008-05-03 18:16 ` [lm-sensors] [PATCH] i2c-piix4: Blacklist the Sapphire AM2RD790 Jean Delvare
[not found] ` <20080503201659.2ab17cbc-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-05-04 12:57 ` [PATCH] i2c-piix4: Blacklist two mainboards Jean Delvare
[not found] ` <20080504145717.75063c54-ig7AzVSIIG7kN2dkZ6Wm7A@public.gmane.org>
2008-05-04 13:38 ` Jean Delvare
2008-05-03 18:11 ` [lm-sensors] sensors-detect killed my CPU achim
2008-05-03 19:14 ` Jean Delvare
2008-05-03 19:27 ` Jean Delvare
2008-05-03 20:30 ` achim
2008-05-03 21:09 ` Jean Delvare
2008-05-03 21:18 ` achim
2008-05-03 23:24 ` Achim Gottinger
2008-05-04 7:41 ` Jean Delvare
2008-05-04 7:57 ` Jean Delvare
2008-05-04 8:38 ` Rudolf Marek
2008-05-04 11:42 ` achim
2008-05-04 12:03 ` achim
2008-05-04 12:39 ` Jean Delvare
2008-05-04 13:23 ` achim
2008-05-04 15:27 ` achim
2008-05-04 16:05 ` Jean Delvare
2008-05-04 16:29 ` Jean Delvare
2008-05-04 16:49 ` Achim Gottinger
2008-05-04 17:47 ` Achim Gottinger
2008-05-04 18:16 ` Jean Delvare
2008-05-05 12:15 ` achim
2008-05-05 12:33 ` Jean Delvare
2008-05-05 19:44 ` Achim Gottinger
2008-05-06 9:01 ` Jean Delvare
2008-05-06 14:11 ` Jean Delvare
2008-05-06 20:44 ` achim
2008-05-07 12:14 ` Jean Delvare
2008-05-07 13:02 ` Gabriel C
2008-05-07 13:07 ` Jean Delvare
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080503201659.2ab17cbc@hyperion.delvare \
--to=khali-puyad+kwke1g9huczpvpmw@public.gmane.org \
--cc=achim-888L293l2dDzs492ZWNkEA@public.gmane.org \
--cc=i2c-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org \
--cc=lm-sensors-GZX6beZjE8VD60Wz+7aTrA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.