summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2009-10-31 06:40:18 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2009-10-31 06:40:18 +0000
commitf3184ac14f03da17bde002ccff8abf43076b34bc (patch)
tree095aba03ec9c46097cdee71ffbe0a3cf6726ded1 /sys/dev/usb
parent84fb3053dd046225edb7868a8dd17410070e5b8c (diff)
Add missing KNOTE() calls after selwakeup(), until we decide if the KNOTE()
calls can go directly into selwakeup() safely long discussion with nicm, murmers of consent from tedu and miod, noone else seems to care of kqueue is busted as long as it makes their sockets move data fast... pretty sad.
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/ucom.c3
-rw-r--r--sys/dev/usb/ugen.c4
-rw-r--r--sys/dev/usb/uhid.c3
-rw-r--r--sys/dev/usb/usb.c3
4 files changed, 9 insertions, 4 deletions
diff --git a/sys/dev/usb/ucom.c b/sys/dev/usb/ucom.c
index 1de3fca03ec..a0e1b28c731 100644
--- a/sys/dev/usb/ucom.c
+++ b/sys/dev/usb/ucom.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ucom.c,v 1.43 2009/10/13 19:33:17 pirofti Exp $ */
+/* $OpenBSD: ucom.c,v 1.44 2009/10/31 06:40:17 deraadt Exp $ */
/* $NetBSD: ucom.c,v 1.49 2003/01/01 00:10:25 thorpej Exp $ */
/*
@@ -949,6 +949,7 @@ ucomstart(struct tty *tp)
wakeup(&tp->t_outq);
}
selwakeup(&tp->t_wsel);
+ KNOTE(&tp->t_wsel.si_note, 0);
if (tp->t_outq.c_cc == 0)
goto out;
}
diff --git a/sys/dev/usb/ugen.c b/sys/dev/usb/ugen.c
index c4998f7e2fd..c90c58dcc5a 100644
--- a/sys/dev/usb/ugen.c
+++ b/sys/dev/usb/ugen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ugen.c,v 1.59 2009/10/13 19:33:17 pirofti Exp $ */
+/* $OpenBSD: ugen.c,v 1.60 2009/10/31 06:40:17 deraadt 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 $ */
@@ -822,6 +822,7 @@ ugenintr(usbd_xfer_handle xfer, usbd_private_handle addr, usbd_status status)
wakeup(sce);
}
selwakeup(&sce->rsel);
+ KNOTE(&sce->rsel.si_note, 0);
}
void
@@ -881,6 +882,7 @@ ugen_isoc_rintr(usbd_xfer_handle xfer, usbd_private_handle addr,
wakeup(sce);
}
selwakeup(&sce->rsel);
+ KNOTE(&sce->rsel.si_note, 0);
}
usbd_status
diff --git a/sys/dev/usb/uhid.c b/sys/dev/usb/uhid.c
index f9af66a7437..76e0dda1246 100644
--- a/sys/dev/usb/uhid.c
+++ b/sys/dev/usb/uhid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: uhid.c,v 1.44 2009/10/13 19:33:19 pirofti Exp $ */
+/* $OpenBSD: uhid.c,v 1.45 2009/10/31 06:40:17 deraadt Exp $ */
/* $NetBSD: uhid.c,v 1.57 2003/03/11 16:44:00 augustss Exp $ */
/*
@@ -234,6 +234,7 @@ uhid_intr(struct uhidev *addr, void *data, u_int len)
wakeup(&sc->sc_q);
}
selwakeup(&sc->sc_rsel);
+ KNOTE(&sc->sc_rsel.si_note, 0);
if (sc->sc_async != NULL) {
DPRINTFN(3, ("uhid_intr: sending SIGIO %p\n", sc->sc_async));
psignal(sc->sc_async, SIGIO);
diff --git a/sys/dev/usb/usb.c b/sys/dev/usb/usb.c
index d64559e56be..222aa200cd5 100644
--- a/sys/dev/usb/usb.c
+++ b/sys/dev/usb/usb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: usb.c,v 1.59 2009/10/13 19:33:19 pirofti Exp $ */
+/* $OpenBSD: usb.c,v 1.60 2009/10/31 06:40:17 deraadt Exp $ */
/* $NetBSD: usb.c,v 1.77 2003/01/01 00:10:26 thorpej Exp $ */
/*
@@ -770,6 +770,7 @@ usb_add_event(int type, struct usb_event *uep)
SIMPLEQ_INSERT_TAIL(&usb_events, ueq, next);
wakeup(&usb_events);
selwakeup(&usb_selevent);
+ KNOTE(&usb_selevent.si_note, 0);
if (usb_async_proc != NULL)
psignal(usb_async_proc, SIGIO);
splx(s);