summaryrefslogtreecommitdiff
path: root/sys/dev/isa/isa.c
diff options
context:
space:
mode:
authorshawn <shawn@cvs.openbsd.org>1996-08-15 01:51:09 +0000
committershawn <shawn@cvs.openbsd.org>1996-08-15 01:51:09 +0000
commit661a536f17c45011b0fb1cc7d141c3364cfeeda0 (patch)
tree95018d94e45bf9ccf1d2f4f84fefc5bdcdf7457d /sys/dev/isa/isa.c
parenta6a782ebf213c4ff5897a7f5119fb2b5d6cc9c9c (diff)
oops, forgot to exclude those unused extents before adding to map
Diffstat (limited to 'sys/dev/isa/isa.c')
-rw-r--r--sys/dev/isa/isa.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/sys/dev/isa/isa.c b/sys/dev/isa/isa.c
index c3c92971110..b4789eda854 100644
--- a/sys/dev/isa/isa.c
+++ b/sys/dev/isa/isa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isa.c,v 1.12 1996/08/14 14:36:15 shawn Exp $ */
+/* $OpenBSD: isa.c,v 1.13 1996/08/15 01:51:08 shawn Exp $ */
/* $NetBSD: isa.c,v 1.85 1996/05/14 00:31:04 thorpej Exp $ */
/*-
@@ -157,10 +157,14 @@ isascan(parent, match)
struct isa_attach_args ia2 = ia;
while ((*cf->cf_attach->ca_match)(parent, dev, &ia2) > 0) {
- add_extent(io_map, ia.ia_iobase, ia.ia_iosize);
- add_extent(mem_map, ia.ia_maddr, ia.ia_msize);
- add_extent(irq_map, ia.ia_irq, 1);
- add_extent(drq_map, ia.ia_drq, 1);
+ if (ia.ia_iobase > 0 && ia.ia_iosize > 0)
+ add_extent(io_map, ia.ia_iobase, ia.ia_iosize);
+ if (ia.ia_maddr > 0 && ia.ia_msize > 0)
+ add_extent(mem_map, ia.ia_maddr, ia.ia_msize);
+ if (ia.ia_irq > 0)
+ add_extent(irq_map, ia.ia_irq, 1);
+ if (ia.ia_drq > 0)
+ add_extent(drq_map, ia.ia_drq, 1);
config_attach(parent, dev, &ia2, isaprint);
dev = config_make_softc(parent, cf);
ia2 = ia;
@@ -170,10 +174,14 @@ isascan(parent, match)
}
if ((*cf->cf_attach->ca_match)(parent, dev, &ia) > 0) {
- add_extent(io_map, ia.ia_iobase, ia.ia_iosize);
- add_extent(mem_map, ia.ia_maddr, ia.ia_msize);
- add_extent(irq_map, ia.ia_irq, 1);
- add_extent(drq_map, ia.ia_drq, 1);
+ if (ia.ia_iobase > 0 && ia.ia_iosize > 0)
+ add_extent(io_map, ia.ia_iobase, ia.ia_iosize);
+ if (ia.ia_maddr > 0 && ia.ia_msize > 0)
+ add_extent(mem_map, ia.ia_maddr, ia.ia_msize);
+ if (ia.ia_irq > 0)
+ add_extent(irq_map, ia.ia_irq, 1);
+ if (ia.ia_drq > 0)
+ add_extent(drq_map, ia.ia_drq, 1);
config_attach(parent, dev, &ia, isaprint);
}
else