mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-03 12:35:02 +00:00
Back out parts of rev 1.4; making isa.c preserve the hints across a
release made it unneeded.
This commit is contained in:
parent
8e51a153aa
commit
7e381ee0b4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=45987
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user