diff options
author | imp <imp@FreeBSD.org> | 1999-12-10 07:22:53 +0000 |
---|---|---|
committer | imp <imp@FreeBSD.org> | 1999-12-10 07:22:53 +0000 |
commit | 784b6c2626723425fb43411e1fab5a59393e0753 (patch) | |
tree | e20b2c2e80538a4b1407781f70d04b00158b4dbc /sys | |
parent | 825b49478f778e1f312ae34d63b3917a407da0de (diff) | |
download | FreeBSD-src-784b6c2626723425fb43411e1fab5a59393e0753.zip FreeBSD-src-784b6c2626723425fb43411e1fab5a59393e0753.tar.gz |
Fix pccard ed driver, I think.
o Expose ed_stop and call it early to shutdown the hardware.
o When releasing the interrupt, pass the cookie for the irq, not
a pointer to the cookie (this is the base problem).
o Release other resources used, just like the ep driver
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/ed/if_ed.c | 3 | ||||
-rw-r--r-- | sys/dev/ed/if_ed_pccard.c | 4 | ||||
-rw-r--r-- | sys/dev/ed/if_edvar.h | 1 |
3 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/ed/if_ed.c b/sys/dev/ed/if_ed.c index b355f4f..959d782 100644 --- a/sys/dev/ed/if_ed.c +++ b/sys/dev/ed/if_ed.c @@ -76,7 +76,6 @@ static int ed_ioctl __P((struct ifnet *, u_long, caddr_t)); static void ed_start __P((struct ifnet *)); static void ed_reset __P((struct ifnet *)); static void ed_watchdog __P((struct ifnet *)); -static void ed_stop __P((struct ed_softc *)); static void ds_getmcaf __P((struct ed_softc *, u_long *)); @@ -1719,7 +1718,7 @@ ed_reset(ifp) /* * Take interface offline. */ -static void +void ed_stop(sc) struct ed_softc *sc; { diff --git a/sys/dev/ed/if_ed_pccard.c b/sys/dev/ed/if_ed_pccard.c index 549a9a3..a8c819a 100644 --- a/sys/dev/ed/if_ed_pccard.c +++ b/sys/dev/ed/if_ed_pccard.c @@ -88,10 +88,12 @@ ed_pccard_detach(device_t dev) device_printf(dev, "already unloaded\n"); return (0); } + ed_stop(sc); ifp->if_flags &= ~IFF_RUNNING; if_detach(ifp); - bus_teardown_intr(dev, sc->irq_res, &sc->irq_handle); sc->gone = 1; + bus_teardown_intr(dev, sc->irq_res, sc->irq_handle); + ed_release_resources(dev); device_printf(dev, "unload\n"); return (0); } diff --git a/sys/dev/ed/if_edvar.h b/sys/dev/ed/if_edvar.h index b94366e..39db724 100644 --- a/sys/dev/ed/if_edvar.h +++ b/sys/dev/ed/if_edvar.h @@ -102,6 +102,7 @@ int ed_probe_Novell_generic __P((device_t, int, int)); int ed_probe_HP_pclanp __P((device_t)); int ed_attach __P((struct ed_softc *, int, int)); +void ed_stop __P((struct ed_softc *)); driver_intr_t edintr; |