All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [lm-sensors] ACPI reads wrong temperature after loading
@ 2008-11-01  9:39 Jean Delvare
  2008-11-01 15:28 ` Markus Rechberger
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: Jean Delvare @ 2008-11-01  9:39 UTC (permalink / raw)
  To: lm-sensors

Hallo Peter, Markus,

On Fri, 31 Oct 2008 23:20:58 +0100, Peter Mahlknecht wrote:
> Markus Rechberger schrieb:
> > On Fri, Oct 31, 2008 at 11:08 PM, Peter Mahlknecht <mali100@gmx.net> wrote:
> >> I have here a strange problem:
> >> after loading the em28xx_cx25843 module in
> >> /proc/acpi/thermal_zone/THRM/temperature a wrong temperature (65535 C) which
> >> forces a shutdown on my notebook ("Critical temperature reached (65535 C).
> >> Shutting down."). Same thing happens if I load the lm90 module (hwmon driver
> >> for the temperaturesensor used by lm-sensors). Both modules depend on
> >> i2c_core, so maybe its an I²C bug. Any suggestions?
> >
> > I think the lmsensors mailinglist might be better for this! Jean
> > Delvare might now more about it.
> > added the lm-sensors ML.
> >
> > also provide which kernel version you use.
>
> Thanks for the fast reply,
> I am using Debian Lenny (2.6.26-1-686) on my notebook (Samsung P40 with 
> the latest Bios 09HK), but had the same problem also with the 
> 2.6.18-6-686 (Lenny) and with Ubuntu Hardy Heron (think the kernel was 
> 2.6.24).

It would help if I could see the source code of module em28xx_cx25843,
but unfortunately I have no idea where that driver lives. Markus?

Peter, most probably you have an LM90-compatible sensor chip on the
SMBus and ACPI uses it for thermal regulation and doesn't enjoy another
driver (e.g. lm90) accessing the same chip. That the lm90 driver causes
trouble in that case is more or less expected. That the em28xx_cx25843
driver does is more surprising, but without reading the code I can't
tell why.

Please try the following workaround: blacklist the i2c-i801 driver (or
rmmod it before loading em28xx_cx25843.)

It would also be great if you could give a try to kernel 2.6.27 and
report if you see the following message in the kernel logs:

ACPI: * resource * [0x*-0x*] conflicts with ACPI region * [0x*-0x*]
ACPI: Device needs an ACPI driver

For reference, please also attach the output of dmidecode on this
laptop.

-- 
Jean Delvare

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [lm-sensors] ACPI reads wrong temperature after loading
  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
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Markus Rechberger @ 2008-11-01 15:28 UTC (permalink / raw)
  To: lm-sensors

On Sat, Nov 1, 2008 at 10:39 AM, Jean Delvare <khali@linux-fr.org> wrote:
> Hallo Peter, Markus,
>
> On Fri, 31 Oct 2008 23:20:58 +0100, Peter Mahlknecht wrote:
>> Markus Rechberger schrieb:
>> > On Fri, Oct 31, 2008 at 11:08 PM, Peter Mahlknecht <mali100@gmx.net> wrote:
>> >> I have here a strange problem:
>> >> after loading the em28xx_cx25843 module in
>> >> /proc/acpi/thermal_zone/THRM/temperature a wrong temperature (65535 C) which
>> >> forces a shutdown on my notebook ("Critical temperature reached (65535 C).
>> >> Shutting down."). Same thing happens if I load the lm90 module (hwmon driver
>> >> for the temperaturesensor used by lm-sensors). Both modules depend on
>> >> i2c_core, so maybe its an I²C bug. Any suggestions?
>> >
>> > I think the lmsensors mailinglist might be better for this! Jean
>> > Delvare might now more about it.
>> > added the lm-sensors ML.
>> >
>> > also provide which kernel version you use.
>>
>> Thanks for the fast reply,
>> I am using Debian Lenny (2.6.26-1-686) on my notebook (Samsung P40 with
>> the latest Bios 09HK), but had the same problem also with the
>> 2.6.18-6-686 (Lenny) and with Ubuntu Hardy Heron (think the kernel was
>> 2.6.24).
>
> It would help if I could see the source code of module em28xx_cx25843,
> but unfortunately I have no idea where that driver lives. Markus?
>

http://mcentral.de/hg/~mrec/em28xx-new/file/ca209b1d4076/cx25843/em28xx-cx25843.c

> Peter, most probably you have an LM90-compatible sensor chip on the
> SMBus and ACPI uses it for thermal regulation and doesn't enjoy another
> driver (e.g. lm90) accessing the same chip. That the lm90 driver causes
> trouble in that case is more or less expected. That the em28xx_cx25843
> driver does is more surprising, but without reading the code I can't
> tell why.
>
> Please try the following workaround: blacklist the i2c-i801 driver (or
> rmmod it before loading em28xx_cx25843.)
>
> It would also be great if you could give a try to kernel 2.6.27 and
> report if you see the following message in the kernel logs:
>
> ACPI: * resource * [0x*-0x*] conflicts with ACPI region * [0x*-0x*]
> ACPI: Device needs an ACPI driver
>
> For reference, please also attach the output of dmidecode on this
> laptop.
>
> --
> Jean Delvare
>

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [lm-sensors] ACPI reads wrong temperature after loading
  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
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Jean Delvare @ 2008-11-01 16:14 UTC (permalink / raw)
  To: lm-sensors

On Sat, 1 Nov 2008 16:28:40 +0100, Markus Rechberger wrote:
> On Sat, Nov 1, 2008 at 10:39 AM, Jean Delvare <khali@linux-fr.org> wrote:
> > It would help if I could see the source code of module em28xx_cx25843,
> > but unfortunately I have no idea where that driver lives. Markus?
> 
> http://mcentral.de/hg/~mrec/em28xx-new/file/ca209b1d4076/cx25843/em28xx-cx25843.c

This driver only attaches to (7-bit) address 0x44, while the lm90
driver probes for devices at 0x4c and 0x4d. So I have to admit I am
surprised that loading both drivers leads to the same result.

One note about the em28xx-cx25843 driver: it doesn't check for the
right i2c adapter functionality flags. The driver makes use of raw I2C
transactions to read from and write to the device, so it should check
for I2C_FUNC_I2C, but instead of that I see the following code:

   566 	/* Check if the adapter supports the needed features */
   567 	if (!i2c_check_functionality
   568 			(adapter,
   569 			 I2C_FUNC_SMBUS_READ_BYTE |
   570 			 I2C_FUNC_SMBUS_WRITE_BYTE_DATA))
   571 		return 0;

This is incorrect and should be fixed.

Another thing that should be fixed in this driver is the use of a
"template" i2c_client. This is inefficient in terms of performance,
disk space and memory so it should be avoided. Just setting fields
individually is much better.

-- 
Jean Delvare

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [lm-sensors] ACPI reads wrong temperature after loading
  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
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Markus Rechberger @ 2008-11-01 17:11 UTC (permalink / raw)
  To: lm-sensors

On Sat, Nov 1, 2008 at 5:14 PM, Jean Delvare <khali@linux-fr.org> wrote:
> On Sat, 1 Nov 2008 16:28:40 +0100, Markus Rechberger wrote:
>> On Sat, Nov 1, 2008 at 10:39 AM, Jean Delvare <khali@linux-fr.org> wrote:
>> > It would help if I could see the source code of module em28xx_cx25843,
>> > but unfortunately I have no idea where that driver lives. Markus?
>>
>> http://mcentral.de/hg/~mrec/em28xx-new/file/ca209b1d4076/cx25843/em28xx-cx25843.c
>
> This driver only attaches to (7-bit) address 0x44, while the lm90
> driver probes for devices at 0x4c and 0x4d. So I have to admit I am
> surprised that loading both drivers leads to the same result.
>

is there some debug that can be enabled in the i2c framework which
might help you forward?


> One note about the em28xx-cx25843 driver: it doesn't check for the
> right i2c adapter functionality flags. The driver makes use of raw I2C
> transactions to read from and write to the device, so it should check
> for I2C_FUNC_I2C, but instead of that I see the following code:
>
>   566  /* Check if the adapter supports the needed features */
>   567  if (!i2c_check_functionality
>   568                  (adapter,
>   569                   I2C_FUNC_SMBUS_READ_BYTE |
>   570                   I2C_FUNC_SMBUS_WRITE_BYTE_DATA))
>   571          return 0;
>
> This is incorrect and should be fixed.
>
> Another thing that should be fixed in this driver is the use of a
> "template" i2c_client. This is inefficient in terms of performance,
> disk space and memory so it should be avoided. Just setting fields
> individually is much better.
>

thanks for the hints, I'll adapt it within the next days.

Markus

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [lm-sensors] ACPI reads wrong temperature after loading
  2008-11-01  9:39 [lm-sensors] ACPI reads wrong temperature after loading Jean Delvare
                   ` (2 preceding siblings ...)
  2008-11-01 17:11 ` Markus Rechberger
@ 2008-11-01 17:33 ` Jean Delvare
  2008-11-01 18:47 ` Peter Mahlknecht
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Jean Delvare @ 2008-11-01 17:33 UTC (permalink / raw)
  To: lm-sensors

On Sat, 1 Nov 2008 18:11:26 +0100, Markus Rechberger wrote:
> On Sat, Nov 1, 2008 at 5:14 PM, Jean Delvare <khali@linux-fr.org> wrote:
> > On Sat, 1 Nov 2008 16:28:40 +0100, Markus Rechberger wrote:
> >> http://mcentral.de/hg/~mrec/em28xx-new/file/ca209b1d4076/cx25843/em28xx-cx25843.c
> >
> > This driver only attaches to (7-bit) address 0x44, while the lm90
> > driver probes for devices at 0x4c and 0x4d. So I have to admit I am
> > surprised that loading both drivers leads to the same result.
> 
> is there some debug that can be enabled in the i2c framework which
> might help you forward?

I don't think so. Let's wait for Peter to do the tests I suggested
first.

-- 
Jean Delvare

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [lm-sensors] ACPI reads wrong temperature after loading
  2008-11-01  9:39 [lm-sensors] ACPI reads wrong temperature after loading Jean Delvare
                   ` (3 preceding siblings ...)
  2008-11-01 17:33 ` Jean Delvare
@ 2008-11-01 18:47 ` Peter Mahlknecht
  2008-11-01 22:16 ` Peter Mahlknecht
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Peter Mahlknecht @ 2008-11-01 18:47 UTC (permalink / raw)
  To: lm-sensors

Hi, 
> Please try the following workaround: blacklist the i2c-i801 driver (or
> rmmod it before loading em28xx_cx25843.)
tested this, and it works: as long as i2c-i801 isn't loaded i get the right temperatures, also if I have loaded em28xx_cx25843 or lm90 (or both). 

> It would also be great if you could give a try to kernel 2.6.27 and
> report if you see the following message in the kernel logs:
> 
> ACPI: * resource * [0x*-0x*] conflicts with ACPI region * [0x*-0x*]
> ACPI: Device needs an ACPI driver

I will try. Hope to get the new kernel working tonight

> For reference, please also attach the output of dmidecode on this
> laptop.
I wasn't shure if attaching works, so i put it on http://stud3.tuwien.ac.at/~e0526314/dmidecode_log

Peter Mahlknecht

-- 
GMX Download-Spiele: Preizsturz! Alle Puzzle-Spiele Deluxe über 60% billiger.
http://games.entertainment.gmx.net/de/entertainment/games/download/puzzle/index.html

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [lm-sensors] ACPI reads wrong temperature after loading
  2008-11-01  9:39 [lm-sensors] ACPI reads wrong temperature after loading Jean Delvare
                   ` (4 preceding siblings ...)
  2008-11-01 18:47 ` Peter Mahlknecht
@ 2008-11-01 22:16 ` Peter Mahlknecht
  2008-11-02  9:07 ` Jean Delvare
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: Peter Mahlknecht @ 2008-11-01 22:16 UTC (permalink / raw)
  To: lm-sensors

Hi,
> I don't think so. Let's wait for Peter to do the tests I suggested
> first.
> 
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

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

Thanks for the help
Peter
-- 
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [lm-sensors] ACPI reads wrong temperature after loading
  2008-11-01  9:39 [lm-sensors] ACPI reads wrong temperature after loading Jean Delvare
                   ` (5 preceding siblings ...)
  2008-11-01 22:16 ` Peter Mahlknecht
@ 2008-11-02  9:07 ` Jean Delvare
  2008-11-02 11:25 ` Peter Mahlknecht
  2008-11-05 17:33 ` Jean Delvare
  8 siblings, 0 replies; 10+ messages in thread
