diff options
| author | Warner Losh <imp@FreeBSD.org> | 1999-12-01 07:38:54 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 1999-12-01 07:38:54 +0000 |
| commit | e09f49b6fa071877ce25bafffe0d8859d53b6670 (patch) | |
| tree | 812eb9310c87d1710584e4f47f5c4cbd9f23ee6b /sys/dev | |
| parent | 226420a46464f4d32af2086975d2c66bdd44f489 (diff) | |
Notes
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/ed/if_ed_pccard.c | 9 | ||||
| -rw-r--r-- | sys/dev/ep/if_ep_pccard.c | 7 | ||||
| -rw-r--r-- | sys/dev/sio/sio.c | 20 |
3 files changed, 13 insertions, 23 deletions
diff --git a/sys/dev/ed/if_ed_pccard.c b/sys/dev/ed/if_ed_pccard.c index df47ae56cc8e..549a9a343c65 100644 --- a/sys/dev/ed/if_ed_pccard.c +++ b/sys/dev/ed/if_ed_pccard.c @@ -48,7 +48,7 @@ */ static int ed_pccard_probe(device_t); static int ed_pccard_attach(device_t); -static void ed_pccard_detach(device_t); +static int ed_pccard_detach(device_t); static device_method_t ed_pccard_methods[] = { /* Device interface */ @@ -78,7 +78,7 @@ DRIVER_MODULE(ed, pccard, ed_pccard_driver, ed_pccard_devclass, 0, 0); * and ensure that any driver entry points such as * read and write do not hang. */ -static void +static int ed_pccard_detach(device_t dev) { struct ed_softc *sc = device_get_softc(dev); @@ -86,13 +86,14 @@ ed_pccard_detach(device_t dev) if (sc->gone) { device_printf(dev, "already unloaded\n"); - return; + return (0); } ifp->if_flags &= ~IFF_RUNNING; - if_down(ifp); + if_detach(ifp); bus_teardown_intr(dev, sc->irq_res, &sc->irq_handle); sc->gone = 1; device_printf(dev, "unload\n"); + return (0); } /* diff --git a/sys/dev/ep/if_ep_pccard.c b/sys/dev/ep/if_ep_pccard.c index 1435ce3ff0dc..ad3749b7a081 100644 --- a/sys/dev/ep/if_ep_pccard.c +++ b/sys/dev/ep/if_ep_pccard.c @@ -212,7 +212,7 @@ bad: return (error); } -static void +static int ep_pccard_detach(device_t dev) { struct ep_softc *sc = device_get_softc(dev); @@ -221,14 +221,15 @@ ep_pccard_detach(device_t dev) if (sc->gone) { device_printf(dev, "already unloaded\n"); - return; + return (0); } sc->arpcom.ac_if.if_flags &= ~IFF_RUNNING; - if_down(&sc->arpcom.ac_if); + if_detach(&sc->arpcom.ac_if); sc->gone = 1; bus_teardown_intr(dev, sc->irq, sc->ep_intrhand); ep_free(dev); device_printf(dev, "unload\n"); + return (0); } static device_method_t ep_pccard_methods[] = { diff --git a/sys/dev/sio/sio.c b/sys/dev/sio/sio.c index fe8244e78984..4789c43dd104 100644 --- a/sys/dev/sio/sio.c +++ b/sys/dev/sio/sio.c @@ -87,15 +87,6 @@ #endif #include <isa/ic/ns16550.h> -#include "card.h" -#if NCARD > 0 -/* XXX should die XXX */ -#include <sys/select.h> -#include <sys/module.h> -#include <pccard/cardinfo.h> -#include <pccard/slot.h> -#endif - #ifndef __i386__ #define disable_intr() #define enable_intr() @@ -487,13 +478,9 @@ static int sio_pccard_probe(dev) device_t dev; { - const char *name; - - name = pccard_get_name(dev); - if (strcmp(name, "sio")) - return ENXIO; - /* Do not probe IRQ - pccardd has not arranged for it yet */ + /* XXX Actually it has been asigned to you, but isn't activated */ + /* XXX until you specifically activate the resource for your use. */ SET_FLAG(dev, COM_C_NOPROBE); return (sioprobe(dev)); @@ -515,7 +502,7 @@ sio_pccard_attach(dev) * and ensure that any driver entry points such as * read and write do not hang. */ -static void +static int sio_pccard_detach(dev) device_t dev; { @@ -543,6 +530,7 @@ sio_pccard_detach(dev) free(com, M_DEVBUF); device_printf(dev, "unload,gone\n"); } + return (0); } #endif /* NCARD > 0 */ |
