From f69dfaede114edfba510c4b7ec35b3b07a352a84 Mon Sep 17 00:00:00 2001 From: Yoshihiro Takahashi Date: Thu, 7 Sep 2000 14:43:00 +0000 Subject: [PATCH] Don't assume that address of I/O address table increase (PC-98 only). Pointed out by: Tomokazu HARADA --- sys/amd64/isa/isa.c | 4 ++-- sys/i386/isa/isa.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/amd64/isa/isa.c b/sys/amd64/isa/isa.c index 9c96c4c8af95..ab9427d2e97a 100644 --- a/sys/amd64/isa/isa.c +++ b/sys/amd64/isa/isa.c @@ -151,7 +151,7 @@ isa_alloc_resourcev(device_t child, int type, int *rid, linear_cnt = count; ressz = 1; for (i = 1; i < count; ++i) { - if (res[i] > res[i - 1] + 1) { + if (res[i] != res[i - 1] + 1) { if (i < linear_cnt) linear_cnt = i; ++ressz; @@ -172,7 +172,7 @@ isa_alloc_resourcev(device_t child, int type, int *rid, for (i = linear_cnt, k = 1; i < count; i = j, k++) { for (j = i + 1; j < count; j++) { - if (res[j] > res[j - 1] + 1) + if (res[j] != res[j - 1] + 1) break; } bsrid = *rid + k; diff --git a/sys/i386/isa/isa.c b/sys/i386/isa/isa.c index 9c96c4c8af95..ab9427d2e97a 100644 --- a/sys/i386/isa/isa.c +++ b/sys/i386/isa/isa.c @@ -151,7 +151,7 @@ isa_alloc_resourcev(device_t child, int type, int *rid, linear_cnt = count; ressz = 1; for (i = 1; i < count; ++i) { - if (res[i] > res[i - 1] + 1) { + if (res[i] != res[i - 1] + 1) { if (i < linear_cnt) linear_cnt = i; ++ressz; @@ -172,7 +172,7 @@ isa_alloc_resourcev(device_t child, int type, int *rid, for (i = linear_cnt, k = 1; i < count; i = j, k++) { for (j = i + 1; j < count; j++) { - if (res[j] > res[j - 1] + 1) + if (res[j] != res[j - 1] + 1) break; } bsrid = *rid + k;