summaryrefslogtreecommitdiffstats
path: root/sys/dev/ed/if_ed.c
diff options
context:
space:
mode:
authorpeter <peter@FreeBSD.org>2000-11-25 03:36:09 +0000
committerpeter <peter@FreeBSD.org>2000-11-25 03:36:09 +0000
commit7c1d527781b35711a5231f301b2e66d66d27686e (patch)
tree7ce6bf3b4026088e4d563bcbd63943bddf45a5a5 /sys/dev/ed/if_ed.c
parenta177d57cb0bf5d68c28a8d74c9638eb4c906e656 (diff)
downloadFreeBSD-src-7c1d527781b35711a5231f301b2e66d66d27686e.zip
FreeBSD-src-7c1d527781b35711a5231f301b2e66d66d27686e.tar.gz
Update the ed driver to probe and attach under a NEWCARD kernel (I was
using a cardbus based system with pccbb providing the pcic interface). Something isn't quite right.. when the driver allocates and activates its resources, the IO space that was requested reads as all zeros (versus the original 0xff's as it normally is when there is no device responding). Also, deactivate the resources before releasing them. OLDCARD doesn't seem to care but NEWCARD/CARDBUS get rather unhappy if you release a resource that hasn't been deactivated yet. Make pcic_p.c only compile with oldcard kernels.
Diffstat (limited to 'sys/dev/ed/if_ed.c')
-rw-r--r--sys/dev/ed/if_ed.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c
index 72fb2ef..a1222b4 100644
--- a/sys/dev/ed/if_ed.c
+++ b/sys/dev/ed/if_ed.c
@@ -1590,16 +1590,22 @@ ed_release_resources(dev)
struct ed_softc *sc = device_get_softc(dev);
if (sc->port_res) {
+ bus_deactivate_resource(dev, SYS_RES_IOPORT,
+ sc->port_rid, sc->port_res);
bus_release_resource(dev, SYS_RES_IOPORT,
sc->port_rid, sc->port_res);
sc->port_res = 0;
}
if (sc->mem_res) {
+ bus_deactivate_resource(dev, SYS_RES_MEMORY,
+ sc->mem_rid, sc->mem_res);
bus_release_resource(dev, SYS_RES_MEMORY,
sc->mem_rid, sc->mem_res);
sc->mem_res = 0;
}
if (sc->irq_res) {
+ bus_deactivate_resource(dev, SYS_RES_IRQ,
+ sc->irq_rid, sc->irq_res);
bus_release_resource(dev, SYS_RES_IRQ,
sc->irq_rid, sc->irq_res);
sc->irq_res = 0;
OpenPOWER on IntegriCloud