diff options
author | Brad Smith <brad@cvs.openbsd.org> | 2005-07-02 22:21:13 +0000 |
---|---|---|
committer | Brad Smith <brad@cvs.openbsd.org> | 2005-07-02 22:21:13 +0000 |
commit | 04ae3aef692ff7884067604e3b66019da4eed44e (patch) | |
tree | 13b944e8f6e9fc7d0e2548c07ca46013df1435c5 /sys/dev | |
parent | df57327f728f0553ddc0b9f1ef216734458efa96 (diff) |
clear IFF_RUNNING & IFF_OACTIVE in foo_stop() before de-allocating resources.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/usb/if_aue.c | 5 | ||||
-rw-r--r-- | sys/dev/usb/if_axe.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/if_cdce.c | 5 | ||||
-rw-r--r-- | sys/dev/usb/if_cue.c | 5 | ||||
-rw-r--r-- | sys/dev/usb/if_kue.c | 5 | ||||
-rw-r--r-- | sys/dev/usb/if_udav.c | 4 | ||||
-rw-r--r-- | sys/dev/usb/if_upl.c | 5 | ||||
-rw-r--r-- | sys/dev/usb/if_url.c | 4 |
8 files changed, 16 insertions, 21 deletions
diff --git a/sys/dev/usb/if_aue.c b/sys/dev/usb/if_aue.c index af8a8022801..1b89995f06d 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.40 2005/07/02 22:17:57 brad Exp $ */ +/* $OpenBSD: if_aue.c,v 1.41 2005/07/02 22:21:12 brad Exp $ */ /* $NetBSD: if_aue.c,v 1.82 2003/03/05 17:37:36 shiba Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -1660,6 +1660,7 @@ aue_stop(struct aue_softc *sc) ifp = GET_IFP(sc); ifp->if_timer = 0; + ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); aue_csr_write_1(sc, AUE_CTL0, 0); aue_csr_write_1(sc, AUE_CTL1, 0); @@ -1734,6 +1735,4 @@ aue_stop(struct aue_softc *sc) } sc->aue_link = 0; - - ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); } diff --git a/sys/dev/usb/if_axe.c b/sys/dev/usb/if_axe.c index 812d3d48f64..b44821ee3e4 100644 --- a/sys/dev/usb/if_axe.c +++ b/sys/dev/usb/if_axe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_axe.c,v 1.26 2005/07/02 22:17:57 brad Exp $ */ +/* $OpenBSD: if_axe.c,v 1.27 2005/07/02 22:21:12 brad Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000-2003 @@ -1297,6 +1297,7 @@ axe_stop(struct axe_softc *sc) ifp = &sc->arpcom.ac_if; ifp->if_timer = 0; + ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); usb_uncallout(sc->axe_stat_ch, axe_tick, sc); @@ -1368,6 +1369,5 @@ axe_stop(struct axe_softc *sc) } sc->axe_link = 0; - ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); } diff --git a/sys/dev/usb/if_cdce.c b/sys/dev/usb/if_cdce.c index e6a24ba819f..d52eefec67c 100644 --- a/sys/dev/usb/if_cdce.c +++ b/sys/dev/usb/if_cdce.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_cdce.c,v 1.8 2005/01/27 21:49:53 dlg Exp $ */ +/* $OpenBSD: if_cdce.c,v 1.9 2005/07/02 22:21:12 brad Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000-2003 Bill Paul <wpaul@windriver.com> @@ -345,6 +345,7 @@ cdce_stop(struct cdce_softc *sc) int i; ifp->if_timer = 0; + ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); if (sc->cdce_bulkin_pipe != NULL) { err = usbd_abort_pipe(sc->cdce_bulkin_pipe); @@ -391,8 +392,6 @@ cdce_stop(struct cdce_softc *sc) sc->cdce_cdata.cdce_tx_chain[i].cdce_xfer = NULL; } } - - ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); } Static int diff --git a/sys/dev/usb/if_cue.c b/sys/dev/usb/if_cue.c index 16af1784a7d..cf0569e4c45 100644 --- a/sys/dev/usb/if_cue.c +++ b/sys/dev/usb/if_cue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_cue.c,v 1.25 2005/06/08 17:03:02 henning Exp $ */ +/* $OpenBSD: if_cue.c,v 1.26 2005/07/02 22:21:12 brad Exp $ */ /* $NetBSD: if_cue.c,v 1.40 2002/07/11 21:14:26 augustss Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -1260,6 +1260,7 @@ cue_stop(struct cue_softc *sc) ifp = GET_IFP(sc); ifp->if_timer = 0; + ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); cue_csr_write_1(sc, CUE_ETHCTL, 0); cue_reset(sc); @@ -1331,6 +1332,4 @@ cue_stop(struct cue_softc *sc) sc->cue_cdata.cue_tx_chain[i].cue_xfer = NULL; } } - - ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); } diff --git a/sys/dev/usb/if_kue.c b/sys/dev/usb/if_kue.c index c43cdc1c533..435dfa371fe 100644 --- a/sys/dev/usb/if_kue.c +++ b/sys/dev/usb/if_kue.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_kue.c,v 1.36 2005/06/08 17:03:02 henning Exp $ */ +/* $OpenBSD: if_kue.c,v 1.37 2005/07/02 22:21:12 brad Exp $ */ /* $NetBSD: if_kue.c,v 1.50 2002/07/16 22:00:31 augustss Exp $ */ /* * Copyright (c) 1997, 1998, 1999, 2000 @@ -1220,6 +1220,7 @@ kue_stop(struct kue_softc *sc) ifp = GET_IFP(sc); ifp->if_timer = 0; + ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); /* Stop transfers. */ if (sc->kue_ep[KUE_ENDPT_RX] != NULL) { @@ -1287,6 +1288,4 @@ kue_stop(struct kue_softc *sc) sc->kue_cdata.kue_tx_chain[i].kue_xfer = NULL; } } - - ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); } diff --git a/sys/dev/usb/if_udav.c b/sys/dev/usb/if_udav.c index 5cf06ee4ae3..ce4cd039d8d 100644 --- a/sys/dev/usb/if_udav.c +++ b/sys/dev/usb/if_udav.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_udav.c,v 1.11 2005/07/02 22:17:58 brad Exp $ */ +/* $OpenBSD: if_udav.c,v 1.12 2005/07/02 22:21:12 brad Exp $ */ /* $NetBSD: if_udav.c,v 1.3 2004/04/23 17:25:25 itojun Exp $ */ /* $nabe: if_udav.c,v 1.3 2003/08/21 16:57:19 nabe Exp $ */ /* @@ -1320,6 +1320,7 @@ udav_stop(struct ifnet *ifp, int disable) DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); ifp->if_timer = 0; + ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); udav_reset(sc); @@ -1393,7 +1394,6 @@ udav_stop(struct ifnet *ifp, int disable) } sc->sc_link = 0; - ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); } /* Set media options */ diff --git a/sys/dev/usb/if_upl.c b/sys/dev/usb/if_upl.c index 95baee4b0a4..6f12cb938cc 100644 --- a/sys/dev/usb/if_upl.c +++ b/sys/dev/usb/if_upl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_upl.c,v 1.18 2005/06/08 17:03:02 henning Exp $ */ +/* $OpenBSD: if_upl.c,v 1.19 2005/07/02 22:21:12 brad Exp $ */ /* $NetBSD: if_upl.c,v 1.19 2002/07/11 21:14:26 augustss Exp $ */ /* * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -958,6 +958,7 @@ upl_stop(struct upl_softc *sc) ifp = &sc->sc_if; ifp->if_timer = 0; + ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); /* Stop transfers. */ if (sc->sc_ep[UPL_ENDPT_RX] != NULL) { @@ -1025,8 +1026,6 @@ upl_stop(struct upl_softc *sc) sc->sc_cdata.upl_tx_chain[i].upl_xfer = NULL; } } - - ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); } Static int diff --git a/sys/dev/usb/if_url.c b/sys/dev/usb/if_url.c index 8cfe7121c6b..0a7763d829c 100644 --- a/sys/dev/usb/if_url.c +++ b/sys/dev/usb/if_url.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_url.c,v 1.23 2005/07/02 22:17:58 brad Exp $ */ +/* $OpenBSD: if_url.c,v 1.24 2005/07/02 22:21:12 brad Exp $ */ /* $NetBSD: if_url.c,v 1.6 2002/09/29 10:19:21 martin Exp $ */ /* * Copyright (c) 2001, 2002 @@ -1240,6 +1240,7 @@ url_stop(struct ifnet *ifp, int disable) DPRINTF(("%s: %s: enter\n", USBDEVNAME(sc->sc_dev), __func__)); ifp->if_timer = 0; + ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); url_reset(sc); @@ -1313,7 +1314,6 @@ url_stop(struct ifnet *ifp, int disable) } sc->sc_link = 0; - ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); } /* Set media options */ |