Display the base I/O address of Super-I/O logical device if it is

set, even it the logical device in question is disabled.


git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@5677 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
Jean Delvare committed 2009-03-06 09:44:17 +00:00
1 parent 3dc6983a84
commit 531a6416f2
2 files changed
+15 -9

No files matched your search

+1
View File
@@ -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
+14 -9
View File
@@ -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 = {