Page MenuHomeFreeBSD

D30342.diff
No OneTemporary

D30342.diff

diff --git a/sys/dev/usb/input/ums.c b/sys/dev/usb/input/ums.c
--- a/sys/dev/usb/input/ums.c
+++ b/sys/dev/usb/input/ums.c
@@ -380,7 +380,7 @@
/* check if we can put more data into the FIFO */
if (usb_fifo_put_bytes_max(sc->sc_fifo.fp[USB_FIFO_RX]) == 0) {
#ifdef EVDEV_SUPPORT
- if (sc->sc_evflags == 0)
+ if ((sc->sc_evflags & UMS_EVDEV_OPENED) == 0)
break;
#else
break;
@@ -858,7 +858,10 @@
{
struct ums_softc *sc = usb_fifo_softc(fifo);
- ums_stop_rx(sc);
+#ifdef EVDEV_SUPPORT
+ if ((sc->sc_evflags & UMS_EVDEV_OPENED) == 0)
+#endif
+ ums_stop_rx(sc);
}
#if ((MOUSE_SYS_PACKETSIZE != 8) || \
@@ -945,7 +948,7 @@
mtx_assert(&sc->sc_mtx, MA_OWNED);
- sc->sc_evflags = UMS_EVDEV_OPENED;
+ sc->sc_evflags |= UMS_EVDEV_OPENED;
if (sc->sc_fflags == 0) {
ums_reset(sc);
@@ -962,7 +965,7 @@
mtx_assert(&sc->sc_mtx, MA_OWNED);
- sc->sc_evflags = 0;
+ sc->sc_evflags &= ~UMS_EVDEV_OPENED;
if (sc->sc_fflags == 0)
ums_stop_rx(sc);
@@ -984,7 +987,7 @@
/* check for first open */
#ifdef EVDEV_SUPPORT
- if (sc->sc_fflags == 0 && sc->sc_evflags == 0)
+ if (sc->sc_fflags == 0 && (sc->sc_evflags & UMS_EVDEV_OPENED) == 0)
ums_reset(sc);
#else
if (sc->sc_fflags == 0)

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 17, 7:47 PM (20 h, 53 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14683895
Default Alt Text
D30342.diff (1 KB)

Event Timeline