From: Jean Delvare @ 2008-11-02  9:07 UTC (permalink / raw)
  To: lm-sensors

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [lm-sensors] ACPI reads wrong temperature after loading
  2008-11-01  9:39 [lm-sensors] ACPI reads wrong temperature after loading Jean Delvare
                   ` (6 preceding siblings ...)
  2008-11-02  9:07 ` Jean Delvare
@ 2008-11-02 11:25 ` Peter Mahlknecht
  2008-11-05 17:33 ` Jean Delvare
  8 siblings, 0 replies; 10+ messages in thread
From: Peter Mahlknecht @ 2008-11-02 11:25 UTC (permalink / raw)
  To: lm-sensors

HI,
> 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.

Has this the same effect as just not loading the i2c-i801 driver? Or what other functions then attaching to the SMBus has the i2c-i801?

> 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.

It does:
laptop-mali:/home/mali# i2cdetect -l
i2c-0	smbus     	SMBus I801 adapter at 18e0      	SMBus adapter
laptop-mali:/home/mali# cat /proc/acpi/thermal_zone/THRM/temperature 
temperature:             41 C
laptop-mali:/home/mali# i2cdetect 0
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0.
I will probe address range 0x03-0x77.
Continue? [Y/n] y
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- 08 -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: 30 -- 32 -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- 44 -- -- -- -- -- -- -- 4c -- -- -- 
50: 50 -- 52 -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- 69 -- -- -- -- -- -- 
laptop-mali:/home/mali# cat /proc/acpi/thermal_zone/THRM/temperature 
temperature:             65535 C


