1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-14 14:55:41 +00:00

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
This commit is contained in:
Warner Losh 2005-07-31 03:33:22 +00:00
parent 6fb9b618f5
commit 55234c1cf4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=148581

View File

@ -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)