>At first I was laboring under the assumption that this was an
>SMP-related problem and, while intensely irritating on my box "zippy",
>I figured it would at least only bite a small number of people and
>only in -current.
>
>Now I've switched over to a single-CPU box running RELENG_4 and this
>problem is, indeed, very much there.  It's a really _bad_ problem 
>given that the mouse goes absolutely nuts during these intervals
>and you *will* have bogus contents selected and pasted into your
>xterms at random intervals.  Depending on what was cut and pasted,
>the results could be pretty nasty.

Have you tried the patch below which I posted to -stable and -current
mailing lists back in June?

Kazu

Index: psm.c
===================================================================
RCS file: /src/CVS/src/sys/isa/psm.c,v
retrieving revision 1.26
diff -u -r1.26 psm.c
--- psm.c       2000/04/19 14:57:50     1.26
+++ psm.c       2000/06/09 01:19:59
@@ -1830,10 +1830,11 @@
 
     unit = (int)arg;
     sc = devclass_get_softc(psm_devclass, unit);
-    if (sc->watchdog) {
+    if (sc->watchdog && kbdc_lock(sc->kbdc, TRUE)) {
        if (verbose >= 4)
            log(LOG_DEBUG, "psm%d: lost interrupt?\n", unit);
        psmintr(sc);
+       kbdc_lock(sc->kbdc, FALSE);
     }
     sc->watchdog = TRUE;
     sc->callout = timeout(psmtimeout, (void *)unit, hz);
@@ -1880,18 +1881,6 @@
         if ((sc->state & PSM_OPEN) == 0)
             continue;
     
-        /* 
-        * Check sync bits. We check for overflow bits and the bit 3
-        * for most mice. True, the code doesn't work if overflow 
-        * condition occurs. But we expect it rarely happens...
-        */
-       if ((sc->inputbytes == 0) 
-               && ((c & sc->mode.syncmask[0]) != sc->mode.syncmask[1])) {
-            log(LOG_DEBUG, "psmintr: out of sync (%04x != %04x).\n", 
-               c & sc->mode.syncmask[0], sc->mode.syncmask[1]);
-            continue;
-       }
-
         sc->ipacket[sc->inputbytes++] = c;
         if (sc->inputbytes < sc->mode.packetsize) 
            continue;
@@ -1904,6 +1893,13 @@
 
        c = sc->ipacket[0];
 
+       if ((c & sc->mode.syncmask[0]) != sc->mode.syncmask[1]) {
+            log(LOG_DEBUG, "psmintr: out of sync (%04x != %04x).\n", 
+               c & sc->mode.syncmask[0], sc->mode.syncmask[1]);
+           sc->inputbytes = 0;
+            continue;
+       }
+
        /* 
         * A kludge for Kensington device! 
         * The MSB of the horizontal count appears to be stored in 



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-stable" in the body of the message

Reply via email to