diff options
author | Warner Losh <imp@FreeBSD.org> | 2005-07-31 03:33:22 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2005-07-31 03:33:22 +0000 |
commit | 55234c1cf409148ac23787d00448dd9b03543091 (patch) | |
tree | 40112ef7aeca609dea575e40288e9171db5ce56d /sys/dev | |
parent | 6fb9b618f59bb8cf57ee05626515d113a8be92d3 (diff) |
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
Notes
Notes:
svn path=/head/; revision=148581
Diffstat (limited to 'sys/dev')
-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 de419ff64323..af7e3f7a11be 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) |