All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jean Delvare <khali@linux-fr.org>
To: lm-sensors@vger.kernel.org
Subject: Re: [lm-sensors] [PATCH] i2c-piix4: Blacklist two mainboards
Date: Mon, 12 May 2008 12:17:27 +0000	[thread overview]
Message-ID: <20080512141727.4a226a21@hyperion.delvare> (raw)
In-Reply-To: <20080504183048.177fc0b4@hyperion.delvare>

On Sun, 4 May 2008 18:30:48 +0200, Jean Delvare wrote:
> 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.
> 
> Signed-off-by: Jean Delvare <khali@linux-fr.org>
> ---
> Previous version was broken, sorry.
> 
>  drivers/i2c/busses/i2c-piix4.c |   32 ++++++++++++++++++++++++++++++--
>  1 file changed, 30 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-04 09:56:00.000000000 +0200
> @@ -108,7 +108,27 @@ 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"),
> +		},
> +	},
> +	{
> +		.ident = "DFI Lanparty UT 790FX",
> +		.matches = {
> +			DMI_MATCH(DMI_BOARD_VENDOR, "DFI Inc."),
> +			DMI_MATCH(DMI_BOARD_NAME, "LP UT 790FX"),
> +		},
> +	},
> +	{ }
> +};
> +
> +/* 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 +143,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 "
> 

Achim, did you have a chance to give a try to this patch? I understand
that you don't want to apply it permanently while you're still having
fun with the I2C devices on the SMBus, but if you could still test it
and report whether it works as intended, that would be great. This
patch is in kernel 2.6.26-rc2 now, I would like to backport it to
2.6.25.y, but before I do I'd like to have at least one positive test
result.

Thanks,
-- 
Jean Delvare

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

  reply	other threads:[~2008-05-12 12:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-04 16:30 [lm-sensors] [PATCH] i2c-piix4: Blacklist two mainboards Jean Delvare
2008-05-12 12:17 ` Jean Delvare [this message]
2008-05-12 13:32 ` Achim Gottinger
2008-05-12 14:19 ` Jean Delvare
2008-05-12 15:02 ` Achim Gottinger
2008-05-12 15:26 ` 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=20080512141727.4a226a21@hyperion.delvare \
    --to=khali@linux-fr.org \
    --cc=lm-sensors@vger.kernel.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.