All of lore.kernel.org
 help / color / mirror / Atom feed
* [lm-sensors] PATCH: hwmon-lm78-detect-isa-with-chipid-0x20.patch
@ 2007-07-24 21:36 Hans de Goede
  2007-07-25  1:55 ` Mark M. Hoffman
  2007-07-25  9:51 ` Jean Delvare
  0 siblings, 2 replies; 3+ messages in thread
From: Hans de Goede @ 2007-07-24 21:36 UTC (permalink / raw)
  To: lm-sensors

[-- Attachment #1: Type: text/plain, Size: 841 bytes --]

Mark,

Here is a small but important bugfix to the lm78 driver. I found out about this
problem because a Fedora user filed a bug that the lm78 driver no longer worked
on his system: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=249428

The problem is that sometime ago the isa lm78 detection was made more stringent
and this new code now checks the chip-id, but does not accept a chip-id of 20h,
however a chip-id of 20h is valid, and is excepted in the main probe function
of the driver, see line 551. This fixed also makes the isa detection code
accept the chip-id of 0x20 fixing this issue.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>

Please include this in the next batch to be send to Linus so that it will get 
into 2.6.23, this is a regression rendering the lm78 driver not working in 
certain cases.

Regards,

Hans

[-- Attachment #2: hwmon-lm78-detect-isa-with-chipid-0x20.patch --]
[-- Type: text/x-patch, Size: 1269 bytes --]

Mark,

Here is a small but important bugfix to the lm78 driver. I found out about this
problem because a Fedora user filed a bug that the lm78 driver no longer worked
on his system: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=249428

The problem is that sometime ago the isa lm78 detection was made more stringent
and this new code now checks the chip-id, but does not accept a chip-id of 20h,
however a chip-id of 20h is valid, and is excepted in the main probe function
of the driver, see line 551. This fixed also makes the isa detection code
accept the chip-id of 0x20 fixing this issue.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
diff -up linux-2.6.22.x86_64/drivers/hwmon/lm78.c~ linux-2.6.22.x86_64/drivers/hwmon/lm78.c
--- linux-2.6.22.x86_64/drivers/hwmon/lm78.c~	2007-07-24 23:26:10.000000000 +0200
+++ linux-2.6.22.x86_64/drivers/hwmon/lm78.c	2007-07-24 23:26:10.000000000 +0200
@@ -864,7 +864,7 @@ static int __init lm78_isa_found(unsigne
 	/* Determine the chip type */
 	outb_p(LM78_REG_CHIPID, address + LM78_ADDR_REG_OFFSET);
 	val = inb_p(address + LM78_DATA_REG_OFFSET);
-	if (val == 0x00			/* LM78 */
+	if (val == 0x00 || val == 0x20	/* LM78 */
 	 || val == 0x40			/* LM78-J */
 	 || (val & 0xfe) == 0xc0)	/* LM79 */
 		found = 1;

[-- Attachment #3: Type: text/plain, Size: 153 bytes --]

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

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

* Re: [lm-sensors] PATCH: hwmon-lm78-detect-isa-with-chipid-0x20.patch
  2007-07-24 21:36 [lm-sensors] PATCH: hwmon-lm78-detect-isa-with-chipid-0x20.patch Hans de Goede
@ 2007-07-25  1:55 ` Mark M. Hoffman
  2007-07-25  9:51 ` Jean Delvare
  1 sibling, 0 replies; 3+ messages in thread
From: Mark M. Hoffman @ 2007-07-25  1:55 UTC (permalink / raw)
  To: lm-sensors

Hi Hans:

* Hans de Goede <j.w.r.degoede@hhs.nl> [2007-07-24 23:36:00 +0200]:
> Mark,
> 
> Here is a small but important bugfix to the lm78 driver. I found out about this
> problem because a Fedora user filed a bug that the lm78 driver no longer worked
> on his system: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id$9428
> 
> The problem is that sometime ago the isa lm78 detection was made more stringent
> and this new code now checks the chip-id, but does not accept a chip-id of 20h,
> however a chip-id of 20h is valid, and is excepted in the main probe function
> of the driver, see line 551. This fixed also makes the isa detection code
> accept the chip-id of 0x20 fixing this issue.
> 
> Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
> diff -up linux-2.6.22.x86_64/drivers/hwmon/lm78.c~ linux-2.6.22.x86_64/drivers/hwmon/lm78.c
> --- linux-2.6.22.x86_64/drivers/hwmon/lm78.c~	2007-07-24 23:26:10.000000000 +0200
> +++ linux-2.6.22.x86_64/drivers/hwmon/lm78.c	2007-07-24 23:26:10.000000000 +0200
> @@ -864,7 +864,7 @@ static int __init lm78_isa_found(unsigne
>  	/* Determine the chip type */
>  	outb_p(LM78_REG_CHIPID, address + LM78_ADDR_REG_OFFSET);
>  	val = inb_p(address + LM78_DATA_REG_OFFSET);
> -	if (val = 0x00			/* LM78 */
> +	if (val = 0x00 || val = 0x20	/* LM78 */
>  	 || val = 0x40			/* LM78-J */
>  	 || (val & 0xfe) = 0xc0)	/* LM79 */
>  		found = 1;

Applied to testing, thanks.

Regards,

-- 
Mark M. Hoffman
mhoffman@lightlink.com


_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

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

* Re: [lm-sensors] PATCH: hwmon-lm78-detect-isa-with-chipid-0x20.patch
  2007-07-24 21:36 [lm-sensors] PATCH: hwmon-lm78-detect-isa-with-chipid-0x20.patch Hans de Goede
  2007-07-25  1:55 ` Mark M. Hoffman
@ 2007-07-25  9:51 ` Jean Delvare
  1 sibling, 0 replies; 3+ messages in thread
From: Jean Delvare @ 2007-07-25  9:51 UTC (permalink / raw)
  To: lm-sensors


On 7/24/2007, "Hans de Goede" <j.w.r.degoede@hhs.nl> wrote:
>Here is a small but important bugfix to the lm78 driver. I found out about
>this problem because a Fedora user filed a bug that the lm78 driver no
>longer worked on his system:
>https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id$9428
>
>The problem is that sometime ago the isa lm78 detection was made more
>stringent and this new code now checks the chip-id, but does not accept
>a chip-id of 20h, however a chip-id of 20h is valid, and is excepted in
>the main probe function of the driver, see line 551. This fixed also
>makes the isa detection code accept the chip-id of 0x20 fixing this
>issue.
>
>Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>

Acked-by: Jean Delvare <khali@linux-fr.org>

--
Jean Delvare

_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors

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

end of thread, other threads:[~2007-07-25  9:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-24 21:36 [lm-sensors] PATCH: hwmon-lm78-detect-isa-with-chipid-0x20.patch Hans de Goede
2007-07-25  1:55 ` Mark M. Hoffman
2007-07-25  9:51 ` Jean Delvare

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.