From: Greg Kroah-Hartman Date: Tue, 7 Feb 2012 21:54:26 +0000 (-0800) Subject: 3.2-stable patches X-Git-Tag: v3.0.21~11 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1d983b115277c936712feb2e61d3a71c82f0870d;p=thirdparty%2Fkernel%2Fstable-queue.git 3.2-stable patches added patches: hwmon-w83627ehf-fix-number-of-fans-for-nct6776f.patch --- diff --git a/queue-3.2/hwmon-w83627ehf-fix-number-of-fans-for-nct6776f.patch b/queue-3.2/hwmon-w83627ehf-fix-number-of-fans-for-nct6776f.patch new file mode 100644 index 00000000000..1f151ee6c5f --- /dev/null +++ b/queue-3.2/hwmon-w83627ehf-fix-number-of-fans-for-nct6776f.patch @@ -0,0 +1,53 @@ +From 585c0fd8216e0c9f98e2434092af7ec0f999522d Mon Sep 17 00:00:00 2001 +From: Guenter Roeck +Date: Fri, 27 Jan 2012 05:43:59 -0800 +Subject: hwmon: (w83627ehf) Fix number of fans for NCT6776F + +From: Guenter Roeck + +commit 585c0fd8216e0c9f98e2434092af7ec0f999522d upstream. + +NCT6776F can select fan input pins for fans 3 to 5 with a secondary set of +chip register bits. Check that second set of bits in addition to the first set +to detect if fans 3..5 are monitored. + +Signed-off-by: Guenter Roeck +Acked-by: Jean Delvare +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/hwmon/w83627ehf.c | 23 ++++++++++++++++++++--- + 1 file changed, 20 insertions(+), 3 deletions(-) + +--- a/drivers/hwmon/w83627ehf.c ++++ b/drivers/hwmon/w83627ehf.c +@@ -1920,9 +1920,26 @@ w83627ehf_check_fan_inputs(const struct + fan4min = 0; + fan5pin = 0; + } else if (sio_data->kind == nct6776) { +- fan3pin = !(superio_inb(sio_data->sioreg, 0x24) & 0x40); +- fan4pin = !!(superio_inb(sio_data->sioreg, 0x1C) & 0x01); +- fan5pin = !!(superio_inb(sio_data->sioreg, 0x1C) & 0x02); ++ bool gpok = superio_inb(sio_data->sioreg, 0x27) & 0x80; ++ ++ superio_select(sio_data->sioreg, W83627EHF_LD_HWM); ++ regval = superio_inb(sio_data->sioreg, SIO_REG_ENABLE); ++ ++ if (regval & 0x80) ++ fan3pin = gpok; ++ else ++ fan3pin = !(superio_inb(sio_data->sioreg, 0x24) & 0x40); ++ ++ if (regval & 0x40) ++ fan4pin = gpok; ++ else ++ fan4pin = !!(superio_inb(sio_data->sioreg, 0x1C) & 0x01); ++ ++ if (regval & 0x20) ++ fan5pin = gpok; ++ else ++ fan5pin = !!(superio_inb(sio_data->sioreg, 0x1C) & 0x02); ++ + fan4min = fan4pin; + } else if (sio_data->kind == w83667hg || sio_data->kind == w83667hg_b) { + fan3pin = 1; diff --git a/queue-3.2/series b/queue-3.2/series index 5198f05b6cb..e94461b49f3 100644 --- a/queue-3.2/series +++ b/queue-3.2/series @@ -45,3 +45,4 @@ drm-i915-handle-3rd-pipe.patch drm-i915-convert-force_wake_get-to-func-pointer-in-the-gpu-reset-code.patch drm-i915-protect-force_wake_-get-put-with-the-gt_lock.patch ecryptfs-infinite-loop-due-to-overflow-in-ecryptfs_write.patch +hwmon-w83627ehf-fix-number-of-fans-for-nct6776f.patch