]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
.23 patch
authorGreg Kroah-Hartman <gregkh@suse.de>
Wed, 9 Jan 2008 16:43:08 +0000 (08:43 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Wed, 9 Jan 2008 16:43:08 +0000 (08:43 -0800)
queue-2.6.23/hwmon-be-more-careful-when-changing-vid-input-level.patch [new file with mode: 0644]
queue-2.6.23/series [new file with mode: 0644]

diff --git a/queue-2.6.23/hwmon-be-more-careful-when-changing-vid-input-level.patch b/queue-2.6.23/hwmon-be-more-careful-when-changing-vid-input-level.patch
new file mode 100644 (file)
index 0000000..f31782f
--- /dev/null
@@ -0,0 +1,77 @@
+From stable-bounces@linux.kernel.org Sun Jan  6 05:19:14 2008
+From: Jean Delvare <khali@linux-fr.org>
+Date: Sun, 6 Jan 2008 14:18:44 +0100
+Subject: hwmon: (w83627ehf) Be more careful when changing VID input level
+To: stable@kernel.org
+Cc: "Mark M. Hoffman" <mhoffman@lightlink.com>
+Message-ID: <20080106141844.59571bf7@hyperion.delvare>
+
+Already in Linus' tree:
+http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=58e6e78119da2bdade9f6f588155f0320072b76b
+
+Fix for:
+http://bugzilla.kernel.org/show_bug.cgi?id=9634
+
+The VID input level change has been reported to cause trouble. Be more
+careful in this respect:
+* Only change the level on the W83627EHF/EHG. The W83627DHG is more
+  complex in this respect.
+* Don't change the level if the VID pins are in output mode.
+* Only set the level to TTL if VRM 9.x is used.
+
+Signed-off-by: Jean Delvare <khali@linux-fr.org>
+Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ drivers/hwmon/w83627ehf.c |   36 ++++++++++++++++++++++--------------
+ 1 file changed, 22 insertions(+), 14 deletions(-)
+
+--- a/drivers/hwmon/w83627ehf.c
++++ b/drivers/hwmon/w83627ehf.c
+@@ -1276,23 +1276,31 @@ static int __devinit w83627ehf_probe(str
+       data->vrm = vid_which_vrm();
+       superio_enter(sio_data->sioreg);
+-      /* Set VID input sensibility if needed. In theory the BIOS should
+-         have set it, but in practice it's not always the case. */
+-      en_vrm10 = superio_inb(sio_data->sioreg, SIO_REG_EN_VRM10);
+-      if ((en_vrm10 & 0x08) && data->vrm != 100) {
+-              dev_warn(dev, "Setting VID input voltage to TTL\n");
+-              superio_outb(sio_data->sioreg, SIO_REG_EN_VRM10,
+-                           en_vrm10 & ~0x08);
+-      } else if (!(en_vrm10 & 0x08) && data->vrm == 100) {
+-              dev_warn(dev, "Setting VID input voltage to VRM10\n");
+-              superio_outb(sio_data->sioreg, SIO_REG_EN_VRM10,
+-                           en_vrm10 | 0x08);
+-      }
+       /* Read VID value */
+       superio_select(sio_data->sioreg, W83627EHF_LD_HWM);
+-      if (superio_inb(sio_data->sioreg, SIO_REG_VID_CTRL) & 0x80)
++      if (superio_inb(sio_data->sioreg, SIO_REG_VID_CTRL) & 0x80) {
++              /* Set VID input sensibility if needed. In theory the BIOS
++                 should have set it, but in practice it's not always the
++                 case. We only do it for the W83627EHF/EHG because the
++                 W83627DHG is more complex in this respect. */
++              if (sio_data->kind == w83627ehf) {
++                      en_vrm10 = superio_inb(sio_data->sioreg,
++                                             SIO_REG_EN_VRM10);
++                      if ((en_vrm10 & 0x08) && data->vrm == 90) {
++                              dev_warn(dev, "Setting VID input voltage to "
++                                       "TTL\n");
++                              superio_outb(sio_data->sioreg, SIO_REG_EN_VRM10,
++                                           en_vrm10 & ~0x08);
++                      } else if (!(en_vrm10 & 0x08) && data->vrm == 100) {
++                              dev_warn(dev, "Setting VID input voltage to "
++                                       "VRM10\n");
++                              superio_outb(sio_data->sioreg, SIO_REG_EN_VRM10,
++                                           en_vrm10 | 0x08);
++                      }
++              }
++
+               data->vid = superio_inb(sio_data->sioreg, SIO_REG_VID_DATA) & 0x3f;
+-      else {
++      } else {
+               dev_info(dev, "VID pins in output mode, CPU VID not "
+                        "available\n");
+               data->vid = 0x3f;
diff --git a/queue-2.6.23/series b/queue-2.6.23/series
new file mode 100644 (file)
index 0000000..fd6fcca
--- /dev/null
@@ -0,0 +1 @@
+hwmon-be-more-careful-when-changing-vid-input-level.patch