Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux: Kernel

[78/99] hwmon: (it87) Fix VID reading on IT8718F/IT8720F

 

 

Linux kernel RSS feed   Index | Next | Previous | View Threaded


gregkh at suse

Nov 6, 2009, 2:15 PM

Post #1 of 3 (123 views)
Permalink
[78/99] hwmon: (it87) Fix VID reading on IT8718F/IT8720F

2.6.31-stable review patch. If anyone has any objections, please let us know.

------------------
From: Jean Delvare <khali [at] linux-fr>

commit 371dc4a6d8c3c74a9a1c74b87c2affb3fcef6500 upstream.

Comparing apples to bananas doesn't seem right. Consistently use the
chips enum for chip type comparisons, to avoid such bugs in the
future.

The bug has been there since support for the IT8718F was added, so
VID never worked for this chip nor for the similar IT8720F.

Signed-off-by: Jean Delvare <khali [at] linux-fr>
Signed-off-by: Greg Kroah-Hartman <gregkh [at] suse>

---
drivers/hwmon/it87.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

--- a/drivers/hwmon/it87.c
+++ b/drivers/hwmon/it87.c
@@ -1028,12 +1028,11 @@ static int __init it87_find(unsigned sho
chip_type, *address, sio_data->revision);

/* Read GPIO config and VID value from LDN 7 (GPIO) */
- if (chip_type != IT8705F_DEVID) {
+ if (sio_data->type != it87) {
int reg;

superio_select(GPIO);
- if ((chip_type == it8718) ||
- (chip_type == it8720))
+ if (sio_data->type == it8718 || sio_data->type == it8720)
sio_data->vid_value = superio_inb(IT87_SIO_VID_REG);

reg = superio_inb(IT87_SIO_PINX2_REG);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


w at 1wt

Nov 7, 2009, 7:37 AM

Post #2 of 3 (116 views)
Permalink
Re: [Stable-review] [78/99] hwmon: (it87) Fix VID reading on IT8718F/IT8720F [In reply to]

Hi Greg,

On Fri, Nov 06, 2009 at 02:15:16PM -0800, Greg KH wrote:
> 2.6.31-stable review patch. If anyone has any objections, please let us know.

I noticed this one was not merged into 2.6.27.39. I suspect it is
just because it did not apply since IT8720F was not present there.
However I think the test still needs fixing, though I'm not well
qualified to judge about that.

Jean, do you have any opinion on this matter ?

Thanks,
Willy

> ------------------
> From: Jean Delvare <khali [at] linux-fr>
>
> commit 371dc4a6d8c3c74a9a1c74b87c2affb3fcef6500 upstream.
>
> Comparing apples to bananas doesn't seem right. Consistently use the
> chips enum for chip type comparisons, to avoid such bugs in the
> future.
>
> The bug has been there since support for the IT8718F was added, so
> VID never worked for this chip nor for the similar IT8720F.
>
> Signed-off-by: Jean Delvare <khali [at] linux-fr>
> Signed-off-by: Greg Kroah-Hartman <gregkh [at] suse>
>
> ---
> drivers/hwmon/it87.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> --- a/drivers/hwmon/it87.c
> +++ b/drivers/hwmon/it87.c
> @@ -1028,12 +1028,11 @@ static int __init it87_find(unsigned sho
> chip_type, *address, sio_data->revision);
>
> /* Read GPIO config and VID value from LDN 7 (GPIO) */
> - if (chip_type != IT8705F_DEVID) {
> + if (sio_data->type != it87) {
> int reg;
>
> superio_select(GPIO);
> - if ((chip_type == it8718) ||
> - (chip_type == it8720))
> + if (sio_data->type == it8718 || sio_data->type == it8720)
> sio_data->vid_value = superio_inb(IT87_SIO_VID_REG);
>
> reg = superio_inb(IT87_SIO_PINX2_REG);
>
>
> _______________________________________________
> Stable-review mailing list
> Stable-review [at] linux
> http://linux.kernel.org/mailman/listinfo/stable-review
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/


khali at linux-fr

Nov 7, 2009, 9:52 AM

Post #3 of 3 (110 views)
Permalink
Re: [Stable-review] [78/99] hwmon: (it87) Fix VID reading on IT8718F/IT8720F [In reply to]

Salut Willy,

On Sat, 7 Nov 2009 16:37:42 +0100, Willy Tarreau wrote:
> On Fri, Nov 06, 2009 at 02:15:16PM -0800, Greg KH wrote:
> > 2.6.31-stable review patch. If anyone has any objections, please let us know.
>
> I noticed this one was not merged into 2.6.27.39. I suspect it is
> just because it did not apply since IT8720F was not present there.
> However I think the test still needs fixing, though I'm not well
> qualified to judge about that.
>
> Jean, do you have any opinion on this matter ?

You are totally right. I originally wrote: "it won't apply to 2.6.27
because IT8720F support was added in 2.6.29. I'll send a separate patch
for 2.6.27." I wrote the patch in question but apparently forgot to
send it. My bad, I'll do that right now.

--
Jean Delvare
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo [at] vger
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Linux kernel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.