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] ACPI reads wrong temperature after loading
Date: Sun, 02 Nov 2008 09:07:02 +0000	[thread overview]
Message-ID: <20081102100702.758eb70b@hyperion.delvare> (raw)
In-Reply-To: <20081101103904.7ea43d94@hyperion.delvare>

Hi Peter, Markus,

On Sat, 01 Nov 2008 23:16:56 +0100, Peter Mahlknecht wrote:
> I got the new kernel (2.6.27.4) running, here is what it outputs during boot:
> Nov  1 22:48:30 laptop-mali kernel: [    9.670886] i801_smbus 0000:00:1f.3: PCI INT B -> GSI 19 (level, low) -> IRQ 19
> Nov  1 22:48:30 laptop-mali kernel: [    9.670946] ACPI: I/O resource 0000:00:1f.3 [0x18e0-0x18ff] conflicts with ACPI region SMBI [0x18e0-0x18ef]
> Nov  1 22:48:30 laptop-mali kernel: [    9.671002] ACPI: Device needs an ACPI driver

OK. This confirms that ACPI is using the SMBus so we shouldn't. With
kernels >= 2.6.27, you can boot with parameter
acpi_enforce_resources=strict and the i2c-i801 driver will decline
attaching to the SMBus.

> as just wrote before, as long as i2c-i801 isn't loaded i get the right
> temperatures, also if em28xx_cx25843 or lm90 (or both) are loaded. 
> dmesg output from my notebook can be found here:
> http://stud3.tuwien.ac.at/~e0526314/dmidecode_log

OK, thanks. We may use the DMI data to blacklist your laptop from
i2c-i801, although I'd prefer to use an ACPI-based approach.

Another test I'd like you to do is:

# rmmod em28xx_cx25843
# rmmod lm90
# modprobe i2c-i801
# modprobe i2c-dev
# i2cdetect -l
(find the i2c bus number for "SMBus I801 adapter at 18e0")
# i2cdetect n
(where n is the bus number in question)

I wonder if this will confuse ACPI the same way loading em28xx_cx25843
does. I don't think em28xx_cx25843 does more to the SMBus that
i2cdetect will, so I _think_ i2cdetect should cause the same problem.
But I'd like a confirmation, because I am surprised that just probing
the bus causes the problem.

Markus, this problem could be mitigated if em28xx_cx25843 was properly
checking the class of i2c adapters it is going to probe. The
cx25843_attach_adapter function should look like this:

static int cx25843_attach_adapter(struct i2c_adapter *adapter)
{
	if (!(adapter.class & I2C_CLASS_TV_ANALOG))
		return 0;
	printk(KERN_INFO"cx25843.c: starting probe for adapter %s (0x%x)\n",
		adapter->name, adapter->id);
	return i2c_probe(adapter, &addr_data, &cx25843_detect_client);
}

For future kernels, it should even be converted to the new-style i2c
device driver matching model, so that you don't have to probe anything.

-- 
Jean Delvare

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

  parent reply	other threads:[~2008-11-02  9:07 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-01  9:39 [lm-sensors] ACPI reads wrong temperature after loading Jean Delvare
2008-11-01 15:28 ` Markus Rechberger
2008-11-01 16:14 ` Jean Delvare
2008-11-01 17:11 ` Markus Rechberger
2008-11-01 17:33 ` Jean Delvare
2008-11-01 18:47 ` Peter Mahlknecht
2008-11-01 22:16 ` Peter Mahlknecht
2008-11-02  9:07 ` Jean Delvare [this message]
2008-11-02 11:25 ` Peter Mahlknecht
2008-11-05 17:33 ` 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=20081102100702.758eb70b@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.