summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJacob Meuser <jakemsr@cvs.openbsd.org>2011-01-25 20:03:37 +0000
committerJacob Meuser <jakemsr@cvs.openbsd.org>2011-01-25 20:03:37 +0000
commit498cf2dc36fa36de9644663ecf827002dd1d0d42 (patch)
tree01605ac7fc47161753494c6101154a0e366cd607 /sys/dev
parent412272acee23634745871fe5ba77ee2bfd896951 (diff)
garbage collect "usb events". without /dev/usb there is no way to access
them from userland, and nothing in the kernel uses them. ok krw@, miod@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/usb/if_athn_usb.c5
-rw-r--r--sys/dev/usb/if_aue.c8
-rw-r--r--sys/dev/usb/if_axe.c8
-rw-r--r--sys/dev/usb/if_cdce.c8
-rw-r--r--sys/dev/usb/if_cue.c8
-rw-r--r--sys/dev/usb/if_kue.c5
-rw-r--r--sys/dev/usb/if_mos.c8
-rw-r--r--sys/dev/usb/if_otus.c6
-rw-r--r--sys/dev/usb/if_ral.c8
-rw-r--r--sys/dev/usb/if_rsu.c5
-rw-r--r--sys/dev/usb/if_rum.c8
-rw-r--r--sys/dev/usb/if_run.c6
-rw-r--r--sys/dev/usb/if_uath.c8
-rw-r--r--sys/dev/usb/if_udav.c7
-rw-r--r--sys/dev/usb/if_upgt.c6
-rw-r--r--sys/dev/usb/if_upl.c8
-rw-r--r--sys/dev/usb/if_url.c7
-rw-r--r--sys/dev/usb/if_urndis.c7
-rw-r--r--sys/dev/usb/if_urtw.c8
-rw-r--r--sys/dev/usb/if_urtwn.c5
-rw-r--r--sys/dev/usb/if_wi_usb.c7
-rw-r--r--sys/dev/usb/if_zyd.c8
-rw-r--r--sys/dev/usb/moscom.c8
-rw-r--r--sys/dev/usb/uark.c8
-rw-r--r--sys/dev/usb/uaudio.c8
-rw-r--r--sys/dev/usb/uberry.c9
-rw-r--r--sys/dev/usb/ubsa.c8
-rw-r--r--sys/dev/usb/ubt.c8
-rw-r--r--sys/dev/usb/uchcom.c8
-rw-r--r--sys/dev/usb/ucycom.c5
-rw-r--r--sys/dev/usb/udcf.c7
-rw-r--r--sys/dev/usb/udfu.c9
-rw-r--r--sys/dev/usb/udl.c6
-rw-r--r--sys/dev/usb/udsbr.c8
-rw-r--r--sys/dev/usb/ueagle.c8
-rw-r--r--sys/dev/usb/uftdi.c8
-rw-r--r--sys/dev/usb/ugen.c8
-rw-r--r--sys/dev/usb/uhid.c8
-rw-r--r--sys/dev/usb/uhidev.c8
-rw-r--r--sys/dev/usb/uhub.c7
-rw-r--r--sys/dev/usb/uipaq.c8
-rw-r--r--sys/dev/usb/ulpt.c7
-rw-r--r--sys/dev/usb/umass.c8
-rw-r--r--sys/dev/usb/umbg.c6
-rw-r--r--sys/dev/usb/umct.c8
-rw-r--r--sys/dev/usb/umidi.c8
-rw-r--r--sys/dev/usb/umodem.c8
-rw-r--r--sys/dev/usb/umsm.c8
-rw-r--r--sys/dev/usb/uow.c5
-rw-r--r--sys/dev/usb/uplcom.c8
-rw-r--r--sys/dev/usb/urio.c8
-rw-r--r--sys/dev/usb/usb.c242
-rw-r--r--sys/dev/usb/usb_subr.c5
-rw-r--r--sys/dev/usb/usbdi.h9
-rw-r--r--sys/dev/usb/uscanner.c7
-rw-r--r--sys/dev/usb/uslcom.c8
-rw-r--r--sys/dev/usb/uthum.c7
-rw-r--r--sys/dev/usb/uticom.c4
-rw-r--r--sys/dev/usb/utrh.c7
-rw-r--r--sys/dev/usb/uts.c6
-rw-r--r--sys/dev/usb/utwitch.c7
-rw-r--r--sys/dev/usb/uvideo.c6
-rw-r--r--sys/dev/usb/uvisor.c8
-rw-r--r--sys/dev/usb/uvscom.c8
64 files changed, 68 insertions, 631 deletions
diff --git a/sys/dev/usb/if_athn_usb.c b/sys/dev/usb/if_athn_usb.c
index cdd0cd841c9..ba23373f482 100644
--- a/sys/dev/usb/if_athn_usb.c
+++ b/sys/dev/usb/if_athn_usb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_athn_usb.c,v 1.6 2011/01/08 15:18:01 damien Exp $ */
+/* $OpenBSD: if_athn_usb.c,v 1.7 2011/01/25 20:03:35 jakemsr Exp $ */
/*-
* Copyright (c) 2011 Damien Bergamini <damien.bergamini@free.fr>
@@ -281,8 +281,6 @@ athn_usb_attach(struct device *parent, struct device *self, void *aux)
mountroothook_establish(athn_usb_attachhook, usc);
else
athn_usb_attachhook(usc);
-
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, usc->sc_udev, &sc->sc_dev);
}
int
@@ -304,7 +302,6 @@ athn_usb_detach(struct device *self, int flags)
athn_usb_free_tx_list(usc);
athn_usb_free_rx_list(usc);
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, usc->sc_udev, &sc->sc_dev);
return (0);
}
diff --git a/sys/dev/usb/if_aue.c b/sys/dev/usb/if_aue.c
index 3b4ec433d84..b814896aa3f 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.83 2010/12/06 04:41:39 jakemsr Exp $ */
+/* $OpenBSD: if_aue.c,v 1.84 2011/01/25 20:03:35 jakemsr Exp $ */
/* $NetBSD: if_aue.c,v 1.82 2003/03/05 17:37:36 shiba Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -837,9 +837,6 @@ aue_attach(struct device *parent, struct device *self, void *aux)
timeout_set(&sc->aue_stat_ch, aue_tick, sc);
splx(s);
-
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->aue_udev,
- &sc->aue_dev);
}
int
@@ -887,9 +884,6 @@ aue_detach(struct device *self, int flags)
}
splx(s);
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->aue_udev,
- &sc->aue_dev);
-
return (0);
}
diff --git a/sys/dev/usb/if_axe.c b/sys/dev/usb/if_axe.c
index 9420b0376c1..559c19a9b02 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.104 2010/12/06 04:41:39 jakemsr Exp $ */
+/* $OpenBSD: if_axe.c,v 1.105 2011/01/25 20:03:35 jakemsr Exp $ */
/*
* Copyright (c) 2005, 2006, 2007 Jonathan Gray <jsg@openbsd.org>
@@ -814,9 +814,6 @@ axe_attach(struct device *parent, struct device *self, void *aux)
timeout_set(&sc->axe_stat_ch, axe_tick, sc);
splx(s);
-
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->axe_udev,
- &sc->axe_dev);
}
int
@@ -876,9 +873,6 @@ axe_detach(struct device *self, int flags)
}
splx(s);
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->axe_udev,
- &sc->axe_dev);
-
return (0);
}
diff --git a/sys/dev/usb/if_cdce.c b/sys/dev/usb/if_cdce.c
index 2e91ec8c0bb..5af1b42e044 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.48 2011/01/16 22:35:29 jakemsr Exp $ */
+/* $OpenBSD: if_cdce.c,v 1.49 2011/01/25 20:03:35 jakemsr Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000-2003 Bill Paul <wpaul@windriver.com>
@@ -360,9 +360,6 @@ found:
sc->cdce_attached = 1;
splx(s);
-
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->cdce_udev,
- &sc->cdce_dev);
}
int
@@ -388,9 +385,6 @@ cdce_detach(struct device *self, int flags)
sc->cdce_attached = 0;
splx(s);
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->cdce_udev,
- &sc->cdce_dev);
-
return (0);
}
diff --git a/sys/dev/usb/if_cue.c b/sys/dev/usb/if_cue.c
index 16959425ceb..7effeda01dd 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.58 2010/12/17 13:48:06 jasper Exp $ */
+/* $OpenBSD: if_cue.c,v 1.59 2011/01/25 20:03:35 jakemsr Exp $ */
/* $NetBSD: if_cue.c,v 1.40 2002/07/11 21:14:26 augustss Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -542,9 +542,6 @@ cue_attach(struct device *parent, struct device *self, void *aux)
timeout_set(&sc->cue_stat_ch, cue_tick, sc);
splx(s);
-
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->cue_udev,
- &sc->cue_dev);
}
int
@@ -586,9 +583,6 @@ cue_detach(struct device *self, int flags)
splx(s);
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->cue_udev,
- &sc->cue_dev);
-
return (0);
}
diff --git a/sys/dev/usb/if_kue.c b/sys/dev/usb/if_kue.c
index 43cc076aab4..f989a438838 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.62 2010/12/17 13:48:06 jasper Exp $ */
+/* $OpenBSD: if_kue.c,v 1.63 2011/01/25 20:03:35 jakemsr Exp $ */
/* $NetBSD: if_kue.c,v 1.50 2002/07/16 22:00:31 augustss Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -543,9 +543,6 @@ kue_attach(struct device *parent, struct device *self, void *aux)
mountroothook_establish(kue_attachhook, sc);
else
kue_attachhook(sc);
-
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->kue_udev,
- &sc->kue_dev);
}
int
diff --git a/sys/dev/usb/if_mos.c b/sys/dev/usb/if_mos.c
index eaf49a790da..1f3ad7ce20e 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.12 2010/12/06 04:41:39 jakemsr Exp $ */
+/* $OpenBSD: if_mos.c,v 1.13 2011/01/25 20:03:35 jakemsr Exp $ */
/*
* Copyright (c) 2008 Johann Christian Rode <jcrode@gmx.net>
@@ -753,9 +753,6 @@ mos_attach(struct device *parent, struct device *self, void *aux)
timeout_set(&sc->mos_stat_ch, mos_tick, sc);
splx(s);
-
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->mos_udev,
- &sc->mos_dev);
}
int
@@ -814,9 +811,6 @@ mos_detach(struct device *self, int flags)
}
splx(s);
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->mos_udev,
- &sc->mos_dev);
-
return (0);
}
diff --git a/sys/dev/usb/if_otus.c b/sys/dev/usb/if_otus.c
index 46ac48850cb..bc27b1a209f 100644
--- a/sys/dev/usb/if_otus.c
+++ b/sys/dev/usb/if_otus.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_otus.c,v 1.26 2011/01/06 19:49:58 damien Exp $ */
+/* $OpenBSD: if_otus.c,v 1.27 2011/01/25 20:03:35 jakemsr Exp $ */
/*-
* Copyright (c) 2009 Damien Bergamini <damien.bergamini@free.fr>
@@ -234,8 +234,6 @@ otus_attach(struct device *parent, struct device *self, void *aux)
mountroothook_establish(otus_attachhook, sc);
else
otus_attachhook(sc);
-
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev, &sc->sc_dev);
}
int
@@ -266,8 +264,6 @@ otus_detach(struct device *self, int flags)
splx(s);
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev, &sc->sc_dev);
-
return 0;
}
diff --git a/sys/dev/usb/if_ral.c b/sys/dev/usb/if_ral.c
index df7fb3ae835..c1df5018544 100644
--- a/sys/dev/usb/if_ral.c
+++ b/sys/dev/usb/if_ral.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_ral.c,v 1.119 2010/12/30 05:22:51 jakemsr Exp $ */
+/* $OpenBSD: if_ral.c,v 1.120 2011/01/25 20:03:35 jakemsr Exp $ */
/*-
* Copyright (c) 2005, 2006
@@ -349,9 +349,6 @@ ural_attach(struct device *parent, struct device *self, void *aux)
sc->sc_txtap.wt_ihdr.it_len = htole16(sc->sc_txtap_len);
sc->sc_txtap.wt_ihdr.it_present = htole32(RAL_TX_RADIOTAP_PRESENT);
#endif
-
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
- &sc->sc_dev);
}
int
@@ -397,9 +394,6 @@ ural_detach(struct device *self, int flags)
splx(s);
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
- &sc->sc_dev);
-
return 0;
}
diff --git a/sys/dev/usb/if_rsu.c b/sys/dev/usb/if_rsu.c
index 5d62c85c879..cb2adf71c63 100644
--- a/sys/dev/usb/if_rsu.c
+++ b/sys/dev/usb/if_rsu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_rsu.c,v 1.9 2010/12/31 20:50:14 damien Exp $ */
+/* $OpenBSD: if_rsu.c,v 1.10 2011/01/25 20:03:35 jakemsr Exp $ */
/*-
* Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -332,8 +332,6 @@ rsu_attach(struct device *parent, struct device *self, void *aux)
sc->sc_txtap.wt_ihdr.it_len = htole16(sc->sc_txtap_len);
sc->sc_txtap.wt_ihdr.it_present = htole32(RSU_TX_RADIOTAP_PRESENT);
#endif
-
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev, &sc->sc_dev);
}
int
@@ -362,7 +360,6 @@ rsu_detach(struct device *self, int flags)
rsu_free_rx_list(sc);
splx(s);
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev, &sc->sc_dev);
return (0);
}
diff --git a/sys/dev/usb/if_rum.c b/sys/dev/usb/if_rum.c
index 53560d33c8f..4cf6b23aa78 100644
--- a/sys/dev/usb/if_rum.c
+++ b/sys/dev/usb/if_rum.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_rum.c,v 1.96 2010/12/30 05:22:51 jakemsr Exp $ */
+/* $OpenBSD: if_rum.c,v 1.97 2011/01/25 20:03:35 jakemsr Exp $ */
/*-
* Copyright (c) 2005-2007 Damien Bergamini <damien.bergamini@free.fr>
@@ -446,9 +446,6 @@ rum_attach(struct device *parent, struct device *self, void *aux)
sc->sc_txtap.wt_ihdr.it_len = htole16(sc->sc_txtap_len);
sc->sc_txtap.wt_ihdr.it_present = htole32(RT2573_TX_RADIOTAP_PRESENT);
#endif
-
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
- &sc->sc_dev);
}
int
@@ -492,9 +489,6 @@ rum_detach(struct device *self, int flags)
splx(s);
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
- &sc->sc_dev);
-
return 0;
}
diff --git a/sys/dev/usb/if_run.c b/sys/dev/usb/if_run.c
index 3f83af2ca6e..5efabd765f8 100644
--- a/sys/dev/usb/if_run.c
+++ b/sys/dev/usb/if_run.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_run.c,v 1.83 2011/01/10 16:59:05 damien Exp $ */
+/* $OpenBSD: if_run.c,v 1.84 2011/01/25 20:03:35 jakemsr Exp $ */
/*-
* Copyright (c) 2008-2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -582,8 +582,6 @@ run_attach(struct device *parent, struct device *self, void *aux)
sc->sc_txtap.wt_ihdr.it_len = htole16(sc->sc_txtap_len);
sc->sc_txtap.wt_ihdr.it_present = htole32(RUN_TX_RADIOTAP_PRESENT);
#endif
-
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev, &sc->sc_dev);
}
int
@@ -631,8 +629,6 @@ run_detach(struct device *self, int flags)
splx(s);
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev, &sc->sc_dev);
-
return 0;
}
diff --git a/sys/dev/usb/if_uath.c b/sys/dev/usb/if_uath.c
index 5a3b5748a16..cd79e4d327d 100644
--- a/sys/dev/usb/if_uath.c
+++ b/sys/dev/usb/if_uath.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_uath.c,v 1.48 2011/01/06 19:49:58 damien Exp $ */
+/* $OpenBSD: if_uath.c,v 1.49 2011/01/25 20:03:35 jakemsr Exp $ */
/*-
* Copyright (c) 2006
@@ -416,9 +416,6 @@ uath_attach(struct device *parent, struct device *self, void *aux)
sc->sc_txtap.wt_ihdr.it_present = htole32(UATH_TX_RADIOTAP_PRESENT);
#endif
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
- &sc->sc_dev);
-
return;
fail4: uath_free_tx_data_list(sc);
@@ -467,9 +464,6 @@ uath_detach(struct device *self, int flags)
splx(s);
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
- &sc->sc_dev);
-
return 0;
}
diff --git a/sys/dev/usb/if_udav.c b/sys/dev/usb/if_udav.c
index 111ffd30a62..f99a516c113 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.50 2010/12/06 04:41:39 jakemsr Exp $ */
+/* $OpenBSD: if_udav.c,v 1.51 2011/01/25 20:03:35 jakemsr 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 $ */
/*
@@ -312,8 +312,6 @@ udav_attach(struct device *parent, struct device *self, void *aux)
splx(s);
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, dev, &sc->sc_dev);
-
return;
bad:
@@ -367,9 +365,6 @@ udav_detach(struct device *self, int flags)
#endif
splx(s);
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
- &sc->sc_dev);
-
return (0);
}
diff --git a/sys/dev/usb/if_upgt.c b/sys/dev/usb/if_upgt.c
index 7ef4965a571..b2f26ae00f7 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.54 2010/12/06 04:41:39 jakemsr Exp $ */
+/* $OpenBSD: if_upgt.c,v 1.55 2011/01/25 20:03:35 jakemsr Exp $ */
/*
* Copyright (c) 2007 Marcus Glocker <mglocker@openbsd.org>
@@ -449,8 +449,6 @@ upgt_attach_hook(void *arg)
sc->sc_txtap.wt_ihdr.it_present = htole32(UPGT_TX_RADIOTAP_PRESENT);
#endif
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev, &sc->sc_dev);
-
printf("%s: address %s\n",
sc->sc_dev.dv_xname, ether_sprintf(ic->ic_myaddr));
@@ -504,8 +502,6 @@ upgt_detach(struct device *self, int flags)
splx(s);
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev, &sc->sc_dev);
-
return (0);
}
diff --git a/sys/dev/usb/if_upl.c b/sys/dev/usb/if_upl.c
index 4dd1d3f2391..25ac4c92ac1 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.46 2010/12/17 13:48:06 jasper Exp $ */
+/* $OpenBSD: if_upl.c,v 1.47 2011/01/25 20:03:35 jakemsr Exp $ */
/* $NetBSD: if_upl.c,v 1.19 2002/07/11 21:14:26 augustss Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -301,9 +301,6 @@ upl_attach(struct device *parent, struct device *self, void *aux)
sc->sc_attached = 1;
splx(s);
-
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
- &sc->sc_dev);
}
int
@@ -338,9 +335,6 @@ upl_detach(struct device *self, int flags)
sc->sc_attached = 0;
splx(s);
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
- &sc->sc_dev);
-
return (0);
}
diff --git a/sys/dev/usb/if_url.c b/sys/dev/usb/if_url.c
index ff4a10df4b3..af6381b5fa6 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.60 2010/12/06 04:41:39 jakemsr Exp $ */
+/* $OpenBSD: if_url.c,v 1.61 2011/01/25 20:03:35 jakemsr Exp $ */
/* $NetBSD: if_url.c,v 1.6 2002/09/29 10:19:21 martin Exp $ */
/*
* Copyright (c) 2001, 2002
@@ -318,8 +318,6 @@ url_attach(struct device *parent, struct device *self, void *aux)
splx(s);
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, dev, &sc->sc_dev);
-
return;
bad:
@@ -374,9 +372,6 @@ url_detach(struct device *self, int flags)
splx(s);
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
- &sc->sc_dev);
-
return (0);
}
diff --git a/sys/dev/usb/if_urndis.c b/sys/dev/usb/if_urndis.c
index 71a3a093593..61637c717d2 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.28 2011/01/16 22:35:29 jakemsr Exp $ */
+/* $OpenBSD: if_urndis.c,v 1.29 2011/01/25 20:03:35 jakemsr Exp $ */
/*
* Copyright (c) 2010 Jonathan Armani <armani@openbsd.org>
@@ -1509,8 +1509,6 @@ urndis_attach(struct device *parent, struct device *self, void *aux)
sc->sc_attached = 1;
splx(s);
-
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev, &sc->sc_dev);
}
int
@@ -1542,9 +1540,6 @@ urndis_detach(struct device *self, int flags)
splx(s);
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
- &sc->sc_dev);
-
return 0;
}
diff --git a/sys/dev/usb/if_urtw.c b/sys/dev/usb/if_urtw.c
index 98675dc3675..8a3834cb220 100644
--- a/sys/dev/usb/if_urtw.c
+++ b/sys/dev/usb/if_urtw.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_urtw.c,v 1.37 2011/01/11 21:04:46 damien Exp $ */
+/* $OpenBSD: if_urtw.c,v 1.38 2011/01/25 20:03:35 jakemsr Exp $ */
/*-
* Copyright (c) 2009 Martynas Venckus <martynas@openbsd.org>
@@ -756,9 +756,6 @@ urtw_attach(struct device *parent, struct device *self, void *aux)
sc->sc_txtap.wt_ihdr.it_present = htole32(URTW_TX_RADIOTAP_PRESENT);
#endif
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
- &sc->sc_dev);
-
printf(", address %s\n", ether_sprintf(ic->ic_myaddr));
return;
@@ -797,9 +794,6 @@ urtw_detach(struct device *self, int flags)
splx(s);
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
- &sc->sc_dev);
-
return (0);
}
diff --git a/sys/dev/usb/if_urtwn.c b/sys/dev/usb/if_urtwn.c
index f8468d1067e..1a1e09a2b87 100644
--- a/sys/dev/usb/if_urtwn.c
+++ b/sys/dev/usb/if_urtwn.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_urtwn.c,v 1.12 2010/12/31 20:50:14 damien Exp $ */
+/* $OpenBSD: if_urtwn.c,v 1.13 2011/01/25 20:03:35 jakemsr Exp $ */
/*-
* Copyright (c) 2010 Damien Bergamini <damien.bergamini@free.fr>
@@ -360,8 +360,6 @@ urtwn_attach(struct device *parent, struct device *self, void *aux)
sc->sc_txtap.wt_ihdr.it_len = htole16(sc->sc_txtap_len);
sc->sc_txtap.wt_ihdr.it_present = htole32(URTWN_TX_RADIOTAP_PRESENT);
#endif
-
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev, &sc->sc_dev);
}
int
@@ -392,7 +390,6 @@ urtwn_detach(struct device *self, int flags)
urtwn_free_rx_list(sc);
splx(s);
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev, &sc->sc_dev);
return (0);
}
diff --git a/sys/dev/usb/if_wi_usb.c b/sys/dev/usb/if_wi_usb.c
index 802cd674571..df32a86c047 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.49 2010/10/27 17:51:11 jakemsr Exp $ */
+/* $OpenBSD: if_wi_usb.c,v 1.50 2011/01/25 20:03:35 jakemsr Exp $ */
/*
* Copyright (c) 2003 Dale Rahn. All rights reserved.
@@ -386,9 +386,6 @@ wi_usb_attach(struct device *parent, struct device *self, void *aux)
sc->wi_usb_attached = 1;
kthread_create_deferred(wi_usb_start_thread, sc);
-
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->wi_usb_udev,
- &sc->wi_usb_dev);
}
int
@@ -488,8 +485,6 @@ wi_usb_detach(struct device *self, int flags)
splx(s);
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->wi_usb_udev,
- &sc->wi_usb_dev);
return (0);
}
diff --git a/sys/dev/usb/if_zyd.c b/sys/dev/usb/if_zyd.c
index 09ac920088b..5312b8bbee6 100644
--- a/sys/dev/usb/if_zyd.c
+++ b/sys/dev/usb/if_zyd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_zyd.c,v 1.86 2010/12/06 04:41:39 jakemsr Exp $ */
+/* $OpenBSD: if_zyd.c,v 1.87 2011/01/25 20:03:36 jakemsr Exp $ */
/*-
* Copyright (c) 2006 by Damien Bergamini <damien.bergamini@free.fr>
@@ -427,9 +427,6 @@ zyd_complete_attach(struct zyd_softc *sc)
sc->sc_txtap.wt_ihdr.it_present = htole32(ZYD_TX_RADIOTAP_PRESENT);
#endif
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
- &sc->sc_dev);
-
fail: return error;
}
@@ -467,9 +464,6 @@ zyd_detach(struct device *self, int flags)
splx(s);
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
- &sc->sc_dev);
-
return 0;
}
diff --git a/sys/dev/usb/moscom.c b/sys/dev/usb/moscom.c
index 0c97510ee54..c646c4a6331 100644
--- a/sys/dev/usb/moscom.c
+++ b/sys/dev/usb/moscom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: moscom.c,v 1.14 2010/09/24 08:33:59 yuo Exp $ */
+/* $OpenBSD: moscom.c,v 1.15 2011/01/25 20:03:36 jakemsr Exp $ */
/*
* Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org>
@@ -260,9 +260,6 @@ moscom_attach(struct device *parent, struct device *self, void *aux)
uca.methods = &moscom_methods;
uca.arg = sc;
uca.info = NULL;
-
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
- &sc->sc_dev);
sc->sc_subdev = config_found_sm(self, &uca, ucomprint, ucomsubmatch);
}
@@ -278,9 +275,6 @@ moscom_detach(struct device *self, int flags)
sc->sc_subdev = NULL;
}
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
- &sc->sc_dev);
-
return (rv);
}
diff --git a/sys/dev/usb/uark.c b/sys/dev/usb/uark.c
index 552ab237c70..fd21138a97d 100644
--- a/sys/dev/usb/uark.c
+++ b/sys/dev/usb/uark.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uark.c,v 1.14 2010/09/24 08:33:59 yuo Exp $ */
+/* $OpenBSD: uark.c,v 1.15 2011/01/25 20:03:36 jakemsr Exp $ */
/*
* Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org>
@@ -187,9 +187,6 @@ uark_attach(struct device *parent, struct device *self, void *aux)
uca.methods = &uark_methods;
uca.arg = sc;
uca.info = NULL;
-
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
- &sc->sc_dev);
sc->sc_subdev = config_found_sm(self, &uca, ucomprint, ucomsubmatch);
}
@@ -205,9 +202,6 @@ uark_detach(struct device *self, int flags)
sc->sc_subdev = NULL;
}
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
- &sc->sc_dev);
-
return (rv);
}
diff --git a/sys/dev/usb/uaudio.c b/sys/dev/usb/uaudio.c
index 7a357bec7b0..439fc248543 100644
--- a/sys/dev/usb/uaudio.c
+++ b/sys/dev/usb/uaudio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uaudio.c,v 1.90 2011/01/16 22:35:29 jakemsr Exp $ */
+/* $OpenBSD: uaudio.c,v 1.91 2011/01/25 20:03:36 jakemsr Exp $ */
/* $NetBSD: uaudio.c,v 1.90 2004/10/29 17:12:53 kent Exp $ */
/*
@@ -560,9 +560,6 @@ uaudio_attach(struct device *parent, struct device *self, void *aux)
uaudio_create_encodings(sc);
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
- &sc->sc_dev);
-
DPRINTF(("uaudio_attach: doing audio_attach_mi\n"));
sc->sc_audiodev = audio_attach_mi(&uaudio_hw_if, sc, &sc->sc_dev);
}
@@ -605,9 +602,6 @@ uaudio_detach(struct device *self, int flags)
if (sc->sc_audiodev != NULL)
rv = config_detach(sc->sc_audiodev, flags);
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
- &sc->sc_dev);
-
return (rv);
}
diff --git a/sys/dev/usb/uberry.c b/sys/dev/usb/uberry.c
index d3da23d31e5..5e2a9a917b5 100644
--- a/sys/dev/usb/uberry.c
+++ b/sys/dev/usb/uberry.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uberry.c,v 1.18 2010/12/27 03:03:50 jakemsr Exp $ */
+/* $OpenBSD: uberry.c,v 1.19 2011/01/25 20:03:36 jakemsr Exp $ */
/*-
* Copyright (c) 2006 Theo de Raadt <deraadt@openbsd.org>
@@ -140,18 +140,13 @@ uberry_attach(struct device *parent, struct device *self, void *aux)
*/
usb_needs_reattach(sc->sc_udev);
}
-
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
- &sc->sc_dev);
}
int
uberry_detach(struct device *self, int flags)
{
- struct uberry_softc *sc = (struct uberry_softc *)self;
+ /* struct uberry_softc *sc = (struct uberry_softc *)self; */
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
- &sc->sc_dev);
return 0;
}
diff --git a/sys/dev/usb/ubsa.c b/sys/dev/usb/ubsa.c
index 2d9e1d33c9a..a6b796ea4da 100644
--- a/sys/dev/usb/ubsa.c
+++ b/sys/dev/usb/ubsa.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ubsa.c,v 1.51 2010/12/17 21:53:34 jasper Exp $ */
+/* $OpenBSD: ubsa.c,v 1.52 2011/01/25 20:03:36 jakemsr Exp $ */
/* $NetBSD: ubsa.c,v 1.5 2002/11/25 00:51:33 fvdl Exp $ */
/*-
* Copyright (c) 2002, Alexander Kabaev <kan.FreeBSD.org>.
@@ -365,9 +365,6 @@ ubsa_attach(struct device *parent, struct device *self, void *aux)
uca.arg = sc;
uca.info = NULL;
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
- &sc->sc_dev);
-
DPRINTF(("ubsa: in = 0x%x, out = 0x%x, intr = 0x%x\n",
uca.bulkin, uca.bulkout, sc->sc_intr_number));
@@ -398,9 +395,6 @@ ubsa_detach(struct device *self, int flags)
sc->sc_subdev = NULL;
}
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
- &sc->sc_dev);
-
return (rv);
}
diff --git a/sys/dev/usb/ubt.c b/sys/dev/usb/ubt.c
index d2ae4ef2b02..6212a3556ad 100644
--- a/sys/dev/usb/ubt.c
+++ b/sys/dev/usb/ubt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ubt.c,v 1.19 2010/09/24 08:33:59 yuo Exp $ */
+/* $OpenBSD: ubt.c,v 1.20 2011/01/25 20:03:36 jakemsr Exp $ */
/* $NetBSD: ubt.c,v 1.35 2008/07/28 14:19:26 drochner Exp $ */
/*-
@@ -443,9 +443,6 @@ ubt_attach(struct device *parent, struct device *self, void *aux)
/* Attach HCI */
sc->sc_unit = hci_attach(&ubt_hci, &sc->sc_dev, 0);
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
- &sc->sc_dev);
-
sc->sc_ok = 1;
/* XXX pmf_device_deregister in NetBSD (power hook) */
}
@@ -485,9 +482,6 @@ ubt_detach(struct device *self, int flags)
splx(s);
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
- &sc->sc_dev);
-
DPRINTFN(1, "driver detached\n");
return 0;
diff --git a/sys/dev/usb/uchcom.c b/sys/dev/usb/uchcom.c
index 935cd7b5c35..10bdadf5c6f 100644
--- a/sys/dev/usb/uchcom.c
+++ b/sys/dev/usb/uchcom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uchcom.c,v 1.13 2010/12/17 22:38:54 jasper Exp $ */
+/* $OpenBSD: uchcom.c,v 1.14 2011/01/25 20:03:36 jakemsr Exp $ */
/* $NetBSD: uchcom.c,v 1.1 2007/09/03 17:57:37 tshiozak Exp $ */
/*
@@ -303,9 +303,6 @@ uchcom_attach(struct device *parent, struct device *self, void *aux)
uca.methods = &uchcom_methods;
uca.arg = sc;
uca.info = NULL;
-
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
- &sc->sc_dev);
sc->sc_subdev = config_found_sm(self, &uca, ucomprint, ucomsubmatch);
@@ -330,9 +327,6 @@ uchcom_detach(struct device *self, int flags)
sc->sc_subdev = NULL;
}
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
- &sc->sc_dev);
-
return rv;
}
diff --git a/sys/dev/usb/ucycom.c b/sys/dev/usb/ucycom.c
index df32025da22..025dfab5caa 100644
--- a/sys/dev/usb/ucycom.c
+++ b/sys/dev/usb/ucycom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ucycom.c,v 1.18 2010/12/19 21:32:57 jasper Exp $ */
+/* $OpenBSD: ucycom.c,v 1.19 2011/01/25 20:03:36 jakemsr Exp $ */
/* $NetBSD: ucycom.c,v 1.3 2005/08/05 07:27:47 skrll Exp $ */
/*
@@ -237,9 +237,6 @@ ucycom_attach(struct device *parent, struct device *self, void *aux)
uca.arg = sc;
uca.info = NULL;
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
- &sc->sc_hdev.sc_dev);
-
sc->sc_subdev = config_found_sm(self, &uca, ucomprint, ucomsubmatch);
DPRINTF(("ucycom_attach: complete %p\n", sc->sc_subdev));
}
diff --git a/sys/dev/usb/udcf.c b/sys/dev/usb/udcf.c
index 03e556b9aa6..d4b04048916 100644
--- a/sys/dev/usb/udcf.c
+++ b/sys/dev/usb/udcf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udcf.c,v 1.52 2010/12/17 21:53:34 jasper Exp $ */
+/* $OpenBSD: udcf.c,v 1.53 2011/01/25 20:03:36 jakemsr Exp $ */
/*
* Copyright (c) 2006, 2007, 2008 Marc Balmer <mbalmer@openbsd.org>
@@ -275,9 +275,6 @@ udcf_attach(struct device *parent, struct device *self, void *aux)
break;
}
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
- &sc->sc_dev);
-
/* convert timevals to hz */
t.tv_sec = 0L;
t.tv_usec = 150000L;
@@ -355,8 +352,6 @@ udcf_detach(struct device *self, int flags)
if (sc->sc_detect_ct)
usb_rem_task(sc->sc_udev, &sc->sc_ct_task);
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
- &sc->sc_dev);
return 0;
}
diff --git a/sys/dev/usb/udfu.c b/sys/dev/usb/udfu.c
index b64ae3a0e9d..563045d3d49 100644
--- a/sys/dev/usb/udfu.c
+++ b/sys/dev/usb/udfu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udfu.c,v 1.2 2010/12/27 03:03:50 jakemsr Exp $ */
+/* $OpenBSD: udfu.c,v 1.3 2011/01/25 20:03:36 jakemsr Exp $ */
/*
* Copyright (c) 2009 Federico G. Schwindt <fgsch@openbsd.org>
@@ -154,18 +154,13 @@ udfu_attach(struct device *parent, struct device *self, void *aux)
if (!sc->sc_will_detach && err == 0)
usb_needs_reattach(sc->sc_udev);
-
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
- &sc->sc_dev);
}
int
udfu_detach(struct device *self, int flags)
{
- struct udfu_softc *sc = (struct udfu_softc *)self;
+ /* struct udfu_softc *sc = (struct udfu_softc *)self; */
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
- &sc->sc_dev);
return (0);
}
diff --git a/sys/dev/usb/udl.c b/sys/dev/usb/udl.c
index ad853bd481b..7fec77332f2 100644
--- a/sys/dev/usb/udl.c
+++ b/sys/dev/usb/udl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udl.c,v 1.66 2010/12/27 03:03:50 jakemsr Exp $ */
+/* $OpenBSD: udl.c,v 1.67 2011/01/25 20:03:36 jakemsr Exp $ */
/*
* Copyright (c) 2009 Marcus Glocker <mglocker@openbsd.org>
@@ -389,8 +389,6 @@ udl_attach(struct device *parent, struct device *self, void *aux)
sc->sc_wsdisplay = config_found(self, &aa, wsemuldisplaydevprint);
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev, &sc->sc_dev);
-
/*
* Load Huffman table.
*/
@@ -479,8 +477,6 @@ udl_detach(struct device *self, int flags)
if (sc->sc_wsdisplay != NULL)
config_detach(sc->sc_wsdisplay, DETACH_FORCE);
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev, &sc->sc_dev);
-
return (0);
}
diff --git a/sys/dev/usb/udsbr.c b/sys/dev/usb/udsbr.c
index 35f2a432467..a3b9e2084c6 100644
--- a/sys/dev/usb/udsbr.c
+++ b/sys/dev/usb/udsbr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: udsbr.c,v 1.21 2009/10/13 19:33:17 pirofti Exp $ */
+/* $OpenBSD: udsbr.c,v 1.22 2011/01/25 20:03:36 jakemsr Exp $ */
/* $NetBSD: udsbr.c,v 1.7 2002/07/11 21:14:27 augustss Exp $ */
/*
@@ -147,9 +147,6 @@ udsbr_attach(struct device *parent, struct device *self, void *aux)
DPRINTFN(10, ("udsbr_attach: %p\n", sc->sc_udev));
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
- &sc->sc_dev);
-
sc->sc_child = radio_attach_mi(&udsbr_hw_if, sc, &sc->sc_dev);
}
@@ -162,9 +159,6 @@ udsbr_detach(struct device *self, int flags)
if (sc->sc_child != NULL)
rv = config_detach(sc->sc_child, flags);
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
- &sc->sc_dev);
-
return (rv);
}
diff --git a/sys/dev/usb/ueagle.c b/sys/dev/usb/ueagle.c
index a7749a131fa..c9a3f524686 100644
--- a/sys/dev/usb/ueagle.c
+++ b/sys/dev/usb/ueagle.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ueagle.c,v 1.31 2010/12/06 05:46:17 jakemsr Exp $ */
+/* $OpenBSD: ueagle.c,v 1.32 2011/01/25 20:03:36 jakemsr Exp $ */
/*-
* Copyright (c) 2003-2006
@@ -229,9 +229,6 @@ ueagle_attach(struct device *parent, struct device *self, void *aux)
#if NBPFILTER > 0
bpfattach(&ifp->if_bpf, ifp, DLT_RAW, 0);
#endif
-
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
- &sc->sc_dev);
}
int
@@ -259,9 +256,6 @@ ueagle_detach(struct device *self, int flags)
if (ifp->if_softc != NULL)
if_detach(ifp);
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
- &sc->sc_dev);
-
return 0;
}
diff --git a/sys/dev/usb/uftdi.c b/sys/dev/usb/uftdi.c
index 98050b36a38..891cfcd54ad 100644
--- a/sys/dev/usb/uftdi.c
+++ b/sys/dev/usb/uftdi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uftdi.c,v 1.57 2010/09/24 08:33:59 yuo Exp $ */
+/* $OpenBSD: uftdi.c,v 1.58 2011/01/25 20:03:36 jakemsr Exp $ */
/* $NetBSD: uftdi.c,v 1.14 2003/02/23 04:20:07 simonb Exp $ */
/*
@@ -874,9 +874,6 @@ uftdi_attach(struct device *parent, struct device *self, void *aux)
uca.arg = sc;
uca.info = NULL;
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
- &sc->sc_dev);
-
DPRINTF(("uftdi: in=0x%x out=0x%x\n", uca.bulkin, uca.bulkout));
sc->sc_subdev = config_found_sm(self, &uca, ucomprint, ucomsubmatch);
@@ -917,9 +914,6 @@ uftdi_detach(struct device *self, int flags)
sc->sc_subdev = NULL;
}
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
- &sc->sc_dev);
-
return (0);
}
diff --git a/sys/dev/usb/ugen.c b/sys/dev/usb/ugen.c
index 8261bbe9c2d..aa9c673e2cf 100644
--- a/sys/dev/usb/ugen.c
+++ b/sys/dev/usb/ugen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ugen.c,v 1.63 2011/01/16 22:35:29 jakemsr Exp $ */
+/* $OpenBSD: ugen.c,v 1.64 2011/01/25 20:03:36 jakemsr 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 $ */
@@ -190,9 +190,6 @@ ugen_attach(struct device *parent, struct device *self, void *aux)
sc->sc_dying = 1;
return;
}
-
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
- &sc->sc_dev);
}
int
@@ -798,9 +795,6 @@ ugen_detach(struct device *self, int flags)
mn = self->dv_unit * USB_MAX_ENDPOINTS;
vdevgone(maj, mn, mn + USB_MAX_ENDPOINTS - 1, VCHR);
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
- &sc->sc_dev);
-
return (0);
}
diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c
index 8eec7c7c064..3b564cbf39a 100644
--- a/sys/dev/usb/uhid.c
+++ b/sys/dev/usb/uhid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhid.c,v 1.50 2010/09/24 08:33:59 yuo Exp $ */
+/* $OpenBSD: uhid.c,v 1.51 2011/01/25 20:03:36 jakemsr Exp $ */
/* $NetBSD: uhid.c,v 1.57 2003/03/11 16:44:00 augustss Exp $ */
/*
@@ -195,12 +195,6 @@ uhid_detach(struct device *self, int flags)
mn = self->dv_unit;
vdevgone(maj, mn, mn, VCHR);
-#if 0
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH,
- sc->sc_hdev.sc_parent->sc_udev,
- &sc->sc_hdev.sc_dev);
-#endif
-
return (0);
}
diff --git a/sys/dev/usb/uhidev.c b/sys/dev/usb/uhidev.c
index 0128a0499aa..20b86017730 100644
--- a/sys/dev/usb/uhidev.c
+++ b/sys/dev/usb/uhidev.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhidev.c,v 1.40 2010/09/24 08:33:59 yuo Exp $ */
+/* $OpenBSD: uhidev.c,v 1.41 2011/01/25 20:03:36 jakemsr Exp $ */
/* $NetBSD: uhidev.c,v 1.14 2003/03/11 16:44:00 augustss Exp $ */
/*
@@ -246,9 +246,6 @@ uhidev_attach(struct device *parent, struct device *self, void *aux)
sc->sc_nrepid = nrepid;
sc->sc_isize = 0;
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
- &sc->sc_dev);
-
for (repid = 0; repid < nrepid; repid++) {
repsz = hid_report_size(desc, size, hid_input, repid);
DPRINTF(("uhidev_match: repid=%d, repsz=%d\n", repid, repsz));
@@ -377,9 +374,6 @@ uhidev_detach(struct device *self, int flags)
}
}
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
- &sc->sc_dev);
-
return (rv);
}
diff --git a/sys/dev/usb/uhub.c b/sys/dev/usb/uhub.c
index 57d8a0003df..bd20aeb8cc5 100644
--- a/sys/dev/usb/uhub.c
+++ b/sys/dev/usb/uhub.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhub.c,v 1.56 2010/12/06 04:41:40 jakemsr Exp $ */
+/* $OpenBSD: uhub.c,v 1.57 2011/01/25 20:03:36 jakemsr Exp $ */
/* $NetBSD: uhub.c,v 1.64 2003/02/08 03:32:51 ichiro Exp $ */
/* $FreeBSD: src/sys/dev/usb/uhub.c,v 1.18 1999/11/17 22:33:43 n_hibma Exp $ */
@@ -252,8 +252,6 @@ uhub_attach(struct device *parent, struct device *self, void *aux)
/* Wait with power off for a while. */
usbd_delay_ms(dev, USB_POWER_DOWN_TIME);
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, dev, &sc->sc_dev);
-
/*
* To have the best chance of success we do things in the exact same
* order as Windoze98. This should not be necessary, but some
@@ -571,9 +569,6 @@ uhub_detach(struct device *self, int flags)
usb_disconnect_port(rup, self);
}
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_hub,
- &sc->sc_dev);
-
if (hub->ports[0].tt)
free(hub->ports[0].tt, M_USBDEV);
if (sc->sc_statusbuf)
diff --git a/sys/dev/usb/uipaq.c b/sys/dev/usb/uipaq.c
index 2f4ae671d71..385cd616856 100644
--- a/sys/dev/usb/uipaq.c
+++ b/sys/dev/usb/uipaq.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uipaq.c,v 1.18 2010/09/24 08:33:59 yuo Exp $ */
+/* $OpenBSD: uipaq.c,v 1.19 2011/01/25 20:03:36 jakemsr Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -213,9 +213,6 @@ uipaq_attach(struct device *parent, struct device *self, void *aux)
goto bad;
}*/
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
- &sc->sc_dev);
-
uca.bulkin = uca.bulkout = -1;
for (i=0; i<id->bNumEndpoints; i++) {
ed = usbd_interface2endpoint_descriptor(iface, i);
@@ -388,9 +385,6 @@ uipaq_detach(struct device *self, int flags)
sc->sc_subdev = NULL;
}
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
- &sc->sc_dev);
-
return (rv);
}
diff --git a/sys/dev/usb/ulpt.c b/sys/dev/usb/ulpt.c
index 3b1444f6223..aa9d81c11e3 100644
--- a/sys/dev/usb/ulpt.c
+++ b/sys/dev/usb/ulpt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ulpt.c,v 1.37 2010/09/24 08:33:59 yuo Exp $ */
+/* $OpenBSD: ulpt.c,v 1.38 2011/01/25 20:03:36 jakemsr 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 $ */
@@ -298,8 +298,6 @@ ulpt_attach(struct device *parent, struct device *self, void *aux)
}
}
#endif
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
- &sc->sc_dev);
}
int
@@ -350,9 +348,6 @@ ulpt_detach(struct device *self, int flags)
vdevgone(maj, mn, mn, VCHR);
vdevgone(maj, mn | ULPT_NOPRIME , mn | ULPT_NOPRIME, VCHR);
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
- &sc->sc_dev);
-
return (0);
}
diff --git a/sys/dev/usb/umass.c b/sys/dev/usb/umass.c
index 096d0734ea1..2c1511dd4ab 100644
--- a/sys/dev/usb/umass.c
+++ b/sys/dev/usb/umass.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: umass.c,v 1.59 2009/10/13 19:33:19 pirofti Exp $ */
+/* $OpenBSD: umass.c,v 1.60 2011/01/25 20:03:36 jakemsr Exp $ */
/* $NetBSD: umass.c,v 1.116 2004/06/30 05:53:46 mycroft Exp $ */
/*
@@ -620,9 +620,6 @@ umass_attach(struct device *parent, struct device *self, void *aux)
return;
}
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
- &sc->sc_dev);
-
DPRINTF(UDMASS_GEN, ("%s: Attach finished\n", sc->sc_dev.dv_xname));
}
@@ -674,9 +671,6 @@ umass_detach(struct device *self, int flags)
umass_disco(sc);
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
- &sc->sc_dev);
-
return (rv);
}
diff --git a/sys/dev/usb/umbg.c b/sys/dev/usb/umbg.c
index 11e64070b30..7ef0726ef7d 100644
--- a/sys/dev/usb/umbg.c
+++ b/sys/dev/usb/umbg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: umbg.c,v 1.15 2010/12/06 04:41:40 jakemsr Exp $ */
+/* $OpenBSD: umbg.c,v 1.16 2011/01/25 20:03:36 jakemsr Exp $ */
/*
* Copyright (c) 2007 Marc Balmer <mbalmer@openbsd.org>
@@ -275,9 +275,6 @@ umbg_attach(struct device *parent, struct device *self, void *aux)
#endif
printf("\n");
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
- &sc->sc_dev);
-
t_wait = 5;
t_trust = TRUSTTIME;
@@ -328,7 +325,6 @@ umbg_detach(struct device *self, int flags)
/* Unregister the clock with the kernel */
sensordev_deinstall(&sc->sc_sensordev);
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev, &sc->sc_dev);
return 0;
}
diff --git a/sys/dev/usb/umct.c b/sys/dev/usb/umct.c
index 93395646620..aaec7505ad0 100644
--- a/sys/dev/usb/umct.c
+++ b/sys/dev/usb/umct.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: umct.c,v 1.31 2010/12/17 21:53:34 jasper Exp $ */
+/* $OpenBSD: umct.c,v 1.32 2011/01/25 20:03:36 jakemsr Exp $ */
/* $NetBSD: umct.c,v 1.10 2003/02/23 04:20:07 simonb Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -303,9 +303,6 @@ umct_attach(struct device *parent, struct device *self, void *aux)
umct_init(sc);
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
- &sc->sc_dev);
-
DPRINTF(("umct: in=0x%x out=0x%x intr=0x%x\n",
uca.bulkin, uca.bulkout, sc->sc_intr_number ));
sc->sc_subdev = config_found_sm(self, &uca, ucomprint, ucomsubmatch);
@@ -331,9 +328,6 @@ umct_detach(struct device *self, int flags)
sc->sc_subdev = NULL;
}
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
- &sc->sc_dev);
-
return (rv);
}
diff --git a/sys/dev/usb/umidi.c b/sys/dev/usb/umidi.c
index 825957a4585..78ae450a612 100644
--- a/sys/dev/usb/umidi.c
+++ b/sys/dev/usb/umidi.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: umidi.c,v 1.27 2010/09/24 08:33:59 yuo Exp $ */
+/* $OpenBSD: umidi.c,v 1.28 2011/01/25 20:03:36 jakemsr Exp $ */
/* $NetBSD: umidi.c,v 1.16 2002/07/11 21:14:32 augustss Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -222,9 +222,6 @@ umidi_attach(struct device *parent, struct device *self, void *aux)
(void)start_input_transfer(&sc->sc_in_ep[i]);
}
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH,
- sc->sc_udev, &sc->sc_dev);
-
return;
error:
printf("%s: disabled.\n", sc->sc_dev.dv_xname);
@@ -261,9 +258,6 @@ umidi_detach(struct device *self, int flags)
free_all_jacks(sc);
free_all_endpoints(sc);
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
- &sc->sc_dev);
-
return 0;
}
diff --git a/sys/dev/usb/umodem.c b/sys/dev/usb/umodem.c
index cab12b62537..5f09d2436cc 100644
--- a/sys/dev/usb/umodem.c
+++ b/sys/dev/usb/umodem.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: umodem.c,v 1.40 2011/01/16 22:35:29 jakemsr Exp $ */
+/* $OpenBSD: umodem.c,v 1.41 2011/01/25 20:03:36 jakemsr Exp $ */
/* $NetBSD: umodem.c,v 1.45 2002/09/23 05:51:23 simonb Exp $ */
/*
@@ -385,9 +385,6 @@ umodem_attach(struct device *parent, struct device *self, void *aux)
uca.arg = sc;
uca.info = NULL;
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
- &sc->sc_dev);
-
DPRINTF(("umodem_attach: sc=%p\n", sc));
sc->sc_subdev = config_found_sm(self, &uca, ucomprint, ucomsubmatch);
@@ -762,8 +759,5 @@ umodem_detach(struct device *self, int flags)
if (sc->sc_subdev != NULL)
rv = config_detach(sc->sc_subdev, flags);
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
- &sc->sc_dev);
-
return (rv);
}
diff --git a/sys/dev/usb/umsm.c b/sys/dev/usb/umsm.c
index 44adcae5c08..bd475299618 100644
--- a/sys/dev/usb/umsm.c
+++ b/sys/dev/usb/umsm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: umsm.c,v 1.70 2010/12/30 16:28:12 ajacoutot Exp $ */
+/* $OpenBSD: umsm.c,v 1.71 2011/01/25 20:03:36 jakemsr Exp $ */
/*
* Copyright (c) 2008 Yojiro UO <yuo@nui.org>
@@ -385,9 +385,6 @@ umsm_attach(struct device *parent, struct device *self, void *aux)
uca.info = NULL;
uca.portno = UCOM_UNK_PORTNO;
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
- &sc->sc_dev);
-
sc->sc_subdev = config_found_sm(self, &uca, ucomprint, ucomsubmatch);
}
@@ -411,9 +408,6 @@ umsm_detach(struct device *self, int flags)
sc->sc_subdev = NULL;
}
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
- &sc->sc_dev);
-
return (rv);
}
diff --git a/sys/dev/usb/uow.c b/sys/dev/usb/uow.c
index b6a6c602c9f..73c5942345a 100644
--- a/sys/dev/usb/uow.c
+++ b/sys/dev/usb/uow.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uow.c,v 1.28 2010/12/27 03:03:50 jakemsr Exp $ */
+/* $OpenBSD: uow.c,v 1.29 2011/01/25 20:03:36 jakemsr Exp $ */
/*
* Copyright (c) 2006 Alexander Yurchenko <grange@openbsd.org>
@@ -260,9 +260,6 @@ uow_detach(struct device *self, int flags)
splx(s);
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
- &sc->sc_dev);
-
return (rv);
}
diff --git a/sys/dev/usb/uplcom.c b/sys/dev/usb/uplcom.c
index 7cac00c22be..65a4c374165 100644
--- a/sys/dev/usb/uplcom.c
+++ b/sys/dev/usb/uplcom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uplcom.c,v 1.54 2010/11/16 22:28:55 deraadt Exp $ */
+/* $OpenBSD: uplcom.c,v 1.55 2011/01/25 20:03:36 jakemsr Exp $ */
/* $NetBSD: uplcom.c,v 1.29 2002/09/23 05:51:23 simonb Exp $ */
/*
* Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -410,9 +410,6 @@ uplcom_attach(struct device *parent, struct device *self, void *aux)
return;
}
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
- &sc->sc_dev);
-
DPRINTF(("uplcom: in=0x%x out=0x%x intr=0x%x\n",
uca.bulkin, uca.bulkout, sc->sc_intr_number ));
sc->sc_subdev = config_found_sm(self, &uca, ucomprint, ucomsubmatch);
@@ -438,9 +435,6 @@ uplcom_detach(struct device *self, int flags)
sc->sc_subdev = NULL;
}
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
- &sc->sc_dev);
-
return (rv);
}
diff --git a/sys/dev/usb/urio.c b/sys/dev/usb/urio.c
index 39ff81b0488..76442fefe5d 100644
--- a/sys/dev/usb/urio.c
+++ b/sys/dev/usb/urio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: urio.c,v 1.37 2010/12/17 21:53:34 jasper Exp $ */
+/* $OpenBSD: urio.c,v 1.38 2011/01/25 20:03:36 jakemsr Exp $ */
/* $NetBSD: urio.c,v 1.15 2002/10/23 09:14:02 jdolecek Exp $ */
/*
@@ -183,9 +183,6 @@ urio_attach(struct device *parent, struct device *self, void *aux)
}
DPRINTFN(10, ("urio_attach: %p\n", sc->sc_udev));
-
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
- &sc->sc_dev);
}
int
@@ -225,9 +222,6 @@ urio_detach(struct device *self, int flags)
mn = self->dv_unit;
vdevgone(maj, mn, mn, VCHR);
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
- &sc->sc_dev);
-
return (0);
}
diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c
index f6ba1f2a168..e0698f6d89c 100644
--- a/sys/dev/usb/usb.c
+++ b/sys/dev/usb/usb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: usb.c,v 1.71 2011/01/15 23:58:43 jakemsr Exp $ */
+/* $OpenBSD: usb.c,v 1.72 2011/01/25 20:03:36 jakemsr Exp $ */
/* $NetBSD: usb.c,v 1.77 2003/01/01 00:10:26 thorpej Exp $ */
/*
@@ -60,8 +60,6 @@
#include <dev/usb/usbdi.h>
#include <dev/usb/usbdi_util.h>
-#define USB_DEV_MINOR 255
-
#include <machine/bus.h>
#include <dev/usb/usbdivar.h>
@@ -115,21 +113,6 @@ struct proc *usb_task_thread_proc = NULL;
void usb_abort_task_thread(void *);
struct proc *usb_abort_task_thread_proc = NULL;
-#define USB_MAX_EVENTS 100
-struct usb_event_q {
- struct usb_event ue;
- SIMPLEQ_ENTRY(usb_event_q) next;
-};
-SIMPLEQ_HEAD(, usb_event_q) usb_events =
- SIMPLEQ_HEAD_INITIALIZER(usb_events);
-int usb_nevents = 0;
-struct selinfo usb_selevent;
-struct proc *usb_async_proc; /* process that wants USB SIGIO */
-int usb_dev_open = 0;
-void usb_add_event(int, struct usb_event *);
-
-int usb_get_next_event(struct usb_event *);
-
const char *usbrev_str[] = USBREV_STR;
int usb_match(struct device *, void *, void *);
@@ -164,7 +147,6 @@ usb_attach(struct device *parent, struct device *self, void *aux)
usbd_status err;
int usbrev;
int speed;
- struct usb_event ue;
DPRINTF(("usbd_attach\n"));
@@ -201,9 +183,6 @@ usb_attach(struct device *parent, struct device *self, void *aux)
usb_init_task(&sc->sc_explore_task, usb_explore, sc,
USB_TASK_TYPE_EXPLORE);
- ue.u.ue_ctrlr.ue_bus = sc->sc_dev.dv_unit;
- usb_add_event(USB_EVENT_CTRLR_ATTACH, &ue);
-
/* XXX we should have our own level */
sc->sc_bus->soft = softintr_establish(IPL_SOFTNET,
sc->sc_bus->methods->soft_intr, sc->sc_bus);
@@ -496,14 +475,6 @@ usbopen(dev_t dev, int flag, int mode, struct proc *p)
int unit = minor(dev);
struct usb_softc *sc;
- if (unit == USB_DEV_MINOR) {
- if (usb_dev_open)
- return (EBUSY);
- usb_dev_open = 1;
- usb_async_proc = 0;
- return (0);
- }
-
if (unit >= usb_cd.cd_ndevs)
return (ENXIO);
sc = usb_cd.cd_devs[unit];
@@ -517,48 +488,8 @@ usbopen(dev_t dev, int flag, int mode, struct proc *p)
}
int
-usbread(dev_t dev, struct uio *uio, int flag)
-{
- struct usb_event ue;
- int s, error, n;
-
- if (minor(dev) != USB_DEV_MINOR)
- return (ENXIO);
-
- if (uio->uio_resid != sizeof(struct usb_event))
- return (EINVAL);
-
- error = 0;
- s = splusb();
- for (;;) {
- n = usb_get_next_event(&ue);
- if (n != 0)
- break;
- if (flag & IO_NDELAY) {
- error = EWOULDBLOCK;
- break;
- }
- error = tsleep(&usb_events, PZERO | PCATCH, "usbrea", 0);
- if (error)
- break;
- }
- splx(s);
- if (!error)
- error = uiomove((void *)&ue, uio->uio_resid, uio);
-
- return (error);
-}
-
-int
usbclose(dev_t dev, int flag, int mode, struct proc *p)
{
- int unit = minor(dev);
-
- if (unit == USB_DEV_MINOR) {
- usb_async_proc = 0;
- usb_dev_open = 0;
- }
-
return (0);
}
@@ -569,24 +500,6 @@ usbioctl(dev_t devt, u_long cmd, caddr_t data, int flag, struct proc *p)
int unit = minor(devt);
int error;
- if (unit == USB_DEV_MINOR) {
- switch (cmd) {
- case FIONBIO:
- /* All handled in the upper FS layer. */
- return (0);
-
- case FIOASYNC:
- if (*(int *)data)
- usb_async_proc = p;
- else
- usb_async_proc = 0;
- return (0);
-
- default:
- return (EINVAL);
- }
- }
-
sc = usb_cd.cd_devs[unit];
if (sc->sc_bus->dying)
@@ -717,83 +630,6 @@ usbioctl(dev_t devt, u_long cmd, caddr_t data, int flag, struct proc *p)
return (0);
}
-int
-usbpoll(dev_t dev, int events, struct proc *p)
-{
- int revents, mask, s;
-
- if (minor(dev) == USB_DEV_MINOR) {
- revents = 0;
- mask = POLLIN | POLLRDNORM;
-
- s = splusb();
- if (events & mask && usb_nevents > 0)
- revents |= events & mask;
- if (revents == 0 && events & mask)
- selrecord(p, &usb_selevent);
- splx(s);
-
- return (revents);
- } else {
- return (POLLERR);
- }
-}
-
-void filt_usbrdetach(struct knote *);
-int filt_usbread(struct knote *, long);
-int usbkqfilter(dev_t, struct knote *);
-
-void
-filt_usbrdetach(struct knote *kn)
-{
- int s;
-
- s = splusb();
- SLIST_REMOVE(&usb_selevent.si_note, kn, knote, kn_selnext);
- splx(s);
-}
-
-int
-filt_usbread(struct knote *kn, long hint)
-{
-
- if (usb_nevents == 0)
- return (0);
-
- kn->kn_data = sizeof(struct usb_event);
- return (1);
-}
-
-struct filterops usbread_filtops =
- { 1, NULL, filt_usbrdetach, filt_usbread };
-
-int
-usbkqfilter(dev_t dev, struct knote *kn)
-{
- struct klist *klist;
- int s;
-
- switch (kn->kn_filter) {
- case EVFILT_READ:
- if (minor(dev) != USB_DEV_MINOR)
- return (1);
- klist = &usb_selevent.si_note;
- kn->kn_fop = &usbread_filtops;
- break;
-
- default:
- return (1);
- }
-
- kn->kn_hook = NULL;
-
- s = splusb();
- SLIST_INSERT_HEAD(klist, kn, kn_selnext);
- splx(s);
-
- return (0);
-}
-
/*
* Explore device tree from the root. We need mutual exclusion to this
* hub while traversing the device tree, but this is guaranteed since this
@@ -846,78 +682,6 @@ usb_needs_reattach(usbd_device_handle dev)
usb_needs_explore(dev, 0);
}
-/* Called at splusb() */
-int
-usb_get_next_event(struct usb_event *ue)
-{
- struct usb_event_q *ueq;
-
- if (usb_nevents <= 0)
- return (0);
- ueq = SIMPLEQ_FIRST(&usb_events);
-#ifdef DIAGNOSTIC
- if (ueq == NULL) {
- printf("usb: usb_nevents got out of sync! %d\n", usb_nevents);
- usb_nevents = 0;
- return (0);
- }
-#endif
- *ue = ueq->ue;
- SIMPLEQ_REMOVE_HEAD(&usb_events, next);
- free(ueq, M_USBDEV);
- usb_nevents--;
- return (1);
-}
-
-void
-usbd_add_dev_event(int type, usbd_device_handle udev)
-{
- struct usb_event ue;
-
- usbd_fill_deviceinfo(udev, &ue.u.ue_device, USB_EVENT_IS_ATTACH(type));
- usb_add_event(type, &ue);
-}
-
-void
-usbd_add_drv_event(int type, usbd_device_handle udev, struct device *dev)
-{
- struct usb_event ue;
-
- ue.u.ue_driver.ue_cookie = udev->cookie;
- strncpy(ue.u.ue_driver.ue_devname, dev->dv_xname,
- sizeof ue.u.ue_driver.ue_devname);
- usb_add_event(type, &ue);
-}
-
-void
-usb_add_event(int type, struct usb_event *uep)
-{
- struct usb_event_q *ueq;
- struct usb_event ue;
- struct timespec thetime;
- int s;
-
- nanotime(&thetime);
- /* Don't want to wait here inside splusb() */
- ueq = malloc(sizeof *ueq, M_USBDEV, M_WAITOK);
- ueq->ue = *uep;
- ueq->ue.ue_type = type;
- ueq->ue.ue_time = thetime;
-
- s = splusb();
- if (++usb_nevents >= USB_MAX_EVENTS) {
- /* Too many queued events, drop an old one. */
- DPRINTFN(-1,("usb: event dropped\n"));
- (void)usb_get_next_event(&ue);
- }
- SIMPLEQ_INSERT_TAIL(&usb_events, ueq, next);
- wakeup(&usb_events);
- selwakeup(&usb_selevent);
- if (usb_async_proc != NULL)
- psignal(usb_async_proc, SIGIO);
- splx(s);
-}
-
void
usb_schedsoftintr(usbd_bus_handle bus)
{
@@ -959,7 +723,6 @@ int
usb_detach(struct device *self, int flags)
{
struct usb_softc *sc = (struct usb_softc *)self;
- struct usb_event ue;
DPRINTF(("usb_detach: start\n"));
@@ -980,8 +743,5 @@ usb_detach(struct device *self, int flags)
sc->sc_bus->soft = NULL;
}
- ue.u.ue_ctrlr.ue_bus = sc->sc_dev.dv_unit;
- usb_add_event(USB_EVENT_CTRLR_DETACH, &ue);
-
return (0);
}
diff --git a/sys/dev/usb/usb_subr.c b/sys/dev/usb/usb_subr.c
index b46b0649a6a..a0f3154eb3a 100644
--- a/sys/dev/usb/usb_subr.c
+++ b/sys/dev/usb/usb_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: usb_subr.c,v 1.79 2011/01/16 22:35:29 jakemsr Exp $ */
+/* $OpenBSD: usb_subr.c,v 1.80 2011/01/25 20:03:36 jakemsr Exp $ */
/* $NetBSD: usb_subr.c,v 1.103 2003/01/10 11:19:13 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/usb_subr.c,v 1.18 1999/11/17 22:33:47 n_hibma Exp $ */
@@ -1234,8 +1234,6 @@ usbd_new_device(struct device *parent, usbd_bus_handle bus, int depth,
DPRINTF(("usbd_new_device: new dev (addr %d), dev=%p, parent=%p\n",
addr, dev, parent));
- usbd_add_dev_event(USB_EVENT_DEVICE_ATTACH, dev);
-
err = usbd_probe_and_attach(parent, dev, port, addr);
if (err) {
usbd_remove_device(dev, up);
@@ -1489,7 +1487,6 @@ usb_disconnect_port(struct usbd_port *up, struct device *parent)
}
}
- usbd_add_dev_event(USB_EVENT_DEVICE_DETACH, dev);
dev->bus->devices[dev->address] = NULL;
up->device = NULL;
usb_free_device(dev);
diff --git a/sys/dev/usb/usbdi.h b/sys/dev/usb/usbdi.h
index 0dd722f33ff..5a990d38fa3 100644
--- a/sys/dev/usb/usbdi.h
+++ b/sys/dev/usb/usbdi.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: usbdi.h,v 1.38 2011/01/16 22:35:29 jakemsr Exp $ */
+/* $OpenBSD: usbdi.h,v 1.39 2011/01/25 20:03:36 jakemsr Exp $ */
/* $NetBSD: usbdi.h,v 1.62 2002/07/11 21:14:35 augustss Exp $ */
/* $FreeBSD: src/sys/dev/usb/usbdi.h,v 1.18 1999/11/17 22:33:49 n_hibma Exp $ */
@@ -151,9 +151,6 @@ void usbd_set_polling(usbd_device_handle iface, int on);
const char *usbd_errstr(usbd_status err);
-void usbd_add_dev_event(int, usbd_device_handle);
-void usbd_add_drv_event(int, usbd_device_handle, struct device *);
-
char *usbd_devinfo_alloc(usbd_device_handle dev, int showclass);
void usbd_devinfo_free(char *devinfop);
@@ -185,8 +182,8 @@ void usb_desc_iter_init(usbd_device_handle, usbd_desc_iter_t *);
const usb_descriptor_t *usb_desc_iter_next(usbd_desc_iter_t *);
/*
- * The usb_task structs form a queue of things to run in the USB event
- * thread. Normally this is just device discovery when a connect/disconnect
+ * The usb_task structs form a queue of things to run in the USB task
+ * threads. Normally this is just device discovery when a connect/disconnect
* has been detected. But it may also be used by drivers that need to
* perform (short) tasks that must have a process context.
*/
diff --git a/sys/dev/usb/uscanner.c b/sys/dev/usb/uscanner.c
index a2ad5472bce..2ef694688d7 100644
--- a/sys/dev/usb/uscanner.c
+++ b/sys/dev/usb/uscanner.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uscanner.c,v 1.43 2010/09/24 08:33:59 yuo Exp $ */
+/* $OpenBSD: uscanner.c,v 1.44 2011/01/25 20:03:36 jakemsr Exp $ */
/* $NetBSD: uscanner.c,v 1.40 2003/01/27 00:32:44 wiz Exp $ */
/*
@@ -321,9 +321,6 @@ uscanner_attach(struct device *parent, struct device *self, void *aux)
sc->sc_bulkin = ed_bulkin->bEndpointAddress;
sc->sc_bulkout = ed_bulkout->bEndpointAddress;
-
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
- &sc->sc_dev);
}
int
@@ -604,8 +601,6 @@ uscanner_detach(struct device *self, int flags)
/* Nuke the vnodes for any open instances (calls close). */
mn = self->dv_unit * USB_MAX_ENDPOINTS;
vdevgone(maj, mn, mn + USB_MAX_ENDPOINTS - 1, VCHR);
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
- &sc->sc_dev);
return (0);
}
diff --git a/sys/dev/usb/uslcom.c b/sys/dev/usb/uslcom.c
index f8f2f5f519b..225b4b75a61 100644
--- a/sys/dev/usb/uslcom.c
+++ b/sys/dev/usb/uslcom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uslcom.c,v 1.21 2010/09/24 08:33:59 yuo Exp $ */
+/* $OpenBSD: uslcom.c,v 1.22 2011/01/25 20:03:36 jakemsr Exp $ */
/*
* Copyright (c) 2006 Jonathan Gray <jsg@openbsd.org>
@@ -241,9 +241,6 @@ uslcom_attach(struct device *parent, struct device *self, void *aux)
uca.arg = sc;
uca.info = NULL;
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
- &sc->sc_dev);
-
sc->sc_subdev = config_found_sm(self, &uca, ucomprint, ucomsubmatch);
}
@@ -258,9 +255,6 @@ uslcom_detach(struct device *self, int flags)
sc->sc_subdev = NULL;
}
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
- &sc->sc_dev);
-
return (rv);
}
diff --git a/sys/dev/usb/uthum.c b/sys/dev/usb/uthum.c
index 4a77310bd46..5e19752905e 100644
--- a/sys/dev/usb/uthum.c
+++ b/sys/dev/usb/uthum.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uthum.c,v 1.15 2010/09/24 08:33:59 yuo Exp $ */
+/* $OpenBSD: uthum.c,v 1.16 2011/01/25 20:03:36 jakemsr Exp $ */
/*
* Copyright (c) 2009, 2010 Yojiro UO <yuo@nui.org>
@@ -220,8 +220,6 @@ uthum_attach(struct device *parent, struct device *self, void *aux)
sc->sc_olen = hid_report_size(desc, size, hid_output, repid);
sc->sc_flen = hid_report_size(desc, size, hid_feature, repid);
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
- &sc->sc_hdev.sc_dev);
printf("\n");
if (sc->sc_flen < 32) {
@@ -282,9 +280,6 @@ uthum_detach(struct device *self, int flags)
sensor_task_unregister(sc->sc_sensortask);
}
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
- &sc->sc_hdev.sc_dev);
-
return (rv);
}
diff --git a/sys/dev/usb/uticom.c b/sys/dev/usb/uticom.c
index 2bf7f5f6bed..60b9a002cbb 100644
--- a/sys/dev/usb/uticom.c
+++ b/sys/dev/usb/uticom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uticom.c,v 1.12 2010/12/17 21:02:58 jasper Exp $ */
+/* $OpenBSD: uticom.c,v 1.13 2011/01/25 20:03:36 jakemsr Exp $ */
/*
* Copyright (c) 2005 Dmitry Komissaroff <dxi@mail.ru>.
*
@@ -497,8 +497,6 @@ uticom_detach(struct device *self, int flags)
sc->sc_intr_pipe = NULL;
}
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
- &sc->sc_dev);
return (0);
}
diff --git a/sys/dev/usb/utrh.c b/sys/dev/usb/utrh.c
index 2386954e990..ba23bb5a86b 100644
--- a/sys/dev/usb/utrh.c
+++ b/sys/dev/usb/utrh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: utrh.c,v 1.6 2010/12/19 21:32:58 jasper Exp $ */
+/* $OpenBSD: utrh.c,v 1.7 2011/01/25 20:03:36 jakemsr Exp $ */
/*
* Copyright (c) 2009 Yojiro UO <yuo@nui.org>
@@ -140,8 +140,6 @@ utrh_attach(struct device *parent, struct device *self, void *aux)
}
sc->sc_ibuf = malloc(sc->sc_ilen, M_USBDEV, M_WAITOK);
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
- &sc->sc_hdev.sc_dev);
printf("\n");
/* attach sensor */
@@ -192,9 +190,6 @@ utrh_detach(struct device *self, int flags)
sc->sc_ibuf = NULL;
}
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
- &sc->sc_hdev.sc_dev);
-
return (rv);
}
diff --git a/sys/dev/usb/uts.c b/sys/dev/usb/uts.c
index 12452e4ae12..78b9424c5df 100644
--- a/sys/dev/usb/uts.c
+++ b/sys/dev/usb/uts.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uts.c,v 1.27 2010/09/24 08:33:59 yuo Exp $ */
+/* $OpenBSD: uts.c,v 1.28 2011/01/25 20:03:36 jakemsr Exp $ */
/*
* Copyright (c) 2007 Robert Nagy <robert@openbsd.org>
@@ -221,8 +221,6 @@ uts_attach(struct device *parent, struct device *self, void *aux)
return;
}
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev, &sc->sc_dev);
-
a.accessops = &uts_accessops;
a.accesscookie = sc;
@@ -246,8 +244,6 @@ uts_detach(struct device *self, int flags)
sc->sc_wsmousedev = NULL;
}
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev, &sc->sc_dev);
-
return (rv);
}
diff --git a/sys/dev/usb/utwitch.c b/sys/dev/usb/utwitch.c
index 4947f31d6ed..99e4f8fcaeb 100644
--- a/sys/dev/usb/utwitch.c
+++ b/sys/dev/usb/utwitch.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: utwitch.c,v 1.2 2010/12/19 21:32:58 jasper Exp $ */
+/* $OpenBSD: utwitch.c,v 1.3 2011/01/25 20:03:36 jakemsr Exp $ */
/*
* Copyright (c) 2010 Yojiro UO <yuo@nui.org>
@@ -154,8 +154,6 @@ utwitch_attach(struct device *parent, struct device *self, void *aux)
}
sc->sc_ibuf = malloc(sc->sc_ilen, M_USBDEV, M_WAITOK);
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
- &sc->sc_hdev.sc_dev);
printf("\n");
@@ -208,9 +206,6 @@ utwitch_detach(struct device *self, int flags)
sc->sc_ibuf = NULL;
}
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
- &sc->sc_hdev.sc_dev);
-
return (rv);
}
diff --git a/sys/dev/usb/uvideo.c b/sys/dev/usb/uvideo.c
index f0f85b5aba8..c3234672394 100644
--- a/sys/dev/usb/uvideo.c
+++ b/sys/dev/usb/uvideo.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvideo.c,v 1.148 2011/01/16 22:35:29 jakemsr Exp $ */
+/* $OpenBSD: uvideo.c,v 1.149 2011/01/25 20:03:36 jakemsr Exp $ */
/*
* Copyright (c) 2008 Robert Nagy <robert@openbsd.org>
@@ -556,8 +556,6 @@ uvideo_attach_hook(void *arg)
sc->sc_mmap_cur = 0;
sc->sc_mmap_count = 0;
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev, &sc->sc_dev);
-
DPRINTF(1, "uvideo_attach: doing video_attach_mi\n");
sc->sc_videodev = video_attach_mi(&uvideo_hw_if, sc, &sc->sc_dev);
}
@@ -576,8 +574,6 @@ uvideo_detach(struct device *self, int flags)
if (sc->sc_videodev != NULL)
rv = config_detach(sc->sc_videodev, flags);
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev, &sc->sc_dev);
-
return (rv);
}
diff --git a/sys/dev/usb/uvisor.c b/sys/dev/usb/uvisor.c
index 7aaf54d4d3f..80b52f1892d 100644
--- a/sys/dev/usb/uvisor.c
+++ b/sys/dev/usb/uvisor.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvisor.c,v 1.42 2010/09/24 08:33:59 yuo Exp $ */
+/* $OpenBSD: uvisor.c,v 1.43 2011/01/25 20:03:36 jakemsr Exp $ */
/* $NetBSD: uvisor.c,v 1.21 2003/08/03 21:59:26 nathanw Exp $ */
/*
@@ -289,9 +289,6 @@ uvisor_attach(struct device *parent, struct device *self, void *aux)
goto bad;
}
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
- &sc->sc_dev);
-
if (sc->sc_flags & VISOR) {
sc->sc_numcon = UGETW(coninfo.num_ports);
if (sc->sc_numcon > UVISOR_MAX_CONN)
@@ -415,9 +412,6 @@ uvisor_detach(struct device *self, int flags)
}
}
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
- &sc->sc_dev);
-
return (rv);
}
diff --git a/sys/dev/usb/uvscom.c b/sys/dev/usb/uvscom.c
index 6b18fa63740..d3f087ca2e0 100644
--- a/sys/dev/usb/uvscom.c
+++ b/sys/dev/usb/uvscom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uvscom.c,v 1.22 2010/12/17 21:53:34 jasper Exp $ */
+/* $OpenBSD: uvscom.c,v 1.23 2011/01/25 20:03:36 jakemsr 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>.
@@ -359,9 +359,6 @@ uvscom_attach(struct device *parent, struct device *self, void *aux)
DPRINTF(("uvscom: in = 0x%x out = 0x%x intr = 0x%x\n",
ucom->sc_bulkin_no, ucom->sc_bulkout_no, sc->sc_intr_number));
- usbd_add_drv_event(USB_EVENT_DRIVER_ATTACH, sc->sc_udev,
- &sc->sc_dev);
-
DPRINTF(("uplcom: in=0x%x out=0x%x intr=0x%x\n",
uca.bulkin, uca.bulkout, sc->sc_intr_number ));
sc->sc_subdev = config_found_sm(self, &uca, ucomprint, ucomsubmatch);
@@ -387,9 +384,6 @@ uvscom_detach(struct device *self, int flags)
sc->sc_subdev = NULL;
}
- usbd_add_drv_event(USB_EVENT_DRIVER_DETACH, sc->sc_udev,
- &sc->sc_dev);
-
return (rv);
}