diff --git a/CHANGES b/CHANGES index 0dcd1f1c..8231fa09 100644 --- a/CHANGES +++ b/CHANGES @@ -3,6 +3,7 @@ lm-sensors CHANGES file SVN-HEAD sensors-detect: Add nNidia nForce MCP78S SMBus detection + Display Super-I/O address even if LD is disabled 3.1.0 "Happy Birthday Lina" (2009-02-28) libsensors: Add support for instantaneous power sensors diff --git a/prog/detect/sensors-detect b/prog/detect/sensors-detect index eb851cf3..2a32587d 100755 --- a/prog/detect/sensors-detect +++ b/prog/detect/sensors-detect @@ -3225,23 +3225,28 @@ sub probe_superio outb($addrreg, $superio{logdevreg}); outb($datareg, $chip->{logdev}); - # Check the activation register - outb($addrreg, $superio{actreg}); - $val = inb($datareg); - if (!($val & $superio{actmask})) { - print "\n (but not activated)\n"; - return 0; - } - - # Get the IO base register + # Get the IO base address outb($addrreg, $superio{basereg}); $addr = inb($datareg); outb($addrreg, $superio{basereg} + 1); $addr = ($addr << 8) | inb($datareg); + + # Check the activation register and base address + outb($addrreg, $superio{actreg}); + $val = inb($datareg); + if (!($val & $superio{actmask})) { + if ($addr) { + printf "\n (address 0x\%x, but not activated)\n", $addr; + } else { + print "\n (but not activated)\n"; + } + return 0; + } if ($addr == 0) { print "\n (but no address specified)\n"; return 0; } + print "Success!\n"; printf " (address 0x\%x, driver `%s')\n", $addr, $chip->{driver}; my $new_hash = {