summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorn_hibma <n_hibma@FreeBSD.org>1999-02-15 21:41:43 +0000
committern_hibma <n_hibma@FreeBSD.org>1999-02-15 21:41:43 +0000
commit40ead2b843c4d46a6088c16b62c9f07c3563fab9 (patch)
tree041b9974f70571bf974c556e97675007378d45bd /sys/dev
parente77ebf71dd4a44165919bf075c7e103f531f2fc9 (diff)
downloadFreeBSD-src-40ead2b843c4d46a6088c16b62c9f07c3563fab9.zip
FreeBSD-src-40ead2b843c4d46a6088c16b62c9f07c3563fab9.tar.gz
Applied patch from MAEKAWA Masahide <bishop@rr.iij4u.or.jp>. (PR2)
Seems to solve a problem with a mouse not responding to movements in the X direction. Problem description is still rather vague and solution is not exactly clear. Problem might be a compiler optimisation.
Diffstat (limited to 'sys/dev')
-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 b686f9f..66e7e58 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);
OpenPOWER on IntegriCloud