summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>1999-09-01 06:34:24 +0000
committerPeter Wemm <peter@FreeBSD.org>1999-09-01 06:34:24 +0000
commit1be9d26e4a7f55a1db549c6c06764859a6fd3326 (patch)
tree9b77c86606d68082e3643dfa3b0c5b91fb008053
parent68db232834b715671a701e59ea06dd72ee12fe8d (diff)
Notes
-rw-r--r--sys/amd64/isa/isa.c8
-rw-r--r--sys/i386/isa/isa.c8
2 files changed, 8 insertions, 8 deletions
diff --git a/sys/amd64/isa/isa.c b/sys/amd64/isa/isa.c
index f87d9816f071..da655284478b 100644
--- a/sys/amd64/isa/isa.c
+++ b/sys/amd64/isa/isa.c
@@ -104,13 +104,13 @@ isa_alloc_resource(device_t bus, device_t child, int type, int *rid,
if (!rle) {
if (*rid < 0)
return 0;
- if (type == SYS_RES_IRQ && *rid > 1)
+ if (type == SYS_RES_IRQ && *rid >= ISA_NIRQ)
return 0;
- if (type == SYS_RES_DRQ && *rid > 1)
+ if (type == SYS_RES_DRQ && *rid >= ISA_NDRQ)
return 0;
- if (type != SYS_RES_MEMORY && *rid > 3)
+ if (type != SYS_RES_MEMORY && *rid >= ISA_NMEM)
return 0;
- if (type == SYS_RES_IOPORT && *rid > 7)
+ if (type == SYS_RES_IOPORT && *rid >= ISA_NPORT)
return 0;
resource_list_add(rl, type, *rid, start, end, count);
}
diff --git a/sys/i386/isa/isa.c b/sys/i386/isa/isa.c
index f87d9816f071..da655284478b 100644
--- a/sys/i386/isa/isa.c
+++ b/sys/i386/isa/isa.c
@@ -104,13 +104,13 @@ isa_alloc_resource(device_t bus, device_t child, int type, int *rid,
if (!rle) {
if (*rid < 0)
return 0;
- if (type == SYS_RES_IRQ && *rid > 1)
+ if (type == SYS_RES_IRQ && *rid >= ISA_NIRQ)
return 0;
- if (type == SYS_RES_DRQ && *rid > 1)
+ if (type == SYS_RES_DRQ && *rid >= ISA_NDRQ)
return 0;
- if (type != SYS_RES_MEMORY && *rid > 3)
+ if (type != SYS_RES_MEMORY && *rid >= ISA_NMEM)
return 0;
- if (type == SYS_RES_IOPORT && *rid > 7)
+ if (type == SYS_RES_IOPORT && *rid >= ISA_NPORT)
return 0;
resource_list_add(rl, type, *rid, start, end, count);
}