From 173360594997c33e4685c2a9f26732bdfc8cc805 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Thu, 8 Jul 2010 16:04:25 -0700 Subject: [PATCH] dev - Properly propogate wakeup events for ums * The last commit had a minor problem. It turns out that the selwakeup() code does not generate a kqueue event or wake it up if no select pid was set, and since select() now uses kqueue no select pid will ever be set. * Calling KNOTE() directly solves the problem. --- sys/dev/usbmisc/ums/ums.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/sys/dev/usbmisc/ums/ums.c b/sys/dev/usbmisc/ums/ums.c index 3819c78..eda339a 100644 --- a/sys/dev/usbmisc/ums/ums.c +++ b/sys/dev/usbmisc/ums/ums.c @@ -385,6 +385,7 @@ ums_detach(device_t self) wakeup(sc); } selwakeup(&sc->rsel); + KNOTE(&sc->rsel.si_note, 0); dev_ops_remove_minor(&ums_ops, /*-1, */device_get_unit(self)); @@ -517,6 +518,7 @@ ums_add_to_queue(struct ums_softc *sc, int dx, int dy, int dz, int buttons) wakeup(sc); } selwakeup(&sc->rsel); + KNOTE(&sc->rsel.si_note, 0); } static int -- 1.7.7.2