Skip to contentSkip to conversation

LM93 vccp_limit_type "relative" does not work

DISCUSSION David Knierim 2 participants 6 messages May 19, 2005

lore
Share & tools
lore
#0 lore raw

I've been trying to get the "relative" mode of the LM93 to work. I
have used i2cdump, i2cset and the spec sheet to get an idea how this feature works. However, what it will take to get the LM93 to do it is beyond my abilities, I am afraid.

I'm using the CVS version from Oct. 12, which has all current LM93 fixes integrated.

In order to use the feature the following steps need to be done:
1. set thresholds in register 0xb2 and 0xb3 (pg 60 of spec sheet)
2. unmask alarms in register 0xed (pg 84 of the spec sheet)
3. read alarms in register 0x4B (pg 48 of the spec sheet)
4. dynamically update the thresholds for libsensors based on VID input
and settings in #1

I have tried to use the vccp_limit_type load-time parameter. It should do this, but I get lost trying to figure out what it is actually doing.

It definately does work on item #4 and if I change the thresholds in registers 0xb2 and/or 0xb3, the thresholds displayed by sensors(1) change. However, they do not match what is documented in the spec sheet.

On my box, registers 0xb2 and 0xb3 are 00 on startup. Loading the driver makes no difference, so step #1 does not appear to be being done.

On my box, the register 0xed has the dynamic vccp limit masked out when the box boots up. Loading the driver makes no difference, so step #2 does not appear to be being done.

No matter what state is used for the vccp_limit_type load-time parameter, the alarms as displayes by sensors(1) are from the IN_7 and IN_8 voltage error bits.

Have I missed something??

Thanks for any input.

David

#1 lore raw

Hi David:

Quoted 18 lines · David Knierim

I've been trying to get the "relative" mode of the LM93 to work. I
have used i2cdump, i2cset and the spec sheet to get an idea how this feature works. However, what it will take to get the LM93 to do it is beyond my abilities, I am afraid.

I'm using the CVS version from Oct. 12, which has all current LM93 fixes integrated.

In order to use the feature the following steps need to be done:
1. set thresholds in register 0xb2 and 0xb3 (pg 60 of spec sheet)
2. unmask alarms in register 0xed (pg 84 of the spec sheet)
3. read alarms in register 0x4B (pg 48 of the spec sheet)
4. dynamically update the thresholds for libsensors based on VID input
and settings in #1

I have tried to use the vccp_limit_type load-time parameter. It should do this, but I get lost trying to figure out what it is actually doing.

Quoted 6 lines

It definately does work on item #4 and if I change the thresholds in registers 0xb2 and/or 0xb3, the thresholds displayed by sensors(1) change. However, they do not match what is documented in the spec sheet.

On my box, registers 0xb2 and 0xb3 are 00 on startup. Loading the driver makes no difference, so step #1 does not appear to be being done.

We don't initialize limits at driver init anymore... the idea is that the hardware defaults (BIOS or otherwise) are safer than whatever defaults we would use. So, these will remain as we found them until you explicitly change them by e.g. using 'sensors -s' or writing the /proc files.

Quoted 3 lines

On my box, the register 0xed has the dynamic vccp limit masked out when the box boots up. Loading the driver makes no difference, so step #2 does not appear to be being done.

Oops, that's a bug.

Quoted 3 lines

No matter what state is used for the vccp_limit_type load-time parameter, the alarms as displayes by sensors(1) are from the IN_7 and IN_8 voltage error bits.

That's also a bug.

Quoted 1 line

Have I missed something??

Nope, looks like I did though. :) I'll work up a patch soon, if not tonight.

Quoted 1 line

Thanks for any input.

Thanks again for your very thorough testing. I wish all bug reports were like yours.

Regards,

Signature · 2 lines
Mark M. Hoffman
[email protected]
#2 lore raw
In reply to David Knierim

Hi David:

Quoted 6 lines · Mark M. Hoffman
Quoted 3 lines · David Knierim

On my box, the register 0xed has the dynamic vccp limit masked out when the box boots up. Loading the driver makes no difference, so step #2 does not appear to be being done.

Oops, that's a bug.

Also, #VRDHOT errors were masked by default - not sure if you had tested that yet. I fixed it as well in the same CVS commit.

Regards,

Signature · 2 lines
Mark M. Hoffman
[email protected]
#3 lore raw
In reply to David Knierim

Hi David:

Your patch looks good, but won't apply for some reason. As Khali mentioned in another message... please try to fix that and resend. Thanks!

Quoted 3 lines · David Knierim

alarming didn't work right, but I figured out what was wrong. The
attached patch fixes it and adds messages if the read retry counts are exceeded.

Regards,

Signature · 2 lines
Mark M. Hoffman
[email protected]
#4 lore raw
In reply to David Knierim
Quoted 10 lines · Mark M. Hoffman

Hi David:

Quoted 6 lines · Mark M. Hoffman
Quoted 3 lines · David Knierim

On my box, the register 0xed has the dynamic vccp limit masked out when the box boots up. Loading the driver makes no difference, so step #2 does not appear to be being done.

Quoted 8 lines
Quoted 1 line

Oops, that's a bug.

Also, #VRDHOT errors were masked by default - not sure if you had tested that yet. I fixed it as well in the same CVS commit.

Regards,

Mark,
Thanks for the fast turn around. I'm very impressed. The
alarming didn't work right, but I figured out what was wrong. The
attached patch fixes it and adds messages if the read retry counts are exceeded.

David Knierim

chips/lm93.c renamed from chips/lm93.c.orig +4 -2
@@ -382,6 +382,7 @@
  	}
 
  	/* <TODO> what to return in case of error? */
+	printk(KERN_ERR "lm93.o: All read byte retries failed!!\n");
  	return 0;
  }
 
@@ -416,6 +417,7 @@
  	}
 
  	/* <TODO> what to return in case of error? */
+	printk(KERN_ERR "lm93.o: All read word retries failed!!\n");
  	return 0;
  }
 
@@ -849,12 +851,12 @@
  	result  = b1.host_status_2 & 0x3f;
 
  	if (vccp_limit_type[0])
-		result |= (b1.host_status_1 & 0x10) << 2;
+		result |= (b1.host_status_4 & 0x10) << 2;
  	else
  		result |= b1.host_status_2 & 0x40;
 
  	if (vccp_limit_type[1])
-		result |= (b1.host_status_1 & 0x20) << 2;
+		result |= (b1.host_status_4 & 0x20) << 2;
  	else
  		result |= b1.host_status_2 & 0x80
#5 lore raw
In reply to David Knierim

Hi David:

Quoted 2 lines · Mark M. Hoffman

Your patch looks good, but won't apply for some reason. As Khali mentioned in another message... please try to fix that and resend. Thanks!

Nevermind, I just applied it using "-l" to ignore whitespace damage. Please try to fix that for any future patches.

Regards,

Signature · 2 lines
Mark M. Hoffman
[email protected]