From d6aa3f548734e36962f48b8a30db80e105aa8715 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Wed, 16 May 2007 08:43:22 +0000 Subject: [PATCH] Fix busy flag detection. Some Super-I/O chips (W83627THF) can't read back from the address port, so the value 0xff is returned, causing a false positive with the original test. Testing explicitly for 0x80 instead of only testing that bit 7 is set, works around it. git-svn-id: http://lm-sensors.org/svn/lm-sensors/trunk@4404 7894878c-1315-0410-8ee3-d5d059ff63e0 --- prog/dump/isadump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prog/dump/isadump.c b/prog/dump/isadump.c index 5031e783..04eee8d3 100644 --- a/prog/dump/isadump.c +++ b/prog/dump/isadump.c @@ -293,7 +293,7 @@ int main(int argc, char *argv[]) res = inb(addrreg + i + j); } else { outb(i+j, addrreg); - if (i+j == 0 && (inb(addrreg) & 0x80)) { + if (i+j == 0 && inb(addrreg) == 0x80) { /* Bit 7 appears to be a busy flag */ range = 128; }