Skip to contentSkip to conversation

hwmon: Do not forcibly enable via686a by

PATCH New Greg KH 1 participant 1 message Oct 29, 2005

Subsystems (2)
lore
Share & tools
lore

Greg KH

author
#0 lore raw

PATCH 1/1 hwmon: Do not forcibly enable via686a by

[PATCH] hwmon: Do not forcibly enable via686a by default

Do not enable the VIA VT82C686A/B integrated sensors by default, as disabled sensors usually means that this feature is not used so the values won't make any sense. This has been confusing many users in the past:

http://www2.lm-sensors.nu/~lm78/readticket.cgi?ticket86
http://www2.lm-sensors.nu/~lm78/readticket.cgi?ticket11
http://www2.lm-sensors.nu/~lm78/readticket.cgi?ticket 52

It is still possible to forcibly enable the sensors by using the force_addr module parameter.

 Documentation/hwmon/via686a |   17 +++++++++++++++--
 drivers/hwmon/via686a.c     |   18 +++++++++++-------
 2 files changed, 26 insertions(+), 9 deletions(-)

---
commit b918ecd2429e1a89b846d9e49ca4520b963c13e8
tree 396e8a1f2e958f713722b53c2ab68c66e9b265b3
parent e415e48b68155bea8b5452113dedba4ec486f3f6
author Jean Delvare <[email protected]> Sun, 25 Sep 2005 16:18:49 +0200 committer Greg Kroah-Hartman <[email protected]> Fri, 28 Oct 2005 14:02:06 -0700

 Documentation/hwmon/via686a |   17 +++++++++++++++--
 drivers/hwmon/via686a.c     |   18 +++++++++++-------
 2 files changed, 26 insertions(+), 9 deletions(-)
Documentation/hwmon/via686a +15 -2
index b82014c..a936fb3 100644
@@ -18,8 +18,9 @@ Authors:
 Module Parameters
 -----------------
 
-force_addr=0xaddr       Set the I/O base address. Useful for Asus A7V boards
-                        that don't set the address in the BIOS. Does not do a
+force_addr=0xaddr       Set the I/O base address. Useful for boards that
+                        don't set the address in the BIOS. Look for a BIOS
+                        upgrade before resorting to this. Does not do a
                         PCI force; the via686a must still be present in lspci.
                         Don't use this unless the driver complains that the
                         base address is not set.
@@ -63,3 +64,15 @@ miss once-only alarms.
 
 The driver only updates its values each 1.5 seconds; reading it more often
 will do no harm, but will return 'old' values.
+
+Known Issues
+------------
+
+This driver handles sensors integrated in some VIA south bridges. It is
+possible that a motherboard maker used a VT82C686A/B chip as part of a
+product design but was not interested in its hardware monitoring features,
+in which case the sensor inputs will not be wired. This is the case of
+the Asus K7V, A7V and A7V133 motherboards, to name only a few of them.
+So, if you need the force_addr parameter, and end up with values which
+don't seem to make any sense, don't look any further: your chip is simply
+not wired for hardware monitoring.
drivers/hwmon/via686a.c +1 -3
index 60e9487..688ccf9 100644
@@ -589,10 +589,8 @@ static int via686a_detect(struct i2c_ada
 	u16 val;
 
 	/* 8231 requires multiple of 256, we enforce that on 686 as well */
-	if (force_addr)
-		address = force_addr & 0xFF00;
-
 	if (force_addr) {
+		address = force_addr & 0xFF00;
 		dev_warn(&adapter->dev, "forcing ISA address 0x%04X\n",
 			 address);
 		if (PCIBIOS_SUCCESSFUL !@@ -603,11 +601,17 @@ static int via686a_detect(struct i2c_ada

pci_read_config_word(s_bridge, VIA686A_ENABLE_REG, &val))
return -ENODEV;
if (!(val & 0x0001)) {
- dev_warn(&adapter->dev, "enabling sensors\n");
- if (PCIBIOS_SUCCESSFUL !- pci_write_config_word(s_bridge, VIA686A_ENABLE_REG,
- val | 0x0001))
+ if (force_addr) {
+ dev_info(&adapter->dev, "enabling sensors\n");
+ if (PCIBIOS_SUCCESSFUL !+ pci_write_config_word(s_bridge, VIA686A_ENABLE_REG,
+ val | 0x0001))
+ return -ENODEV;
+ } else {
+ dev_warn(&adapter->dev, "sensors disabled - enable "
+ "with force_addr=0x%x\n", address);
return -ENODEV;
+ }
}

/* Reserve the ISA region */