diff options
author | imp <imp@FreeBSD.org> | 2005-07-31 03:33:22 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2005-07-31 03:33:22 +0000 |
commit | e369c14b22814d6dc62b255fd4b6c747159585f0 (patch) | |
tree | 40112ef7aeca609dea575e40288e9171db5ce56d /sys/dev/ep | |
parent | ac7c9f771d24494ee3e2cb386d81d76f91fe2726 (diff) | |
download | FreeBSD-src-e369c14b22814d6dc62b255fd4b6c747159585f0.zip FreeBSD-src-e369c14b22814d6dc62b255fd4b6c747159585f0.tar.gz |
The isa attachment calls ep_free after it has already been called once
in the resource error in ep_alloc case. This results in a panic.
Zero resources to make it safe to call twice pending resolution of
layering questions.
MFC After: 3 days
Diffstat (limited to 'sys/dev/ep')
-rw-r--r-- | sys/dev/ep/if_ep.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/ep/if_ep.c b/sys/dev/ep/if_ep.c index de419ff..af7e3f7 100644 --- a/sys/dev/ep/if_ep.c +++ b/sys/dev/ep/if_ep.c @@ -253,6 +253,9 @@ ep_free(device_t dev) bus_release_resource(dev, SYS_RES_IOPORT, 0, sc->iobase); if (sc->irq) bus_release_resource(dev, SYS_RES_IRQ, 0, sc->irq); + sc->ep_intrhand = 0; + sc->iobase = 0; + sc->irq = 0; } static void @@ -420,7 +423,6 @@ epinit_locked(struct ep_softc *sc) CSR_WRITE_2(sc, EP_COMMAND, ACK_INTR | 0xff); CSR_WRITE_2(sc, EP_COMMAND, SET_RD_0_MASK | S_5_INTS); - CSR_WRITE_2(sc, EP_COMMAND, SET_INTR_MASK | S_5_INTS); if (ifp->if_flags & IFF_PROMISC) |