diff options
author | peter <peter@FreeBSD.org> | 1999-04-24 07:04:51 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 1999-04-24 07:04:51 +0000 |
commit | 92e2d421da60aa12981a463edb31a7171816508e (patch) | |
tree | 0797e323166568fecf9eb6feac55d8e5c9373f5d /sys/i386/isa | |
parent | 30825c6cf7f96c629b65d95899652ff73d5f8b51 (diff) | |
download | FreeBSD-src-92e2d421da60aa12981a463edb31a7171816508e.zip FreeBSD-src-92e2d421da60aa12981a463edb31a7171816508e.tar.gz |
Back out parts of rev 1.4; making isa.c preserve the hints across a
release made it unneeded.
Diffstat (limited to 'sys/i386/isa')
-rw-r--r-- | sys/i386/isa/isa_compat.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/sys/i386/isa/isa_compat.c b/sys/i386/isa/isa_compat.c index 43a7ae2..8834931 100644 --- a/sys/i386/isa/isa_compat.c +++ b/sys/i386/isa/isa_compat.c @@ -39,6 +39,7 @@ #include <vm/vm.h> #include <vm/pmap.h> #include <machine/pmap.h> +#include <machine/md_var.h> #include <machine/resource.h> #include <isa/isavar.h> @@ -169,21 +170,21 @@ isa_compat_probe(device_t dev) dvp->id_maddr = maddr; portsize = dvp->id_driver->probe(dvp); isa_compat_release_resources(dev, &res); - /* isa_release_resource clobbers the hints - reset them! */ - if (dvp->id_iobase > 0) - isa_set_port(dev, dvp->id_iobase); - if (portsize > 0) - isa_set_portsize(dev, portsize); - if (dvp->id_irq != 0) - isa_set_irq(dev, ffs(dvp->id_irq) - 1); - if (dvp->id_drq != -1) - isa_set_drq(dev, dvp->id_drq); - if (dvp->id_maddr != 0) - isa_set_maddr(dev, (int)kvtop(dvp->id_maddr)); /* XXX */ - if (dvp->id_msize != 0) - isa_set_msize(dev, dvp->id_msize); - if (portsize != 0) + if (portsize != 0) { + if (portsize > 0) + isa_set_portsize(dev, portsize); + if (dvp->id_iobase != isa_get_port(dev)) + isa_set_port(dev, dvp->id_iobase); + if (dvp->id_irq != irqmask(isa_get_irq(dev))) + isa_set_irq(dev, ffs(dvp->id_irq) - 1); + if (dvp->id_drq != isa_get_drq(dev)) + isa_set_drq(dev, dvp->id_drq); + if (dvp->id_maddr != maddr) + isa_set_maddr(dev, (int)kvtop(dvp->id_maddr)); + if (dvp->id_msize != isa_get_msize(dev)) + isa_set_msize(dev, dvp->id_msize); return 0; + } } return ENXIO; } |