Peter
-- 
Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen: http://www.gmx.net/de/go/multimessenger

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [lm-sensors] ACPI reads wrong temperature after loading
  2008-11-01  9:39 [lm-sensors] ACPI reads wrong temperature after loading Jean Delvare
                   ` (7 preceding siblings ...)
  2008-11-02 11:25 ` Peter Mahlknecht
@ 2008-11-05 17:33 ` Jean Delvare
  8 siblings, 0 replies; 10+ messages in thread
From: Jean Delvare @ 2008-11-05 17:33 UTC (permalink / raw)
  To: lm-sensors

Hi Peter,

Sorry for the late answer, I fell ill and had to stay in bad for a
couple days.

On Sun, 02 Nov 2008 12:25:25 +0100, Peter Mahlknecht wrote:
> > 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.
> 
> Has this the same effect as just not loading the i2c-i801 driver? Or
> what other functions then attaching to the SMBus has the i2c-i801?

This has roughly the same effect, yes. The only difference is that
acpi_enforce_resources=strict doesn't prevent the i2c-i801 driver from
loading, so it still appears in "lsmod" and wastes a small amount of
memory. But I doubt you really care in practice.

> > 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.
> 
> It does:
> laptop-mali:/home/mali# i2cdetect -l
> i2c-0	smbus     	SMBus I801 adapter at 18e0      	SMBus adapter
> laptop-mali:/home/mali# cat /proc/acpi/thermal_zone/THRM/temperature 
> temperature:             41 C
> laptop-mali:/home/mali# i2cdetect 0
> WARNING! This program can confuse your I2C bus, cause data loss and worse!
> I will probe file /dev/i2c-0.
> I will probe address range 0x03-0x77.
> Continue? [Y/n] y
>      0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
> 00:          -- -- -- -- -- 08 -- -- -- -- -- -- -- 
> 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
> 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
> 30: 30 -- 32 -- -- -- -- -- -- -- -- -- -- -- -- -- 
> 40: -- -- -- -- 44 -- -- -- -- -- -- -- 4c -- -- -- 
> 50: 50 -- 52 -- -- -- -- -- -- -- -- -- -- -- -- -- 
> 60: -- -- -- -- -- -- -- -- -- 69 -- -- -- -- -- -- 
> laptop-mali:/home/mali# cat /proc/acpi/thermal_zone/THRM/temperature 
> temperature:             65535 C

OK, so the mere fact of probing the bus with "SMBus quick commands" is
enough to confuse ACPI. I guess that the i2c-i801 driver is changing
some hardware settings (.e.g. SMBus vs. I2C timing or PEC flag) to
something ACPI doesn't expect. If we want the i2c-i801 driver to ever
cooperate on hardware like yours, we will have to teach the i2c-i801
driver how to only touch the configuration registers when it needs to
and how to restore all the settings when it is done. But at the moment
there is no safe way to do this anyway so I won't spend time on this.
The back-listing should work well enough.

-- 
Jean Delvare

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

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-11-05 17:33 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2008-11-02 11:25 ` Peter Mahlknecht
2008-11-05 17:33 ` Jean Delvare

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.