* adm1021 (probably) does something VERY,VERY BAD
2005-05-19 6:24 adm1021 (probably) does something VERY,VERY BAD Eric
@ 2005-05-19 6:24 ` Jean Delvare
2005-05-19 6:24 ` Mark Studebaker
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Jean Delvare @ 2005-05-19 6:24 UTC (permalink / raw)
To: lm-sensors
[Please reply to the list, not to me]
Quoting Eric <plukje@gmx.net>:
> Based on the output of sensors-detect I insmodded adm1021:
>
> Driver `adm1021' (should be inserted):
> Detects correctly:
> * Bus `SMBus I801 adapter at 0c00' (Algorithm unavailable)
> Busdriver `i2c-i801', I2C address 0x4e
> Chip `National Semiconductor LM84' (confidence: 5)
>
> The module was build from a 2.6.5-rc1 kernel tree (SMP). After
> insmodding the module the machine shut down instantly, which could
> have only been caused because the hardware detected _something_
> critical enough that it shut down the system immediatly. Initial
> tries to power up again were futile, only after unplugging
> and giving it a few minutes the machine came back up again (*phew*).
You're lucky it did come back. I think I remember we once had a report
of such a case and the system never came back :(
> I can't give you anything other helpfull information concerning what
> happened, simply because there was none given. However I put the
> details of the machine below.
I'd like the brand and model of the motherboard too.
> Whatever happened, it shouldn't have happened :-) (I'm just glad
> the machine came back on again.)
I actually think that whatever you have at 0x4e, it isn't an adm1021
compatible chip. You already have a full featured monitoring chip on
the board W83627HF, adding an old LM84 wouldn't make any sense.
That said, yes, we still should try to prevent what happened to you from
happening to others. This could include:
1* Refine sensors-detect again. I thought it was OK after my latest
changes, but obviously it isn't (providing this was sensors-detect from
lm_sensors 2.8.5). One thing that would help would be to know what the
mysterious chip is, and add detection for it in sensors-detect (even if
it's not a hardware monitoring chip). Any idea of what this could be?
2* Refine adm1021's detection procedure too.
3* Drop adm1021's limit init. This was already done in the 2.4 driver
and should have been done in 2.6 as well.
> let me know if you require any other information
I'd appreciate a dump of the faulty chip (i2cdump 0 0x2e), this could
help us find out what it is and possibly prevent it from being
recognized as an adm1021-compatible one.
Thanks and sorry for the trouble.
--
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
^ permalink raw reply [flat|nested] 13+ messages in thread* adm1021 (probably) does something VERY,VERY BAD
2005-05-19 6:24 adm1021 (probably) does something VERY,VERY BAD Eric
2005-05-19 6:24 ` Jean Delvare
@ 2005-05-19 6:24 ` Mark Studebaker
2005-05-19 6:24 ` Greg KH
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Mark Studebaker @ 2005-05-19 6:24 UTC (permalink / raw)
To: lm-sensors
This looks to me like a lm75-compatible or adm1021-compatible chip;
the address range 48-4f is traditionally for temperature sensors;
it wouldn't be that unusual for a board with a w83627hf (with 3 temp sensors)
to have another chip to provide additional temperatures.
I agree w/ Khali that you can watch the registers with i2cdump
(esp. at data address 0x00) to see if it varies with CPU load,
if so try loading lm75.
The first 4 locations look somewhat like temp, control, hyst, and max to me....
then again, maybe not.
I see the lm75 section in sensors-detect has grown a lot,
I don't pretend to understand it all but perhaps there is a new
case here or perhaps it is too restrictive?
Our first guess for a chip in the range 48-4f should always be lm75
or compatible.
Eric perhaps you can look at your board and find out what chip this is,
that would be a big help to us.
mds
Eric wrote:
> Well, I should have seen it, so consider me a stoopid as well :-)
>
> root@pathfinder eric # i2cdump 0 0x4e
> No size specified (using byte-data access)
> WARNING! This program can confuse your I2C bus, cause data loss and worse!
> I will probe file /dev/i2c-0, address 0x4e, mode byte
> You have five seconds to reconsider and press CTRL-C!
>
> 0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
> 00: 6d 2d 10 72 00 80 0f 00 00 00 ff 00 00 00 e0 ff m-?r.??.......?.
> 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> 30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> 40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> 50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> 60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> 70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> 80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> 90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
> f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
>
> Jean Delvare wrote:
>
>> Quoting Eric <plukje@gmx.net>:
>>
>>
>>> About the version I used, I couldn't find a version number in
>>> sensors-detect
>>>
>>
>> We don't include any version in it because it would be a real pain to
>> update it with each new release.
>>
>>
>>> but I'm fairly sure this is 2.8.5 (from sensors --version) or
>>> better.
>>>
>>
>> So you did the right thing, this was the right way to get the
>> information :)
>>
>>
>>> root@pathfinder eric # i2cdump 0 0x2e
>>>
>>
>> OK, I am too stupid. This was "i2cdump 0 0x4e", since the mysterious
>> chip is as 0x04e.
>>
>>
>
>
^ permalink raw reply [flat|nested] 13+ messages in thread* adm1021 (probably) does something VERY,VERY BAD
2005-05-19 6:24 adm1021 (probably) does something VERY,VERY BAD Eric
2005-05-19 6:24 ` Jean Delvare
2005-05-19 6:24 ` Mark Studebaker
@ 2005-05-19 6:24 ` Greg KH
2005-05-19 6:24 ` Eric
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Greg KH @ 2005-05-19 6:24 UTC (permalink / raw)
To: lm-sensors
On Thu, Mar 25, 2004 at 08:02:19PM +0100, Jean Delvare wrote:
> Hi Greg,
>
> Quoting myself:
>
> > 3* Drop adm1021's limit init. This was already done in the 2.4 driver
> > and should have been done in 2.6 as well.
>
> Here is a patch that does that. It also prevents bit 7 (and unused bits)
> of configuration register from being reset, as was discussed before:
> http://archives.andrew.net.au/lm-sensors/msg04593.html
> That second part needs to be backported to the 2.4 driver, and I will do
> so.
>
> Additionally, we get rid of a useless label.
>
> The patch is untested (I don't own any supported chip) but quite
> straightforward IMHO.
>
> Please apply,
Applied, thanks.
greg k-h
^ permalink raw reply [flat|nested] 13+ messages in thread* adm1021 (probably) does something VERY,VERY BAD
2005-05-19 6:24 adm1021 (probably) does something VERY,VERY BAD Eric
` (2 preceding siblings ...)
2005-05-19 6:24 ` Greg KH
@ 2005-05-19 6:24 ` Eric
2005-05-19 6:24 ` Jean Delvare
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Eric @ 2005-05-19 6:24 UTC (permalink / raw)
To: lm-sensors
root@pathfinder eric # i2cdump 0 0x4e w
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0, address 0x4e, mode word
You have five seconds to reconsider and press CTRL-C!
0,8 1,9 2,a 3,b 4,c 5,d 6,e 7,f
00: ff6d ff2d ff10 ff72 ff00 ff80 ff0f ff00
08: ff00 ff00 ffff ff00 ff00 ff00 ffe0 ffff
10: ff00 ff00 ff00 ff00 ff00 ff00 ff00 ff00
18: ff00 ff00 ff00 ff00 ff00 ff00 ff00 ff00
20: ff00 ff00 ff00 ff00 ff00 ff00 ff00 ff00
28: ff00 ff00 ff00 ff00 ff00 ff00 ff00 ff00
30: ff00 ff00 ff00 ff00 ff00 ff00 ff00 ff00
38: ff00 ff00 ff00 ff00 ff00 ff00 ff00 ff00
40: ff00 ff00 ff00 ff00 ff00 ff00 ff00 ff00
48: ff00 ff00 ff00 ff00 ff00 ff00 ff00 ff00
50: ff00 ff00 ff00 ff00 ff00 ff00 ff00 ff00
58: ff00 ff00 ff00 ff00 ff00 ff00 ff00 ff00
60: ff00 ff00 ff00 ff00 ff00 ff00 ff00 ff00
68: ff00 ff00 ff00 ff00 ff00 ff00 ff00 ff00
70: ff00 ff00 ff00 ff00 ff00 ff00 ff00 ff00
78: ff00 ff00 ff00 ff00 ff00 ff00 ff00 ff00
80: ff00 ff00 ff00 ff00 ff00 ff00 ff00 ff00
88: ff00 ff00 ff00 ff00 ff00 ff00 ff00 ff00
90: ff00 ff00 ff00 ff00 ff00 ff00 ff00 ff00
98: ff00 ff00 ff00 ff00 ff00 ff00 ff00 ff00
a0: ff00 ff00 ff00 ff00 ff00 ff00 ff00 ff00
a8: ff00 ff00 ff00 ff00 ff00 ff00 ff00 ff00
b0: ff00 ff00 ff00 ff00 ff00 ff00 ff00 ff00
b8: ff00 ff00 ff00 ff00 ff00 ff00 ff00 ff00
c0: ff00 ff00 ff00 ff00 ff00 ff00 ff00 ff00
c8: ff00 ff00 ff00 ff00 ff00 ff00 ff00 ff00
d0: ff00 ff00 ff00 ff00 ff00 ff00 ff00 ff00
d8: ff00 ff00 ff00 ff00 ff00 ff00 ff00 ff00
e0: ff00 ff00 ff00 ff00 ff00 ff00 ff00 ff00
e8: ff00 ff00 ff00 ff00 ff00 ff00 ff00 ff00
f0: ff00 ff00 ff00 ff00 ff00 ff00 ff00 ff00
f8: ff00 ff00 ff00 ff00 ff00 ff00 ff00 ff00
root@pathfinder eric #
Regards,
Eric
Jean Delvare wrote:
>>This looks to me like a lm75-compatible or adm1021-compatible chip;
>>the address range 48-4f is traditionally for temperature sensors;
>>it wouldn't be that unusual for a board with a w83627hf (with 3 temp
>>sensors) to have another chip to provide additional temperatures.
>>
>
>Granted, it could be an extra temperature sensor. Except that it doesn't
>change values, and shuts the system down when you try to use it ;)
>
>
>>I agree w/ Khali that you can watch the registers with i2cdump
>>(esp. at data address 0x00) to see if it varies with CPU load,
>>if so try loading lm75.
>>
>>The first 4 locations look somewhat like temp, control, hyst, and max
>>to me.... then again, maybe not.
>>
>
>109 degrees C seems slightly excessive for early spring, don't you
>think? Plus there is too much difference between hyst and max, and
>anyway hyst = 16 degrees C doesn't make much sense, and max = 114
>degrees C doesn't make any sense either.
>
>I'm sorry but that chip doesn't look like an LM75 to me at all, and
>since it was already proved that it wasn't adm1021-compatible...
>
>
>>I see the lm75 section in sensors-detect has grown a lot,
>>I don't pretend to understand it all but perhaps there is a new
>>case here or perhaps it is too restrictive?
>>
>
>It hasn't changed much. The extra code is mainly there to refine the
>confidence value we give to the chip (from 6 down to 3). The main
>detection trick is unchanged, and relies of the fact that the LM75
>addresses registers over 3 bits only, so values cycle every 8 bytes.
>This is obviously not the case here, but I agree that a LM75-compatible
>chip wouldn't *have* to behave the same way.
>
>
>>Our first guess for a chip in the range 48-4f should always be lm75
>>or compatible.
>>
>
>I don't see no reason for this. There are many more chips that live in
>this area, especially at 0x4c-0x4e, that are not compatible with the
>LM75 at all, and that are much more likely to be found in modern
>computers (Winbond-like emulation left apart).
>
>
>>Eric perhaps you can look at your board and find out what chip this
>>is, that would be a big help to us.
>>
>
>Sure it would.
>
>Also, Eric, could you try dumping the chip in word mode (i2cdump 0 0x4e
>w)? This will let us know is some registers are word-sized, which would
>help identify the chip.
>
>Thanks.
>
>
^ permalink raw reply [flat|nested] 13+ messages in thread* adm1021 (probably) does something VERY,VERY BAD
2005-05-19 6:24 adm1021 (probably) does something VERY,VERY BAD Eric
` (3 preceding siblings ...)
2005-05-19 6:24 ` Eric
@ 2005-05-19 6:24 ` Jean Delvare
2005-05-19 6:24 ` Eric
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Jean Delvare @ 2005-05-19 6:24 UTC (permalink / raw)
To: lm-sensors
Hi Greg,
Quoting myself:
> 3* Drop adm1021's limit init. This was already done in the 2.4 driver
> and should have been done in 2.6 as well.
Here is a patch that does that. It also prevents bit 7 (and unused bits)
of configuration register from being reset, as was discussed before:
http://archives.andrew.net.au/lm-sensors/msg04593.html
That second part needs to be backported to the 2.4 driver, and I will do
so.
Additionally, we get rid of a useless label.
The patch is untested (I don't own any supported chip) but quite
straightforward IMHO.
Please apply,
thanks.
--- linux-2.6.5-rc1/drivers/i2c/chips/adm1021.c.orig Sun Mar 21 18:32:50 2004
+++ linux-2.6.5-rc1/drivers/i2c/chips/adm1021.c Thu Mar 25 19:45:18 2004
@@ -98,10 +98,6 @@
they don't quite work like a thermostat the way the LM75 does. I.e.,
a lower temp than THYST actually triggers an alarm instead of
clearing it. Weird, ey? --Phil */
-#define adm1021_INIT_TOS 60
-#define adm1021_INIT_THYST 20
-#define adm1021_INIT_REMOTE_TOS 60
-#define adm1021_INIT_REMOTE_THYST 20
/* Each client has this additional data */
struct adm1021_data {
@@ -306,7 +302,7 @@
/* Tell the I2C layer a new client has arrived */
if ((err = i2c_attach_client(new_client)))
- goto error3;
+ goto error1;
/* Initialize the ADM1021 chip */
adm1021_init_client(new_client);
@@ -324,7 +320,6 @@
return 0;
-error3:
error1:
kfree(new_client);
error0:
@@ -333,17 +328,9 @@
static void adm1021_init_client(struct i2c_client *client)
{
- /* Initialize the adm1021 chip */
- adm1021_write_value(client, ADM1021_REG_TOS_W,
- adm1021_INIT_TOS);
- adm1021_write_value(client, ADM1021_REG_THYST_W,
- adm1021_INIT_THYST);
- adm1021_write_value(client, ADM1021_REG_REMOTE_TOS_W,
- adm1021_INIT_REMOTE_TOS);
- adm1021_write_value(client, ADM1021_REG_REMOTE_THYST_W,
- adm1021_INIT_REMOTE_THYST);
/* Enable ADC and disable suspend mode */
- adm1021_write_value(client, ADM1021_REG_CONFIG_W, 0);
+ adm1021_write_value(client, ADM1021_REG_CONFIG_W,
+ adm1021_read_value(client, ADM1021_REG_CONFIG_R) & 0xBF);
/* Set Conversion rate to 1/sec (this can be tinkered with) */
adm1021_write_value(client, ADM1021_REG_CONV_RATE_W, 0x04);
}
--
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
^ permalink raw reply [flat|nested] 13+ messages in thread* adm1021 (probably) does something VERY,VERY BAD
2005-05-19 6:24 adm1021 (probably) does something VERY,VERY BAD Eric
` (4 preceding siblings ...)
2005-05-19 6:24 ` Jean Delvare
@ 2005-05-19 6:24 ` Eric
2005-05-19 6:24 ` Jean Delvare
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Eric @ 2005-05-19 6:24 UTC (permalink / raw)
To: lm-sensors
Well, I should have seen it, so consider me a stoopid as well :-)
root@pathfinder eric # i2cdump 0 0x4e
No size specified (using byte-data access)
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0, address 0x4e, mode byte
You have five seconds to reconsider and press CTRL-C!
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: 6d 2d 10 72 00 80 0f 00 00 00 ff 00 00 00 e0 ff m-?r.??.......?.
10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
30: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
50: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
60: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
70: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
90: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Jean Delvare wrote:
>Quoting Eric <plukje@gmx.net>:
>
>
>>About the version I used, I couldn't find a version number in
>>sensors-detect
>>
>
>We don't include any version in it because it would be a real pain to
>update it with each new release.
>
>
>>but I'm fairly sure this is 2.8.5 (from sensors --version) or
>>better.
>>
>
>So you did the right thing, this was the right way to get the
>information :)
>
>
>>root@pathfinder eric # i2cdump 0 0x2e
>>
>
>OK, I am too stupid. This was "i2cdump 0 0x4e", since the mysterious
>chip is as 0x04e.
>
>
^ permalink raw reply [flat|nested] 13+ messages in thread* adm1021 (probably) does something VERY,VERY BAD
2005-05-19 6:24 adm1021 (probably) does something VERY,VERY BAD Eric
` (5 preceding siblings ...)
2005-05-19 6:24 ` Eric
@ 2005-05-19 6:24 ` Jean Delvare
2005-05-19 6:24 ` Jean Delvare
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Jean Delvare @ 2005-05-19 6:24 UTC (permalink / raw)
To: lm-sensors
Quoting Eric <plukje@gmx.net>:
> About the version I used, I couldn't find a version number in
> sensors-detect
We don't include any version in it because it would be a real pain to
update it with each new release.
> but I'm fairly sure this is 2.8.5 (from sensors --version) or
> better.
So you did the right thing, this was the right way to get the
information :)
> root@pathfinder eric # i2cdump 0 0x2e
OK, I am too stupid. This was "i2cdump 0 0x4e", since the mysterious
chip is as 0x04e.
--
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
^ permalink raw reply [flat|nested] 13+ messages in thread* adm1021 (probably) does something VERY,VERY BAD
2005-05-19 6:24 adm1021 (probably) does something VERY,VERY BAD Eric
` (6 preceding siblings ...)
2005-05-19 6:24 ` Jean Delvare
@ 2005-05-19 6:24 ` Jean Delvare
2005-05-19 6:24 ` Eric
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Jean Delvare @ 2005-05-19 6:24 UTC (permalink / raw)
To: lm-sensors
> root@pathfinder eric # i2cdump 0 0x4e w
> WARNING! This program can confuse your I2C bus, cause data loss and
> worse! I will probe file /dev/i2c-0, address 0x4e, mode word
> You have five seconds to reconsider and press CTRL-C!
>
> 0,8 1,9 2,a 3,b 4,c 5,d 6,e 7,f
> 00: ff6d ff2d ff10 ff72 ff00 ff80 ff0f ff00
> 08: ff00 ff00 ffff ff00 ff00 ff00 ffe0 ffff
> (...)
I.e. no, it doesn't support word mode.
--
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
^ permalink raw reply [flat|nested] 13+ messages in thread* adm1021 (probably) does something VERY,VERY BAD
2005-05-19 6:24 adm1021 (probably) does something VERY,VERY BAD Eric
` (7 preceding siblings ...)
2005-05-19 6:24 ` Jean Delvare
@ 2005-05-19 6:24 ` Eric
2005-05-19 6:24 ` Jean Delvare
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: Eric @ 2005-05-19 6:24 UTC (permalink / raw)
To: lm-sensors
'greetings all list members
(transcript of the original conversation is at the bottom)
> You're lucky it did come back. I think I remember we once had a report
> of such a case and the system never came back :(
Well the main reason I figured wanted to use this chip was to know what
was behind it :) Guess that was kinda stupid.
> I'd like the brand and model of the motherboard too.
The motherboard is an MSI-6728, which is also known as a MSI 865PE Neo2-PLS
see
http://www.msi.com.tw/program/products/mainboard/mbd/pro_mbd_detail.php?UIDR8
for more gory details.
> I actually think that whatever you have at 0x4e, it isn't an adm1021
> compatible chip. You already have a full featured monitoring chip on
> the board W83627HF, adding an old LM84 wouldn't make any sense.
Well I'm not that much sensor chips and all, but my guess was that it could
access data the W83627HF could not access.
About the version I used, I couldn't find a version number in sensors-detect
but I'm fairly sure this is 2.8.5 (from sensors --version) or better.
To exclude any possible miscommunications I added the entire adm1021_detect
function at the bottom of this email.
Kind regards,
Eric
root@pathfinder eric # i2cdump 0 0x2e
No size specified (using byte-data access)
WARNING! This program can confuse your I2C bus, cause data loss and worse!
I will probe file /dev/i2c-0, address 0x2e, mode byte
You have five seconds to reconsider and press CTRL-C!
0 1 2 3 4 5 6 7 8 9 a b c d e f 0123456789abcdef
00: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
10: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
20: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
30: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
40: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
50: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
60: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
70: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
80: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
90: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
a0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
b0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
c0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
d0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
e0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
f0: XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XX XXXXXXXXXXXXXXXX
root@pathfinder lib # cat /usr/sbin/sensors-detect |grep -A 52
adm1021_detect
sub adm1021_detect
{
my ($chip, $file,$addr) = @_;
return if $chip = 0 and i2c_smbus_read_byte_data($file,0xfe) != 0x41 ||
(i2c_smbus_read_byte_data($file,0xff) & 0xf0)
!= 0x00;
return if $chip = 1 and i2c_smbus_read_byte_data($file,0xfe) != 0x41 ||
(i2c_smbus_read_byte_data($file,0xff) & 0xf0)
!= 0x30;
return if $chip = 4 and i2c_smbus_read_byte_data($file,0xfe) != 0x49;
return if $chip = 5 and i2c_smbus_read_byte_data($file,0x04) != 0x00;
return if $chip = 6 and i2c_smbus_read_byte_data($file,0xfe) != 0x23;
return if $chip = 3 and i2c_smbus_read_byte_data($file,0xfe) != 0x4d ||
i2c_smbus_read_byte_data($file,0xff) != 0x01;
return if $chip = 7 and i2c_smbus_read_byte_data($file,0xfe) != 0x54;
# The remaining things are flaky at best. Perhaps something can be done
# with the fact that some registers are unreadable?
return if (i2c_smbus_read_byte_data($file,0x02) & 0x03) != 0;
# Extra checks for MAX1617 and LM84, since those are often misdetected
if ($chip = 2 || $chip = 5)
{
# Increase the misdetect value each time a temperature doesn't
# match reasonable expectations
my $misdetect = 0;
# Negative temperatures
$misdetect++ if ((my $lte=i2c_smbus_read_byte_data($file,0x00)) & 0x80);
$misdetect++ if ((my $rte=i2c_smbus_read_byte_data($file,0x01)) & 0x80);
# Negative high limits
my ($lhi, $rhi);
if (($lhi=i2c_smbus_read_byte_data($file,0x05)) & 0x80)
{
$misdetect++;
$lhi-%6;
}
if (($rhi=i2c_smbus_read_byte_data($file,0x07)) & 0x80)
{
$misdetect++;
$rhi-%6;
}
# Low limits over high limits
my $llo=i2c_smbus_read_byte_data($file,0x06);
my $rlo=i2c_smbus_read_byte_data($file,0x08);
$llo-%6 if ($llo & 0x80);
$rlo-%6 if ($rlo & 0x80);
$misdetect++ if $llo > $lhi;
$misdetect++ if $rlo > $rhi;
return if $misdetect >= 4;
# Also return if all six bytes have the same value
return if $lte = $rte and $lte = $lhi and $lte = $rhi
and $lte = $llo and $lte = $rlo;
}
return 3 if $chip = 2;
return 7 if $chip <= 3;
return 5;
}
Jean Delvare wrote:
> [Please reply to the list, not to me]
>
> Quoting Eric <plukje@gmx.net>:
>
>> Based on the output of sensors-detect I insmodded adm1021:
>>
>> Driver `adm1021' (should be inserted):
>> Detects correctly:
>> * Bus `SMBus I801 adapter at 0c00' (Algorithm unavailable)
>> Busdriver `i2c-i801', I2C address 0x4e
>> Chip `National Semiconductor LM84' (confidence: 5)
>>
>> The module was build from a 2.6.5-rc1 kernel tree (SMP). After
>> insmodding the module the machine shut down instantly, which could
>> have only been caused because the hardware detected _something_
>> critical enough that it shut down the system immediatly. Initial
>> tries to power up again were futile, only after unplugging
>> and giving it a few minutes the machine came back up again (*phew*).
>
>
> You're lucky it did come back. I think I remember we once had a report
> of such a case and the system never came back :(
>
>> I can't give you anything other helpfull information concerning what
>> happened, simply because there was none given. However I put the
>> details of the machine below.
>
>
> I'd like the brand and model of the motherboard too.
>
>> Whatever happened, it shouldn't have happened :-) (I'm just glad
>> the machine came back on again.)
>
>
> I actually think that whatever you have at 0x4e, it isn't an adm1021
> compatible chip. You already have a full featured monitoring chip on
> the board W83627HF, adding an old LM84 wouldn't make any sense.
>
> That said, yes, we still should try to prevent what happened to you from
> happening to others. This could include:
>
> 1* Refine sensors-detect again. I thought it was OK after my latest
> changes, but obviously it isn't (providing this was sensors-detect from
> lm_sensors 2.8.5). One thing that would help would be to know what the
> mysterious chip is, and add detection for it in sensors-detect (even if
> it's not a hardware monitoring chip). Any idea of what this could be?
>
> 2* Refine adm1021's detection procedure too.
>
> 3* Drop adm1021's limit init. This was already done in the 2.4 driver
> and should have been done in 2.6 as well.
>
>> let me know if you require any other information
>
>
> I'd appreciate a dump of the faulty chip (i2cdump 0 0x2e), this could
> help us find out what it is and possibly prevent it from being
> recognized as an adm1021-compatible one.
>
> Thanks and sorry for the trouble.
>
^ permalink raw reply [flat|nested] 13+ messages in thread* adm1021 (probably) does something VERY,VERY BAD
2005-05-19 6:24 adm1021 (probably) does something VERY,VERY BAD Eric
` (8 preceding siblings ...)
2005-05-19 6:24 ` Eric
@ 2005-05-19 6:24 ` Jean Delvare
2005-05-19 6:24 ` Jean Delvare
2005-05-19 6:24 ` Jean Delvare
11 siblings, 0 replies; 13+ messages in thread
From: Jean Delvare @ 2005-05-19 6:24 UTC (permalink / raw)
To: lm-sensors
Quoting Eric <plukje@gmx.net>:
> root@pathfinder eric # i2cdump 0 0x4e
> (...)
Great, at least we have a preliminary idea of what it does look like. I
don't have an idea about what it can be though.
It would be interesting if you could try to dump it again from times to
times, preferably with changing conditions (e.g. after a reboot, or
under heavy CPU load) and see if any value change.
What I plan to do is use the constant parts of this dump to recognize
this chip, whatever it is, and prevent sensors-detect from declaring it
a MAX1617 or LM84 (the two easily misdetected chips of the ADM1021
family).
Thanks.
--
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
^ permalink raw reply [flat|nested] 13+ messages in thread* adm1021 (probably) does something VERY,VERY BAD
2005-05-19 6:24 adm1021 (probably) does something VERY,VERY BAD Eric
` (9 preceding siblings ...)
2005-05-19 6:24 ` Jean Delvare
@ 2005-05-19 6:24 ` Jean Delvare
2005-05-19 6:24 ` Jean Delvare
11 siblings, 0 replies; 13+ messages in thread
From: Jean Delvare @ 2005-05-19 6:24 UTC (permalink / raw)
To: lm-sensors
Quoting Eric <plukje@gmx.net>:
> Well the main reason I figured wanted to use this chip was to know
> what was behind it :) Guess that was kinda stupid.
Well, sensors-detect told you to do it, you had no reason not to do it.
I wouldn't have, because of the other well-known chip on the board, and
because the detected chip was an LM84, which I know is rare, old and
easily misdetected. But anyone not as familiar with the project as I am
would have done the same as you I guess.
--
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
^ permalink raw reply [flat|nested] 13+ messages in thread* adm1021 (probably) does something VERY,VERY BAD
2005-05-19 6:24 adm1021 (probably) does something VERY,VERY BAD Eric
` (10 preceding siblings ...)
2005-05-19 6:24 ` Jean Delvare
@ 2005-05-19 6:24 ` Jean Delvare
11 siblings, 0 replies; 13+ messages in thread
From: Jean Delvare @ 2005-05-19 6:24 UTC (permalink / raw)
To: lm-sensors
> This looks to me like a lm75-compatible or adm1021-compatible chip;
> the address range 48-4f is traditionally for temperature sensors;
> it wouldn't be that unusual for a board with a w83627hf (with 3 temp
> sensors) to have another chip to provide additional temperatures.
Granted, it could be an extra temperature sensor. Except that it doesn't
change values, and shuts the system down when you try to use it ;)
> I agree w/ Khali that you can watch the registers with i2cdump
> (esp. at data address 0x00) to see if it varies with CPU load,
> if so try loading lm75.
>
> The first 4 locations look somewhat like temp, control, hyst, and max
> to me.... then again, maybe not.
109 degrees C seems slightly excessive for early spring, don't you
think? Plus there is too much difference between hyst and max, and
anyway hyst = 16 degrees C doesn't make much sense, and max = 114
degrees C doesn't make any sense either.
I'm sorry but that chip doesn't look like an LM75 to me at all, and
since it was already proved that it wasn't adm1021-compatible...
> I see the lm75 section in sensors-detect has grown a lot,
> I don't pretend to understand it all but perhaps there is a new
> case here or perhaps it is too restrictive?
It hasn't changed much. The extra code is mainly there to refine the
confidence value we give to the chip (from 6 down to 3). The main
detection trick is unchanged, and relies of the fact that the LM75
addresses registers over 3 bits only, so values cycle every 8 bytes.
This is obviously not the case here, but I agree that a LM75-compatible
chip wouldn't *have* to behave the same way.
> Our first guess for a chip in the range 48-4f should always be lm75
> or compatible.
I don't see no reason for this. There are many more chips that live in
this area, especially at 0x4c-0x4e, that are not compatible with the
LM75 at all, and that are much more likely to be found in modern
computers (Winbond-like emulation left apart).
> Eric perhaps you can look at your board and find out what chip this
> is, that would be a big help to us.
Sure it would.
Also, Eric, could you try dumping the chip in word mode (i2cdump 0 0x4e
w)? This will let us know is some registers are word-sized, which would
help identify the chip.
Thanks.
--
Jean Delvare
http://www.ensicaen.ismra.fr/~delvare/
^ permalink raw reply [flat|nested] 13+ messages in thread