diff options
author | imp <imp@FreeBSD.org> | 2005-09-19 03:10:21 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 2005-09-19 03:10:21 +0000 |
commit | 4e70215e6bf590140205774753c8b0a1f1fe9a36 (patch) | |
tree | c3358cebc77043ea8b2a3a5036b02dad6a674b7e /sys/dev/awi | |
parent | 37a0bbb7e543c6b2a2f055d676d5a94f781d7738 (diff) | |
download | FreeBSD-src-4e70215e6bf590140205774753c8b0a1f1fe9a36.zip FreeBSD-src-4e70215e6bf590140205774753c8b0a1f1fe9a36.tar.gz |
Make sure that we call if_free(ifp) after bus_teardown_intr. Since we
could get an interrupt after we free the ifp, and the interrupt
handler depended on the ifp being still alive, this could, in theory,
cause a crash. Eliminate this possibility by moving the if_free to
after the bus_teardown_intr() call.
Diffstat (limited to 'sys/dev/awi')
-rw-r--r-- | sys/dev/awi/if_awi_pccard.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/dev/awi/if_awi_pccard.c b/sys/dev/awi/if_awi_pccard.c index bc8bb32..0e4958c 100644 --- a/sys/dev/awi/if_awi_pccard.c +++ b/sys/dev/awi/if_awi_pccard.c @@ -153,8 +153,7 @@ awi_pccard_attach(device_t dev) psc->sc_port_rid = 0; psc->sc_port_res = bus_alloc_resource(dev, SYS_RES_IOPORT, - &psc->sc_port_rid, 0, ~0, 16, - rman_make_alignment_flags(64) | RF_ACTIVE); + &psc->sc_port_rid, 0, ~0, 16, RF_ACTIVE); if (!psc->sc_port_res) { device_printf(dev, "awi_pccard_attach: port alloc failed\n"); goto fail; @@ -176,7 +175,6 @@ awi_pccard_attach(device_t dev) * XXX: awi needs to access memory with 8bit, * but pccardd apparently maps memory with MDF_16BITS flag. * So memory mapped access is disabled and use IO port instead. - * Also, memory mapping is not yet supported on pccard. */ psc->sc_mem_res = 0; #else |