From: jthiessen@penguincomputing.com (Justin Thiessen)
To: LM Sensors <sensors@stimpy.netroedge.com>
Cc: greg@kroah.com, phil@netroedge.com, linux-kernel@vger.kernel.org
Subject: Ticket #1851 - PATCH for adm1026.c, kernel 2.6.10-bk6
Date: Thu, 19 May 2005 06:25:28 +0000 [thread overview]
Message-ID: <20050103194355.GA11979@penguincomputing.com> (raw)
In-Reply-To: <20050101001205.6b2a44d3.khali@linux-fr.org>
On Sat, Jan 01, 2005 at 12:12:05AM +0100, Jean Delvare wrote:
> > anybody see how to get a divide by zero in 2.6 adm1026 set_fan_1_min()
> > ??? It looks fine to me...
> >
> > <http://secure.netroedge.com/~lm78/readticket.cgi?ticket\x1851>
>
> Easy. Try setting fan1_min or fan1_div before ever *reading* from the
> sysfs files. The update fonction not having been called, fan_div[0] is
> equal to 0.
>
> Justin, can you confirm and provide a patch to fix the issue?
Sorry for the slow response. Real World vacation time intervened.
Yes, I confirmed the reported problem. The patch below should fix it...
It should also fix any other values-not-initialized- to-hardware-defaults
issues.
Signed-off-by: Justin Thiessen <jthiessen@penguincomputing.com>
----------------
--- linux-2.6.10/drivers/i2c/chips/adm1026.c.orig 2005-01-02 15:21:58.000000000 -0800
+++ linux-2.6.10/drivers/i2c/chips/adm1026.c 2005-01-02 16:09:52.000000000 -0800
@@ -1752,6 +1752,10 @@ int adm1026_detect(struct i2c_adapter *a
device_create_file(&new_client->dev, &dev_attr_temp2_auto_point2_pwm);
device_create_file(&new_client->dev, &dev_attr_temp3_auto_point2_pwm);
device_create_file(&new_client->dev, &dev_attr_analog_out);
+
+ /* Make sure hardware defaults are read into data structure */
+ adm1026_update_device(&new_client->dev);
+
return 0;
/* Error out and cleanup code */
WARNING: multiple messages have this Message-ID (diff)
From: Justin Thiessen <jthiessen@penguincomputing.com>
To: LM Sensors <sensors@stimpy.netroedge.com>
Cc: greg@kroah.com, phil@netroedge.com, linux-kernel@vger.kernel.org
Subject: Re: Ticket #1851 - PATCH for adm1026.c, kernel 2.6.10-bk6
Date: Mon, 3 Jan 2005 11:43:55 -0800 [thread overview]
Message-ID: <20050103194355.GA11979@penguincomputing.com> (raw)
In-Reply-To: <20050101001205.6b2a44d3.khali@linux-fr.org>
On Sat, Jan 01, 2005 at 12:12:05AM +0100, Jean Delvare wrote:
> > anybody see how to get a divide by zero in 2.6 adm1026 set_fan_1_min()
> > ??? It looks fine to me...
> >
> > <http://secure.netroedge.com/~lm78/readticket.cgi?ticket=1851>
>
> Easy. Try setting fan1_min or fan1_div before ever *reading* from the
> sysfs files. The update fonction not having been called, fan_div[0] is
> equal to 0.
>
> Justin, can you confirm and provide a patch to fix the issue?
Sorry for the slow response. Real World vacation time intervened.
Yes, I confirmed the reported problem. The patch below should fix it...
It should also fix any other values-not-initialized- to-hardware-defaults
issues.
Signed-off-by: Justin Thiessen <jthiessen@penguincomputing.com>
----------------
--- linux-2.6.10/drivers/i2c/chips/adm1026.c.orig 2005-01-02 15:21:58.000000000 -0800
+++ linux-2.6.10/drivers/i2c/chips/adm1026.c 2005-01-02 16:09:52.000000000 -0800
@@ -1752,6 +1752,10 @@ int adm1026_detect(struct i2c_adapter *a
device_create_file(&new_client->dev, &dev_attr_temp2_auto_point2_pwm);
device_create_file(&new_client->dev, &dev_attr_temp3_auto_point2_pwm);
device_create_file(&new_client->dev, &dev_attr_analog_out);
+
+ /* Make sure hardware defaults are read into data structure */
+ adm1026_update_device(&new_client->dev);
+
return 0;
/* Error out and cleanup code */
next prev parent reply other threads:[~2005-05-19 6:25 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-19 6:25 Ticket #1851 Mark Studebaker
2005-05-19 6:25 ` Jean Delvare
2005-01-03 19:43 ` Justin Thiessen [this message]
2005-05-19 6:25 ` Ticket #1851 - PATCH for adm1026.c, kernel 2.6.10-bk6 Justin Thiessen
2005-01-03 19:10 ` Jean Delvare
2005-05-19 6:25 ` Jean Delvare
2005-01-03 21:37 ` Ticket #1851 - PATCH (take 2) " Justin Thiessen
2005-05-19 6:25 ` Justin Thiessen
2005-01-03 20:52 ` Andreas Dilger
2005-05-19 6:25 ` Andreas Dilger
2005-01-03 21:10 ` Jean Delvare
2005-05-19 6:25 ` Jean Delvare
2005-01-03 22:12 ` Justin Thiessen
2005-05-19 6:25 ` Justin Thiessen
2005-01-12 18:50 ` PATCH (take 3) for adm1026.c, kernel 2.6.10-bk14 Justin Thiessen
2005-05-19 6:25 ` Justin Thiessen
2005-01-12 18:55 ` Greg KH
2005-05-19 6:25 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050103194355.GA11979@penguincomputing.com \
--to=jthiessen@penguincomputing.com \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=phil@netroedge.com \
--cc=sensors@stimpy.netroedge.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.