mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-23 20:11:42 +00:00
sensors-detect: Make the LM78 and W83781D detection safer.
If we find that the register at offset 5 doesn't behave as it would for an LM78 or W83781D chip, attempt to restore its 8 original bits rather than just the 7 LSB. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4347 7894878c-1315-0410-8ee3-d5d059ff63e0
This commit is contained in:
1 parent
4139fb3407
commit
572723411f
2 files changed
+5
-4
No files matched your search
@@ -43,6 +43,7 @@ SVN HEAD
|
||||
Fix ADM1028 detection
|
||||
Add Nat. Semi. PC8347L Super-I/O detection
|
||||
Add SMSC SCH5504 Super-I/O detection (no sensors)
|
||||
Make the LM78 and W83781D detection safer
|
||||
|
||||
|
||||
2.10.2 (20070115)
|
||||
|
||||
@@ -3286,8 +3286,8 @@ sub lm78_isa_detect
|
||||
return if inb ($addr + 2) != $val or inb ($addr + 3) != $val or
|
||||
inb ($addr + 7) != $val;
|
||||
|
||||
$val = inb($addr + 5) & 0x7f;
|
||||
outb($addr + 5, ~$val & 0xff);
|
||||
$val = inb($addr + 5);
|
||||
outb($addr + 5, ~$val & 0x7f);
|
||||
if ((inb ($addr+5) & 0x7f) != (~ $val & 0x7f)) {
|
||||
outb($addr+5,$val);
|
||||
return;
|
||||
@@ -4250,8 +4250,8 @@ sub w83781d_isa_detect
|
||||
return if inb ($addr + 2) != $val or inb ($addr + 3) != $val or
|
||||
inb ($addr + 7) != $val;
|
||||
|
||||
$val = inb($addr + 5) & 0x7f;
|
||||
outb($addr+5, ~$val & 0xff);
|
||||
$val = inb($addr + 5);
|
||||
outb($addr+5, ~$val & 0x7f);
|
||||
if ((inb ($addr+5) & 0x7f) != (~ $val & 0x7f)) {
|
||||
outb($addr+5,$val);
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user