Jean Delvare | 1 Nov 2008 10:39
Gravatar

Re: ACPI reads wrong temperature after loading em28xx_cx25843

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 <at> 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
(Continue reading)

Markus Rechberger | 1 Nov 2008 16:28
Picon

Re: ACPI reads wrong temperature after loading em28xx_cx25843

On Sat, Nov 1, 2008 at 10:39 AM, Jean Delvare <khali <at> 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 <at> 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?
>

(Continue reading)

Jean Delvare | 1 Nov 2008 17:14
Gravatar

Re: ACPI reads wrong temperature after loading em28xx_cx25843

On Sat, 1 Nov 2008 16:28:40 +0100, Markus Rechberger wrote:
> On Sat, Nov 1, 2008 at 10:39 AM, Jean Delvare <khali <at> 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.

(Continue reading)

Markus Rechberger | 1 Nov 2008 18:11
Picon

Re: ACPI reads wrong temperature after loading em28xx_cx25843

On Sat, Nov 1, 2008 at 5:14 PM, Jean Delvare <khali <at> 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 <at> 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.
>
(Continue reading)

Jean Delvare | 1 Nov 2008 18:33
Gravatar

Re: ACPI reads wrong temperature after loading em28xx_cx25843

On Sat, 1 Nov 2008 18:11:26 +0100, Markus Rechberger wrote:
> On Sat, Nov 1, 2008 at 5:14 PM, Jean Delvare <khali <at> 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 <at> lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

Peter Mahlknecht | 1 Nov 2008 19:47
Picon

Re: ACPI reads wrong temperature after loading em28xx_cx25843

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

Peter Mahlknecht | 1 Nov 2008 23:16
Picon

Re: ACPI reads wrong temperature after loading em28xx_cx25843

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

Jean Delvare | 2 Nov 2008 10:07
Gravatar

Re: ACPI reads wrong temperature after loading em28xx_cx25843

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
(Continue reading)

Peter Mahlknecht | 2 Nov 2008 12:25
Picon

Re: ACPI reads wrong temperature after loading em28xx_cx25843

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)
> 
(Continue reading)

shaul Karl | 2 Nov 2008 16:17
Picon
Favicon

tempx_max_hyst > tempx_max?

etc/sensors3.conf of lm-sensors-3 (1:3.0.2-1+b2) in Debian states that

    # Think of tempx_max as 'alarm set' and tempx_max_hyst as 'alarm clear'
    # thresholds. In most cases the 'max' value should be higher than
    # the 'max_hyst' value by several degrees.

  In what cases would you set the 'max' value equal to the 'max_hyst'
value? Is it pointless for the 'max_hyst' value to be higher than the
'max' value? 
  I would say that the last statement about tempx_max_hyst > tempx_max
is confusing.

_______________________________________________
lm-sensors mailing list
lm-sensors <at> lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors


Gmane