summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/dev/usb/if_aue.c19
-rw-r--r--sys/dev/usb/if_auereg.h4
-rw-r--r--sys/dev/usb/if_upgt.c23
-rw-r--r--sys/dev/usb/if_upgtvar.h3
4 files changed, 6 insertions, 43 deletions
diff --git a/sys/dev/usb/if_aue.c b/sys/dev/usb/if_aue.c
index 9572f87dc00..810d1ee1c77 100644
--- a/sys/dev/usb/if_aue.c
+++ b/sys/dev/usb/if_aue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_aue.c,v 1.75 2008/11/28 02:44:18 brad Exp $ */
+/* $OpenBSD: if_aue.c,v 1.76 2009/08/10 20:02:19 deraadt Exp $ */
/* $NetBSD: if_aue.c,v 1.82 2003/03/05 17:37:36 shiba Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -240,7 +240,6 @@ void aue_tick_task(void *);
void aue_start(struct ifnet *);
int aue_ioctl(struct ifnet *, u_long, caddr_t);
void aue_init(void *);
-void aue_shutdown(void *);
void aue_stop(struct aue_softc *);
void aue_watchdog(struct ifnet *);
int aue_openpipes(struct aue_softc *);
@@ -835,7 +834,6 @@ aue_attach(struct device *parent, struct device *self, void *aux)
timeout_set(&sc->aue_stat_ch, aue_tick, sc);
sc->aue_attached = 1;
- sc->sc_sdhook = shutdownhook_establish(aue_shutdown, sc);
splx(s);
usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->aue_udev,
@@ -883,8 +881,6 @@ aue_detach(struct device *self, int flags)
#endif
sc->aue_attached = 0;
- if (sc->sc_sdhook != NULL)
- shutdownhook_disestablish(sc->sc_sdhook);
if (--sc->aue_refcnt >= 0) {
/* Wait for processes to go away. */
@@ -1601,19 +1597,6 @@ aue_watchdog(struct ifnet *ifp)
}
/*
- * Stop all chip I/O so that the kernel's probe routines don't
- * get confused by errant DMAs when rebooting.
- */
-void
-aue_shutdown(void *arg)
-{
- struct aue_softc *sc = (struct aue_softc *)arg;
-
- aue_reset(sc);
- aue_stop(sc);
-}
-
-/*
* Stop the adapter and free any mbufs allocated to the
* RX and TX lists.
*/
diff --git a/sys/dev/usb/if_auereg.h b/sys/dev/usb/if_auereg.h
index 764dca794dc..ffcec2231e4 100644
--- a/sys/dev/usb/if_auereg.h
+++ b/sys/dev/usb/if_auereg.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_auereg.h,v 1.13 2007/06/10 10:15:35 mbalmer Exp $ */
+/* $OpenBSD: if_auereg.h,v 1.14 2009/08/10 20:02:19 deraadt Exp $ */
/* $NetBSD: if_auereg.h,v 1.16 2001/10/10 02:14:17 augustss Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
@@ -257,8 +257,6 @@ struct aue_softc {
struct usb_task aue_stop_task;
struct rwlock aue_mii_lock;
-
- void *sc_sdhook;
};
#define AUE_TIMEOUT 1000
diff --git a/sys/dev/usb/if_upgt.c b/sys/dev/usb/if_upgt.c
index d65a53e9de7..8cc774668b0 100644
--- a/sys/dev/usb/if_upgt.c
+++ b/sys/dev/usb/if_upgt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_upgt.c,v 1.46 2009/08/03 09:33:10 blambert Exp $ */
+/* $OpenBSD: if_upgt.c,v 1.47 2009/08/10 20:02:19 deraadt Exp $ */
/*
* Copyright (c) 2007 Marcus Glocker <mglocker@openbsd.org>
@@ -88,7 +88,6 @@ int upgt_debug = 2;
int upgt_match(struct device *, void *, void *);
void upgt_attach(struct device *, struct device *, void *);
void upgt_attach_hook(void *);
-void upgt_shutdown_hook(void *);
int upgt_detach(struct device *, int);
int upgt_activate(struct device *, enum devact);
@@ -456,9 +455,6 @@ upgt_attach_hook(void *arg)
printf("%s: address %s\n",
sc->sc_dev.dv_xname, ether_sprintf(ic->ic_myaddr));
- /* setup shutdown hook */
- sc->sc_sdhook = shutdownhook_establish(upgt_shutdown_hook, sc);
-
/* device attached */
sc->sc_flags |= UPGT_DEVICE_ATTACHED;
@@ -467,18 +463,6 @@ fail:
printf("%s: %s failed!\n", sc->sc_dev.dv_xname, __func__);
}
-void
-upgt_shutdown_hook(void *arg)
-{
- struct upgt_softc *sc = (struct upgt_softc *)arg;
-
- DPRINTF(1, "%s: %s\n", sc->sc_dev.dv_xname, __func__);
-
- /* reset device */
- upgt_set_led(sc, UPGT_LED_OFF);
- (void)upgt_device_init(sc);
-}
-
int
upgt_detach(struct device *self, int flags)
{
@@ -520,9 +504,6 @@ upgt_detach(struct device *self, int flags)
if_detach(ifp);
}
- if (sc->sc_sdhook != NULL)
- shutdownhook_disestablish(sc->sc_sdhook);
-
splx(s);
usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev, &sc->sc_dev);
@@ -1294,6 +1275,8 @@ upgt_stop(struct upgt_softc *sc)
ifp->if_timer = 0;
ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE);
+ upgt_set_led(sc, UPGT_LED_OFF);
+
/* change device back to initial state */
ieee80211_new_state(ic, IEEE80211_S_INIT, -1);
}
diff --git a/sys/dev/usb/if_upgtvar.h b/sys/dev/usb/if_upgtvar.h
index 9e54fc298a6..434f7ff188e 100644
--- a/sys/dev/usb/if_upgtvar.h
+++ b/sys/dev/usb/if_upgtvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_upgtvar.h,v 1.14 2008/02/02 13:48:44 mglocker Exp $ */
+/* $OpenBSD: if_upgtvar.h,v 1.15 2009/08/10 20:02:19 deraadt Exp $ */
/*
* Copyright (c) 2007 Marcus Glocker <mglocker@openbsd.org>
@@ -420,7 +420,6 @@ struct upgt_softc {
int sc_led_blink;
unsigned sc_cur_chan;
uint8_t sc_cur_rateset[8];
- void *sc_sdhook;
int sc_flags;
uint8_t *sc_fw;