summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/usb/if_aue.c8
-rw-r--r--sys/dev/usb/if_cdce.c10
-rw-r--r--sys/dev/usb/if_cue.c12
-rw-r--r--sys/dev/usb/if_kue.c12
-rw-r--r--sys/dev/usb/if_mos.c4
-rw-r--r--sys/dev/usb/if_upl.c12
-rw-r--r--sys/dev/usb/if_urndis.c9
-rw-r--r--sys/dev/usb/if_wi_usb.c11
-rw-r--r--sys/dev/usb/moscom.c3
-rw-r--r--sys/dev/usb/uark.c3
-rw-r--r--sys/dev/usb/ubsa.c3
-rw-r--r--sys/dev/usb/ubt.c4
-rw-r--r--sys/dev/usb/uchcom.c4
-rw-r--r--sys/dev/usb/ucom.c4
-rw-r--r--sys/dev/usb/ucycom.c3
-rw-r--r--sys/dev/usb/udcf.c4
-rw-r--r--sys/dev/usb/ueagle.c3
-rw-r--r--sys/dev/usb/uftdi.c3
-rw-r--r--sys/dev/usb/ugen.c3
-rw-r--r--sys/dev/usb/uhid.c4
-rw-r--r--sys/dev/usb/uhidev.c3
-rw-r--r--sys/dev/usb/uipaq.c3
-rw-r--r--sys/dev/usb/ulpt.c3
-rw-r--r--sys/dev/usb/umbg.c4
-rw-r--r--sys/dev/usb/umct.c3
-rw-r--r--sys/dev/usb/umidi.c3
-rw-r--r--sys/dev/usb/umodem.c4
-rw-r--r--sys/dev/usb/uplcom.c3
-rw-r--r--sys/dev/usb/urio.c3
-rw-r--r--sys/dev/usb/uscanner.c3
-rw-r--r--sys/dev/usb/uslcom.c3
-rw-r--r--sys/dev/usb/uthum.c4
-rw-r--r--sys/dev/usb/uticom.c3
-rw-r--r--sys/dev/usb/utrh.c4
-rw-r--r--sys/dev/usb/uts.c4
-rw-r--r--sys/dev/usb/uvisor.c3
-rw-r--r--sys/dev/usb/uvscom.c5
37 files changed, 61 insertions, 116 deletions
diff --git a/sys/dev/usb/if_aue.c b/sys/dev/usb/if_aue.c
index 8ad72d44e0f..576e9618c9b 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.78 2010/09/22 14:38:52 yuo Exp $ */
+/* $OpenBSD: if_aue.c,v 1.79 2010/09/24 08:33:58 yuo Exp $ */
/* $NetBSD: if_aue.c,v 1.82 2003/03/05 17:37:36 shiba Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -849,14 +849,12 @@ aue_detach(struct device *self, int flags)
DPRINTFN(2,("%s: %s: enter\n", sc->aue_dev.dv_xname, __func__));
- if (!sc->aue_attached) {
- /* Detached before attached finished, so just bail out. */
+ /* Detached before attached finished, so just bail out. */
+ if (!sc->aue_attached)
return (0);
- }
timeout_del(&sc->aue_stat_ch);
- sc->aue_dying = 1;
/*
* Remove any pending tasks. They cannot be executing because they run
* in the same thread as detach.
diff --git a/sys/dev/usb/if_cdce.c b/sys/dev/usb/if_cdce.c
index f6619167dc1..c98c2195460 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.45 2010/03/06 17:09:31 mk Exp $ */
+/* $OpenBSD: if_cdce.c,v 1.46 2010/09/24 08:33:58 yuo Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000-2003 Bill Paul <wpaul@windriver.com>
@@ -372,12 +372,10 @@ cdce_detach(struct device *self, int flags)
struct ifnet *ifp = GET_IFP(sc);
int s;
- s = splusb();
-
- if (!sc->cdce_attached) {
- splx(s);
+ if (!sc->cdce_attached)
return (0);
- }
+
+ s = splusb();
if (ifp->if_flags & IFF_RUNNING)
cdce_stop(sc);
diff --git a/sys/dev/usb/if_cue.c b/sys/dev/usb/if_cue.c
index 788df72aa2b..5a964f6c539 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.52 2009/10/13 19:33:17 pirofti Exp $ */
+/* $OpenBSD: if_cue.c,v 1.53 2010/09/24 08:33:58 yuo Exp $ */
/* $NetBSD: if_cue.c,v 1.40 2002/07/11 21:14:26 augustss Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -555,7 +555,12 @@ cue_detach(struct device *self, int flags)
DPRINTFN(2,("%s: %s: enter\n", sc->cue_dev.dv_xname, __func__));
+ /* Detached before attached finished, so just bail out. */
+ if (!sc->cue_attached)
+ return (0);
+
timeout_del(&sc->cue_stat_ch);
+
/*
* Remove any pending task. It cannot be executing because it run
* in the same thread as detach.
@@ -563,11 +568,6 @@ cue_detach(struct device *self, int flags)
usb_rem_task(sc->cue_udev, &sc->cue_tick_task);
usb_rem_task(sc->cue_udev, &sc->cue_stop_task);
- if (!sc->cue_attached) {
- /* Detached before attached finished, so just bail out. */
- return (0);
- }
-
s = splusb();
if (ifp->if_flags & IFF_RUNNING)
diff --git a/sys/dev/usb/if_kue.c b/sys/dev/usb/if_kue.c
index 641a7757cfe..d39bfea97b9 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.59 2009/10/13 19:33:17 pirofti Exp $ */
+/* $OpenBSD: if_kue.c,v 1.60 2010/09/24 08:33:58 yuo Exp $ */
/* $NetBSD: if_kue.c,v 1.50 2002/07/16 22:00:31 augustss Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -556,6 +556,10 @@ kue_detach(struct device *self, int flags)
struct ifnet *ifp = GET_IFP(sc);
int s;
+ /* Detached before attached finished, so just bail out. */
+ if (!sc->kue_attached)
+ return (0);
+
s = splusb(); /* XXX why? */
if (sc->kue_mcfilters != NULL) {
@@ -563,12 +567,6 @@ kue_detach(struct device *self, int flags)
sc->kue_mcfilters = NULL;
}
- if (!sc->kue_attached) {
- /* Detached before attached finished, so just bail out. */
- splx(s);
- return (0);
- }
-
if (ifp->if_flags & IFF_RUNNING)
kue_stop(sc);
diff --git a/sys/dev/usb/if_mos.c b/sys/dev/usb/if_mos.c
index 9dcd50eb94c..622c023c160 100644
--- a/sys/dev/usb/if_mos.c
+++ b/sys/dev/usb/if_mos.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_mos.c,v 1.7 2009/10/13 19:33:17 pirofti Exp $ */
+/* $OpenBSD: if_mos.c,v 1.8 2010/09/24 08:33:58 yuo Exp $ */
/*
* Copyright (c) 2008 Johann Christian Rode <jcrode@gmx.net>
@@ -771,8 +771,6 @@ mos_detach(struct device *self, int flags)
timeout_del(&sc->mos_stat_ch);
- sc->mos_dying = 1;
-
if (sc->mos_ep[MOS_ENDPT_TX] != NULL)
usbd_abort_pipe(sc->mos_ep[MOS_ENDPT_TX]);
if (sc->mos_ep[MOS_ENDPT_RX] != NULL)
diff --git a/sys/dev/usb/if_upl.c b/sys/dev/usb/if_upl.c
index cd35425a870..a3599941706 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.43 2009/10/13 19:33:17 pirofti Exp $ */
+/* $OpenBSD: if_upl.c,v 1.44 2010/09/24 08:33:59 yuo Exp $ */
/* $NetBSD: if_upl.c,v 1.19 2002/07/11 21:14:26 augustss Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -325,13 +325,11 @@ upl_detach(struct device *self, int flags)
DPRINTFN(2,("%s: %s: enter\n", sc->sc_dev.dv_xname, __func__));
- s = splusb();
-
- if (!sc->sc_attached) {
- /* Detached before attached finished, so just bail out. */
- splx(s);
+ /* Detached before attached finished, so just bail out. */
+ if (!sc->sc_attached)
return (0);
- }
+
+ s = splusb();
if (ifp->if_flags & IFF_RUNNING)
upl_stop(sc);
diff --git a/sys/dev/usb/if_urndis.c b/sys/dev/usb/if_urndis.c
index 34a48204703..e0ad72f88ce 100644
--- a/sys/dev/usb/if_urndis.c
+++ b/sys/dev/usb/if_urndis.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_urndis.c,v 1.25 2010/07/31 11:51:45 mk Exp $ */
+/* $OpenBSD: if_urndis.c,v 1.26 2010/09/24 08:33:59 yuo Exp $ */
/*
* Copyright (c) 2010 Jonathan Armani <armani@openbsd.org>
@@ -1521,17 +1521,14 @@ urndis_detach(struct device *self, int flags)
int s;
sc = (void*)self;
- s = splusb();
DPRINTF(("urndis_detach: %s flags %u\n", DEVNAME(sc),
flags));
- if (!sc->sc_attached) {
- splx(s);
+ if (!sc->sc_attached)
return 0;
- }
- sc->sc_dying = 1;
+ s = splusb();
ifp = GET_IFP(sc);
diff --git a/sys/dev/usb/if_wi_usb.c b/sys/dev/usb/if_wi_usb.c
index ba2834948e2..c601a9c6d91 100644
--- a/sys/dev/usb/if_wi_usb.c
+++ b/sys/dev/usb/if_wi_usb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_wi_usb.c,v 1.47 2010/07/02 03:13:42 tedu Exp $ */
+/* $OpenBSD: if_wi_usb.c,v 1.48 2010/09/24 08:33:59 yuo Exp $ */
/*
* Copyright (c) 2003 Dale Rahn. All rights reserved.
@@ -400,7 +400,10 @@ wi_usb_detach(struct device *self, int flags)
int s;
int err;
- sc->wi_usb_dying = 1;
+ /* Detached before attach finished, so just bail out. */
+ if (!sc->wi_usb_attached)
+ return (0);
+
if (sc->wi_thread_info != NULL) {
sc->wi_thread_info->dying = 1;
@@ -409,10 +412,6 @@ wi_usb_detach(struct device *self, int flags)
wakeup(sc->wi_thread_info);
}
- if (!sc->wi_usb_attached) {
- /* Detached before attach finished, so just bail out. */
- return (0);
- }
/* tasks? */
s = splusb();
diff --git a/sys/dev/usb/moscom.c b/sys/dev/usb/moscom.c
index 10b61df001c..0c97510ee54 100644
--- a/sys/dev/usb/moscom.c
+++ b/sys/dev/usb/moscom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: moscom.c,v 1.13 2009/10/13 19:33:17 pirofti Exp $ */
+/* $OpenBSD: moscom.c,v 1.14 2010/09/24 08:33:59 yuo Exp $ */
/*
* Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org>
@@ -273,7 +273,6 @@ moscom_detach(struct device *self, int flags)
struct moscom_softc *sc = (struct moscom_softc *)self;
int rv = 0;
- sc->sc_dying = 1;
if (sc->sc_subdev != NULL) {
rv = config_detach(sc->sc_subdev, flags);
sc->sc_subdev = NULL;
diff --git a/sys/dev/usb/uark.c b/sys/dev/usb/uark.c
index 5d6776c5315..552ab237c70 100644
--- a/sys/dev/usb/uark.c
+++ b/sys/dev/usb/uark.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uark.c,v 1.13 2009/10/13 19:33:17 pirofti Exp $ */
+/* $OpenBSD: uark.c,v 1.14 2010/09/24 08:33:59 yuo Exp $ */
/*
* Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org>
@@ -200,7 +200,6 @@ uark_detach(struct device *self, int flags)
struct uark_softc *sc = (struct uark_softc *)self;
int rv = 0;
- sc->sc_dying = 1;
if (sc->sc_subdev != NULL) {
rv = config_detach(sc->sc_subdev, flags);
sc->sc_subdev = NULL;
diff --git a/sys/dev/usb/ubsa.c b/sys/dev/usb/ubsa.c
index 69a80f7cc79..86d06c9904f 100644
--- a/sys/dev/usb/ubsa.c
+++ b/sys/dev/usb/ubsa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ubsa.c,v 1.49 2010/04/22 19:47:30 mk Exp $ */
+/* $OpenBSD: ubsa.c,v 1.50 2010/09/24 08:33:59 yuo Exp $ */
/* $NetBSD: ubsa.c,v 1.5 2002/11/25 00:51:33 fvdl Exp $ */
/*-
* Copyright (c) 2002, Alexander Kabaev <kan.FreeBSD.org>.
@@ -394,7 +394,6 @@ ubsa_detach(struct device *self, int flags)
sc->sc_intr_pipe = NULL;
}
- sc->sc_dying = 1;
if (sc->sc_subdev != NULL) {
rv = config_detach(sc->sc_subdev, flags);
sc->sc_subdev = NULL;
diff --git a/sys/dev/usb/ubt.c b/sys/dev/usb/ubt.c
index 21482e8338c..d2ae4ef2b02 100644
--- a/sys/dev/usb/ubt.c
+++ b/sys/dev/usb/ubt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ubt.c,v 1.18 2010/08/31 16:20:48 deraadt Exp $ */
+/* $OpenBSD: ubt.c,v 1.19 2010/09/24 08:33:59 yuo Exp $ */
/* $NetBSD: ubt.c,v 1.35 2008/07/28 14:19:26 drochner Exp $ */
/*-
@@ -460,8 +460,6 @@ ubt_detach(struct device *self, int flags)
/* XXX pmf_device_deregister in NetBSD (power hook) */
- sc->sc_dying = 1;
-
if (!sc->sc_ok)
return 0;
diff --git a/sys/dev/usb/uchcom.c b/sys/dev/usb/uchcom.c
index a79c59d3e02..d1c51d2a2a0 100644
--- a/sys/dev/usb/uchcom.c
+++ b/sys/dev/usb/uchcom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uchcom.c,v 1.10 2010/02/20 11:44:56 jsg Exp $ */
+/* $OpenBSD: uchcom.c,v 1.11 2010/09/24 08:33:59 yuo Exp $ */
/* $NetBSD: uchcom.c,v 1.1 2007/09/03 17:57:37 tshiozak Exp $ */
/*
@@ -327,8 +327,6 @@ uchcom_detach(struct device *self, int flags)
uchcom_close_intr_pipe(sc);
- sc->sc_dying = 1;
-
if (sc->sc_subdev != NULL) {
rv = config_detach(sc->sc_subdev, flags);
sc->sc_subdev = NULL;
diff --git a/sys/dev/usb/ucom.c b/sys/dev/usb/ucom.c
index 9a6050170d2..05eb737f20f 100644
--- a/sys/dev/usb/ucom.c
+++ b/sys/dev/usb/ucom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ucom.c,v 1.50 2010/07/02 17:27:01 nicm Exp $ */
+/* $OpenBSD: ucom.c,v 1.51 2010/09/24 08:33:59 yuo Exp $ */
/* $NetBSD: ucom.c,v 1.49 2003/01/01 00:10:25 thorpej Exp $ */
/*
@@ -225,8 +225,6 @@ ucom_detach(struct device *self, int flags)
DPRINTF(("ucom_detach: sc=%p flags=%d tp=%p, pipe=%d,%d\n",
sc, flags, tp, sc->sc_bulkin_no, sc->sc_bulkout_no));
- sc->sc_dying = 1;
-
if (sc->sc_bulkin_pipe != NULL)
usbd_abort_pipe(sc->sc_bulkin_pipe);
if (sc->sc_bulkout_pipe != NULL)
diff --git a/sys/dev/usb/ucycom.c b/sys/dev/usb/ucycom.c
index 70c3d77165f..b3eea11c681 100644
--- a/sys/dev/usb/ucycom.c
+++ b/sys/dev/usb/ucycom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ucycom.c,v 1.16 2010/04/20 22:05:43 tedu Exp $ */
+/* $OpenBSD: ucycom.c,v 1.17 2010/09/24 08:33:59 yuo Exp $ */
/* $NetBSD: ucycom.c,v 1.3 2005/08/05 07:27:47 skrll Exp $ */
/*
@@ -584,7 +584,6 @@ ucycom_detach(struct device *self, int flags)
struct ucycom_softc *sc = (struct ucycom_softc *)self;
DPRINTF(("ucycom_detach: sc=%p flags=%d\n", sc, flags));
- sc->sc_dying = 1;
if (sc->sc_subdev != NULL) {
config_detach(sc->sc_subdev, flags);
sc->sc_subdev = NULL;
diff --git a/sys/dev/usb/udcf.c b/sys/dev/usb/udcf.c
index 9da552c4856..81947e31097 100644
--- a/sys/dev/usb/udcf.c
+++ b/sys/dev/usb/udcf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udcf.c,v 1.47 2009/10/13 19:33:17 pirofti Exp $ */
+/* $OpenBSD: udcf.c,v 1.48 2010/09/24 08:33:59 yuo Exp $ */
/*
* Copyright (c) 2006, 2007, 2008 Marc Balmer <mbalmer@openbsd.org>
@@ -333,8 +333,6 @@ udcf_detach(struct device *self, int flags)
{
struct udcf_softc *sc = (struct udcf_softc *)self;
- sc->sc_dying = 1;
-
timeout_del(&sc->sc_to);
timeout_del(&sc->sc_bv_to);
timeout_del(&sc->sc_mg_to);
diff --git a/sys/dev/usb/ueagle.c b/sys/dev/usb/ueagle.c
index 46f17b247cf..ff1a00d3976 100644
--- a/sys/dev/usb/ueagle.c
+++ b/sys/dev/usb/ueagle.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ueagle.c,v 1.27 2010/08/27 17:08:01 jsg Exp $ */
+/* $OpenBSD: ueagle.c,v 1.28 2010/09/24 08:33:59 yuo Exp $ */
/*-
* Copyright (c) 2003-2006
@@ -242,7 +242,6 @@ ueagle_detach(struct device *self, int flags)
if (sc->fw != NULL)
return 0; /* shortcut for pre-firmware devices */
- sc->gone = 1;
ueagle_stop(ifp, 1);
/* wait for stat thread to exit properly */
diff --git a/sys/dev/usb/uftdi.c b/sys/dev/usb/uftdi.c
index 479fc1a3606..98050b36a38 100644
--- a/sys/dev/usb/uftdi.c
+++ b/sys/dev/usb/uftdi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uftdi.c,v 1.56 2010/02/23 23:31:54 jsg Exp $ */
+/* $OpenBSD: uftdi.c,v 1.57 2010/09/24 08:33:59 yuo Exp $ */
/* $NetBSD: uftdi.c,v 1.14 2003/02/23 04:20:07 simonb Exp $ */
/*
@@ -912,7 +912,6 @@ uftdi_detach(struct device *self, int flags)
struct uftdi_softc *sc = (struct uftdi_softc *)self;
DPRINTF(("uftdi_detach: sc=%p flags=%d\n", sc, flags));
- sc->sc_dying = 1;
if (sc->sc_subdev != NULL) {
config_detach(sc->sc_subdev, flags);
sc->sc_subdev = NULL;
diff --git a/sys/dev/usb/ugen.c b/sys/dev/usb/ugen.c
index ec32cf2bf9d..457b77cd894 100644
--- a/sys/dev/usb/ugen.c
+++ b/sys/dev/usb/ugen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ugen.c,v 1.61 2009/11/09 17:53:39 nicm Exp $ */
+/* $OpenBSD: ugen.c,v 1.62 2010/09/24 08:33:59 yuo Exp $ */
/* $NetBSD: ugen.c,v 1.63 2002/11/26 18:49:48 christos Exp $ */
/* $FreeBSD: src/sys/dev/usb/ugen.c,v 1.26 1999/11/17 22:33:41 n_hibma Exp $ */
@@ -753,7 +753,6 @@ ugen_detach(struct device *self, int flags)
DPRINTF(("ugen_detach: sc=%p flags=%d\n", sc, flags));
- sc->sc_dying = 1;
/* Abort all pipes. Causes processes waiting for transfer to wake. */
for (i = 0; i < USB_MAX_ENDPOINTS; i++) {
for (dir = OUT; dir <= IN; dir++) {
diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c
index 3bf6476e824..8eec7c7c064 100644
--- a/sys/dev/usb/uhid.c
+++ b/sys/dev/usb/uhid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhid.c,v 1.49 2010/08/02 23:17:34 miod Exp $ */
+/* $OpenBSD: uhid.c,v 1.50 2010/09/24 08:33:59 yuo Exp $ */
/* $NetBSD: uhid.c,v 1.57 2003/03/11 16:44:00 augustss Exp $ */
/*
@@ -175,8 +175,6 @@ uhid_detach(struct device *self, int flags)
DPRINTF(("uhid_detach: sc=%p flags=%d\n", sc, flags));
- sc->sc_dying = 1;
-
if (sc->sc_hdev.sc_state & UHIDEV_OPEN) {
s = splusb();
if (--sc->sc_refcnt >= 0) {
diff --git a/sys/dev/usb/uhidev.c b/sys/dev/usb/uhidev.c
index ec3fcfdc17b..0128a0499aa 100644
--- a/sys/dev/usb/uhidev.c
+++ b/sys/dev/usb/uhidev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhidev.c,v 1.39 2010/08/31 16:38:42 deraadt Exp $ */
+/* $OpenBSD: uhidev.c,v 1.40 2010/09/24 08:33:59 yuo Exp $ */
/* $NetBSD: uhidev.c,v 1.14 2003/03/11 16:44:00 augustss Exp $ */
/*
@@ -363,7 +363,6 @@ uhidev_detach(struct device *self, int flags)
DPRINTF(("uhidev_detach: sc=%p flags=%d\n", sc, flags));
- sc->sc_dying = 1;
if (sc->sc_ipipe != NULL)
usbd_abort_pipe(sc->sc_ipipe);
diff --git a/sys/dev/usb/uipaq.c b/sys/dev/usb/uipaq.c
index 04b50cd0a6c..2f4ae671d71 100644
--- a/sys/dev/usb/uipaq.c
+++ b/sys/dev/usb/uipaq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipaq.c,v 1.17 2009/10/13 19:33:19 pirofti Exp $ */
+/* $OpenBSD: uipaq.c,v 1.18 2010/09/24 08:33:59 yuo Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -383,7 +383,6 @@ uipaq_detach(struct device *self, int flags)
int rv = 0;
DPRINTF(("uipaq_detach: sc=%p flags=%d\n", sc, flags));
- sc->sc_dying = 1;
if (sc->sc_subdev != NULL) {
rv |= config_detach(sc->sc_subdev, flags);
sc->sc_subdev = NULL;
diff --git a/sys/dev/usb/ulpt.c b/sys/dev/usb/ulpt.c
index 900b5909f3b..3b1444f6223 100644
--- a/sys/dev/usb/ulpt.c
+++ b/sys/dev/usb/ulpt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ulpt.c,v 1.36 2009/10/13 19:33:19 pirofti Exp $ */
+/* $OpenBSD: ulpt.c,v 1.37 2010/09/24 08:33:59 yuo Exp $ */
/* $NetBSD: ulpt.c,v 1.57 2003/01/05 10:19:42 scw Exp $ */
/* $FreeBSD: src/sys/dev/usb/ulpt.c,v 1.24 1999/11/17 22:33:44 n_hibma Exp $ */
@@ -327,7 +327,6 @@ ulpt_detach(struct device *self, int flags)
DPRINTF(("ulpt_detach: sc=%p\n", sc));
- sc->sc_dying = 1;
if (sc->sc_out_pipe != NULL)
usbd_abort_pipe(sc->sc_out_pipe);
if (sc->sc_in_pipe != NULL)
diff --git a/sys/dev/usb/umbg.c b/sys/dev/usb/umbg.c
index d88ca94a1e1..e5724f9fe06 100644
--- a/sys/dev/usb/umbg.c
+++ b/sys/dev/usb/umbg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: umbg.c,v 1.11 2009/11/21 14:30:35 deraadt Exp $ */
+/* $OpenBSD: umbg.c,v 1.12 2010/09/24 08:33:59 yuo Exp $ */
/*
* Copyright (c) 2007 Marc Balmer <mbalmer@openbsd.org>
@@ -296,8 +296,6 @@ umbg_detach(struct device *self, int flags)
struct umbg_softc *sc = (struct umbg_softc *)self;
usbd_status err;
- sc->sc_dying = 1;
-
timeout_del(&sc->sc_to);
timeout_del(&sc->sc_it_to);
diff --git a/sys/dev/usb/umct.c b/sys/dev/usb/umct.c
index dc507210f35..dc5f90db9d2 100644
--- a/sys/dev/usb/umct.c
+++ b/sys/dev/usb/umct.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: umct.c,v 1.29 2009/10/13 19:33:19 pirofti Exp $ */
+/* $OpenBSD: umct.c,v 1.30 2010/09/24 08:33:59 yuo Exp $ */
/* $NetBSD: umct.c,v 1.10 2003/02/23 04:20:07 simonb Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -327,7 +327,6 @@ umct_detach(struct device *self, int flags)
sc->sc_intr_pipe = NULL;
}
- sc->sc_dying = 1;
if (sc->sc_subdev != NULL) {
rv = config_detach(sc->sc_subdev, flags);
sc->sc_subdev = NULL;
diff --git a/sys/dev/usb/umidi.c b/sys/dev/usb/umidi.c
index 45d88678e12..825957a4585 100644
--- a/sys/dev/usb/umidi.c
+++ b/sys/dev/usb/umidi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: umidi.c,v 1.26 2009/10/13 19:33:19 pirofti Exp $ */
+/* $OpenBSD: umidi.c,v 1.27 2010/09/24 08:33:59 yuo Exp $ */
/* $NetBSD: umidi.c,v 1.16 2002/07/11 21:14:32 augustss Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -256,7 +256,6 @@ umidi_detach(struct device *self, int flags)
DPRINTFN(1,("umidi_detach\n"));
- sc->sc_dying = 1;
detach_all_mididevs(sc, flags);
free_all_mididevs(sc);
free_all_jacks(sc);
diff --git a/sys/dev/usb/umodem.c b/sys/dev/usb/umodem.c
index cdd6a20995b..707123f80e1 100644
--- a/sys/dev/usb/umodem.c
+++ b/sys/dev/usb/umodem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: umodem.c,v 1.37 2009/10/13 19:33:19 pirofti Exp $ */
+/* $OpenBSD: umodem.c,v 1.38 2010/09/24 08:33:59 yuo Exp $ */
/* $NetBSD: umodem.c,v 1.45 2002/09/23 05:51:23 simonb Exp $ */
/*
@@ -743,8 +743,6 @@ umodem_detach(struct device *self, int flags)
DPRINTF(("umodem_detach: sc=%p flags=%d\n", sc, flags));
- sc->sc_dying = 1;
-
if (sc->sc_subdev != NULL)
rv = config_detach(sc->sc_subdev, flags);
diff --git a/sys/dev/usb/uplcom.c b/sys/dev/usb/uplcom.c
index 3fdf5abfdc9..18ba31047ff 100644
--- a/sys/dev/usb/uplcom.c
+++ b/sys/dev/usb/uplcom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uplcom.c,v 1.52 2009/10/13 19:33:19 pirofti Exp $ */
+/* $OpenBSD: uplcom.c,v 1.53 2010/09/24 08:33:59 yuo Exp $ */
/* $NetBSD: uplcom.c,v 1.29 2002/09/23 05:51:23 simonb Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -432,7 +432,6 @@ uplcom_detach(struct device *self, int flags)
sc->sc_intr_pipe = NULL;
}
- sc->sc_dying = 1;
if (sc->sc_subdev != NULL) {
rv = config_detach(sc->sc_subdev, flags);
sc->sc_subdev = NULL;
diff --git a/sys/dev/usb/urio.c b/sys/dev/usb/urio.c
index a4495c593e0..acae4629506 100644
--- a/sys/dev/usb/urio.c
+++ b/sys/dev/usb/urio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: urio.c,v 1.35 2009/10/13 19:33:19 pirofti Exp $ */
+/* $OpenBSD: urio.c,v 1.36 2010/09/24 08:33:59 yuo Exp $ */
/* $NetBSD: urio.c,v 1.15 2002/10/23 09:14:02 jdolecek Exp $ */
/*
@@ -198,7 +198,6 @@ urio_detach(struct device *self, int flags)
DPRINTF(("urio_detach: sc=%p flags=%d\n", sc, flags));
- sc->sc_dying = 1;
/* Abort all pipes. Causes processes waiting for transfer to wake. */
if (sc->sc_in_pipe != NULL) {
usbd_abort_pipe(sc->sc_in_pipe);
diff --git a/sys/dev/usb/uscanner.c b/sys/dev/usb/uscanner.c
index 839bf4d76d8..a2ad5472bce 100644
--- a/sys/dev/usb/uscanner.c
+++ b/sys/dev/usb/uscanner.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uscanner.c,v 1.42 2010/07/03 03:59:17 krw Exp $ */
+/* $OpenBSD: uscanner.c,v 1.43 2010/09/24 08:33:59 yuo Exp $ */
/* $NetBSD: uscanner.c,v 1.40 2003/01/27 00:32:44 wiz Exp $ */
/*
@@ -581,7 +581,6 @@ uscanner_detach(struct device *self, int flags)
DPRINTF(("uscanner_detach: sc=%p flags=%d\n", sc, flags));
- sc->sc_dying = 1;
sc->sc_dev_flags = 0; /* make close really close device */
/* Abort all pipes. Causes processes waiting for transfer to wake. */
diff --git a/sys/dev/usb/uslcom.c b/sys/dev/usb/uslcom.c
index 1676548ac0e..f8f2f5f519b 100644
--- a/sys/dev/usb/uslcom.c
+++ b/sys/dev/usb/uslcom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uslcom.c,v 1.20 2009/10/13 19:33:19 pirofti Exp $ */
+/* $OpenBSD: uslcom.c,v 1.21 2010/09/24 08:33:59 yuo Exp $ */
/*
* Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org>
@@ -253,7 +253,6 @@ uslcom_detach(struct device *self, int flags)
struct uslcom_softc *sc = (struct uslcom_softc *)self;
int rv = 0;
- sc->sc_dying = 1;
if (sc->sc_subdev != NULL) {
rv = config_detach(sc->sc_subdev, flags);
sc->sc_subdev = NULL;
diff --git a/sys/dev/usb/uthum.c b/sys/dev/usb/uthum.c
index 9642e5b08b8..4a77310bd46 100644
--- a/sys/dev/usb/uthum.c
+++ b/sys/dev/usb/uthum.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uthum.c,v 1.14 2010/04/20 14:37:38 deraadt Exp $ */
+/* $OpenBSD: uthum.c,v 1.15 2010/09/24 08:33:59 yuo Exp $ */
/*
* Copyright (c) 2009, 2010 Yojiro UO <yuo@nui.org>
@@ -270,8 +270,6 @@ uthum_detach(struct device *self, int flags)
struct uthum_softc *sc = (struct uthum_softc *)self;
int i, rv = 0;
- sc->sc_dying = 1;
-
if (sc->sc_num_sensors > 0) {
wakeup(&sc->sc_sensortask);
sensordev_deinstall(&sc->sc_sensordev);
diff --git a/sys/dev/usb/uticom.c b/sys/dev/usb/uticom.c
index 534a8dad254..1cf329106b4 100644
--- a/sys/dev/usb/uticom.c
+++ b/sys/dev/usb/uticom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uticom.c,v 1.4 2009/10/13 19:33:19 pirofti Exp $ */
+/* $OpenBSD: uticom.c,v 1.5 2010/09/24 08:33:59 yuo Exp $ */
/*
* Copyright (c) 2005 Dmitry Komissaroff <dxi@mail.ru>.
*
@@ -466,7 +466,6 @@ uticom_detach(struct device *self, int flags)
DPRINTF(("%s: uticom_detach: sc = %p\n",
sc->sc_dev.dv_xname, sc));
- sc->sc_dying = 1;
if (sc->sc_subdev != NULL) {
config_detach(sc->sc_subdev, flags);
diff --git a/sys/dev/usb/utrh.c b/sys/dev/usb/utrh.c
index ef7f4e0c0e0..9f5bf0c77c4 100644
--- a/sys/dev/usb/utrh.c
+++ b/sys/dev/usb/utrh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: utrh.c,v 1.4 2010/04/15 09:40:46 yuo Exp $ */
+/* $OpenBSD: utrh.c,v 1.5 2010/09/24 08:33:59 yuo Exp $ */
/*
* Copyright (c) 2009 Yojiro UO <yuo@nui.org>
@@ -181,8 +181,6 @@ utrh_detach(struct device *self, int flags)
struct utrh_softc *sc = (struct utrh_softc *)self;
int i, rv = 0;
- sc->sc_dying = 1;
-
if (sc->sc_num_sensors > 0) {
wakeup(&sc->sc_sensortask);
sensordev_deinstall(&sc->sc_sensordev);
diff --git a/sys/dev/usb/uts.c b/sys/dev/usb/uts.c
index aaa0312a1e0..12452e4ae12 100644
--- a/sys/dev/usb/uts.c
+++ b/sys/dev/usb/uts.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uts.c,v 1.26 2009/12/05 20:39:31 matthieu Exp $ */
+/* $OpenBSD: uts.c,v 1.27 2010/09/24 08:33:59 yuo Exp $ */
/*
* Copyright (c) 2007 Robert Nagy <robert@openbsd.org>
@@ -241,8 +241,6 @@ uts_detach(struct device *self, int flags)
sc->sc_intr_pipe = NULL;
}
- sc->sc_dying = 1;
-
if (sc->sc_wsmousedev != NULL) {
rv = config_detach(sc->sc_wsmousedev, flags);
sc->sc_wsmousedev = NULL;
diff --git a/sys/dev/usb/uvisor.c b/sys/dev/usb/uvisor.c
index 754982e8edb..7aaf54d4d3f 100644
--- a/sys/dev/usb/uvisor.c
+++ b/sys/dev/usb/uvisor.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvisor.c,v 1.41 2010/08/31 16:38:42 deraadt Exp $ */
+/* $OpenBSD: uvisor.c,v 1.42 2010/09/24 08:33:59 yuo Exp $ */
/* $NetBSD: uvisor.c,v 1.21 2003/08/03 21:59:26 nathanw Exp $ */
/*
@@ -408,7 +408,6 @@ uvisor_detach(struct device *self, int flags)
int i;
DPRINTF(("uvisor_detach: sc=%p flags=%d\n", sc, flags));
- sc->sc_dying = 1;
for (i = 0; i < sc->sc_numcon; i++) {
if (sc->sc_subdevs[i] != NULL) {
rv |= config_detach(sc->sc_subdevs[i], flags);
diff --git a/sys/dev/usb/uvscom.c b/sys/dev/usb/uvscom.c
index df06723244b..aab3928f12c 100644
--- a/sys/dev/usb/uvscom.c
+++ b/sys/dev/usb/uvscom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvscom.c,v 1.20 2009/10/13 19:33:19 pirofti Exp $ */
+/* $OpenBSD: uvscom.c,v 1.21 2010/09/24 08:33:59 yuo Exp $ */
/* $NetBSD: uvscom.c,v 1.9 2003/02/12 15:36:20 ichiro Exp $ */
/*-
* Copyright (c) 2001-2002, Shunsuke Akiyama <akiyama@jp.FreeBSD.org>.
@@ -376,8 +376,6 @@ uvscom_detach(struct device *self, int flags)
DPRINTF(("uvscom_detach: sc = %p\n", sc));
- sc->sc_dying = 1;
-
if (sc->sc_intr_pipe != NULL) {
usbd_abort_pipe(sc->sc_intr_pipe);
usbd_close_pipe(sc->sc_intr_pipe);
@@ -385,7 +383,6 @@ uvscom_detach(struct device *self, int flags)
sc->sc_intr_pipe = NULL;
}
- sc->sc_dying = 1;
if (sc->sc_subdev != NULL) {
rv = config_detach(sc->sc_subdev, flags);
sc->sc_subdev = NULL;