All of lore.kernel.org
 help / color / mirror / Atom feed
* LM93 vccp_limit_type "relative" does not work
@ 2005-05-19  6:25 David Knierim
  2005-05-19  6:25 ` Mark M. Hoffman
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: David Knierim @ 2005-05-19  6:25 UTC (permalink / raw)
  To: lm-sensors



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

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

* LM93 vccp_limit_type "relative" does not work
  2005-05-19  6:25 LM93 vccp_limit_type "relative" does not work David Knierim
@ 2005-05-19  6:25 ` Mark M. Hoffman
  2005-05-19  6:25 ` David Knierim
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Mark M. Hoffman @ 2005-05-19  6:25 UTC (permalink / raw)
  To: lm-sensors

Hi David:

* David Knierim <david_knierim@earthlink.net> [2004-10-14 16:19:09 -0400]:
> 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.

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.

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

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

> Have I missed something??

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

> Thanks for any input.

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

Regards,

-- 
Mark M. Hoffman
mhoffman@lightlink.com

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

* LM93 vccp_limit_type "relative" does not work
  2005-05-19  6:25 LM93 vccp_limit_type "relative" does not work David Knierim
                   ` (2 preceding siblings ...)
  2005-05-19  6:25 ` Mark M. Hoffman
@ 2005-05-19  6:25 ` Mark M. Hoffman
  2005-05-19  6:25 ` Mark M. Hoffman
  4 siblings, 0 replies; 6+ messages in thread
From: Mark M. Hoffman @ 2005-05-19  6:25 UTC (permalink / raw)
  To: lm-sensors

Hi David:

* Mark M. Hoffman <mhoffman@lightlink.com> [2004-10-14 22:58:18 -0400]:
> * David Knierim <david_knierim@earthlink.net> [2004-10-14 16:19:09 -0400]:
> > 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,

-- 
Mark M. Hoffman
mhoffman@lightlink.com

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

* LM93 vccp_limit_type "relative" does not work
  2005-05-19  6:25 LM93 vccp_limit_type "relative" does not work David Knierim
  2005-05-19  6:25 ` Mark M. Hoffman
@ 2005-05-19  6:25 ` David Knierim
  2005-05-19  6:25 ` Mark M. Hoffman
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: David Knierim @ 2005-05-19  6:25 UTC (permalink / raw)
  To: lm-sensors

Mark M. Hoffman wrote:
> Hi David:
> 
> * Mark M. Hoffman <mhoffman@lightlink.com> [2004-10-14 22:58:18 -0400]:
> 
>>* David Knierim <david_knierim@earthlink.net> [2004-10-14 16:19:09 -0400]:
>>
>>>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,
> 

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

--- kernel/chips/lm93.c.orig	2004-10-15 14:35:06.000000000 -0400
+++ kernel/chips/lm93.c	2004-10-15 14:37:43.000000000 -0400
@@ -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

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

* LM93 vccp_limit_type "relative" does not work
  2005-05-19  6:25 LM93 vccp_limit_type "relative" does not work David Knierim
  2005-05-19  6:25 ` Mark M. Hoffman
  2005-05-19  6:25 ` David Knierim
@ 2005-05-19  6:25 ` Mark M. Hoffman
  2005-05-19  6:25 ` Mark M. Hoffman
  2005-05-19  6:25 ` Mark M. Hoffman
  4 siblings, 0 replies; 6+ messages in thread
From: Mark M. Hoffman @ 2005-05-19  6:25 UTC (permalink / raw)
  To: lm-sensors

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!

* David Knierim <david_knierim@earthlink.net> [2004-10-15 17:52:57 -0400]:
> 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,

-- 
Mark M. Hoffman
mhoffman@lightlink.com

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

* LM93 vccp_limit_type "relative" does not work
  2005-05-19  6:25 LM93 vccp_limit_type "relative" does not work David Knierim
                   ` (3 preceding siblings ...)
  2005-05-19  6:25 ` Mark M. Hoffman
@ 2005-05-19  6:25 ` Mark M. Hoffman
  4 siblings, 0 replies; 6+ messages in thread
From: Mark M. Hoffman @ 2005-05-19  6:25 UTC (permalink / raw)
  To: lm-sensors

Hi David:

* Mark M. Hoffman <mhoffman@lightlink.com> [2004-10-18 23:21:29 -0400]:
> 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,

-- 
Mark M. Hoffman
mhoffman@lightlink.com

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

end of thread, other threads:[~2005-05-19  6:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-19  6:25 LM93 vccp_limit_type "relative" does not work David Knierim
2005-05-19  6:25 ` Mark M. Hoffman
2005-05-19  6:25 ` David Knierim
2005-05-19  6:25 ` Mark M. Hoffman
2005-05-19  6:25 ` Mark M. Hoffman
2005-05-19  6:25 ` Mark M. Hoffman

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.