aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorNick Hibma <n_hibma@FreeBSD.org>1999-02-15 21:41:43 +0000
committerNick Hibma <n_hibma@FreeBSD.org>1999-02-15 21:41:43 +0000
commitfe7627280b1277f80fe58f179023c5f13ecbf321 (patch)
treeb7c0fefdf1ff0249dbd4b6a4b865bea4488f3208 /sys/dev/usb
parent08c3a58944ccf482126ae7e3214602dec35174c9 (diff)
Notes
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/ums.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sys/dev/usb/ums.c b/sys/dev/usb/ums.c
index b686f9f2ee874..66e7e58f15405 100644
--- a/sys/dev/usb/ums.c
+++ b/sys/dev/usb/ums.c
@@ -394,10 +394,12 @@ ums_detach(device_t self)
/* someone waiting for data */
if (sc->state & UMS_ASLEEP) {
DPRINTF(("Waking up %p\n", sc));
+ sc->state &= ~UMS_ASLEEP; /* PR2 */
wakeup(sc);
}
if (sc->state & UMS_SELECT) {
DPRINTF(("Waking up select %p\n", &sc->rsel));
+ sc->state &= ~UMS_SELECT; /* PR2 */
selwakeup(&sc->rsel);
}
@@ -513,10 +515,12 @@ ums_intr(reqh, addr, status)
/* someone waiting for data */
if (sc->state & UMS_ASLEEP) {
DPRINTF(("Waking up %p\n", sc));
+ sc->state &= ~UMS_ASLEEP; /* PR2 */
wakeup(sc);
}
if (sc->state & UMS_SELECT) {
DPRINTF(("Waking up select %p\n", &sc->rsel));
+ sc->state &= ~UMS_SELECT; /* PR2 */
selwakeup(&sc->rsel);
}
#endif
@@ -636,7 +640,9 @@ ums_read(dev_t dev, struct uio *uio, int flag)
*/
sc->state |= UMS_ASLEEP;
error = tsleep(sc, PZERO | PCATCH, "umsrea", 0);
+ /* PR2: statement moved to ums_poll/ums_detach
sc->state &= ~UMS_ASLEEP;
+ */
if (error) {
splx(s);
return error;
@@ -683,7 +689,9 @@ ums_poll(dev_t dev, int events, struct proc *p)
} else {
sc->state |= UMS_SELECT;
selrecord(p, &sc->rsel);
+ /* PR2: statement moved to ums_poll/ums_detach
sc->state &= ~UMS_SELECT;
+ */
}
}
splx(s);