From owner-freebsd-stable Fri Jul 21 20: 7:40 2000 Delivered-To: freebsd-stable@freebsd.org Received: from outmail.utsunomiya-u.ac.jp (outmail.utsunomiya-u.ac.jp [160.12.196.3]) by hub.freebsd.org (Postfix) with ESMTP id 8FE3237B80F for ; Fri, 21 Jul 2000 20:07:36 -0700 (PDT) (envelope-from yokota@zodiac.mech.utsunomiya-u.ac.jp) Received: from zodiac.mech.utsunomiya-u.ac.jp (IDENT:jgshV2rqmdvGELNsNYTRaa3lIxPTdB/r@zodiac.mech.utsunomiya-u.ac.jp [160.12.42.1]) by outmail.utsunomiya-u.ac.jp (8.9.3/3.7Wpl2) with ESMTP id MAA09117; Sat, 22 Jul 2000 12:07:34 +0900 (JST) Received: from zodiac.mech.utsunomiya-u.ac.jp (IDENT:m8WUDbbIMTizei3nnadUZYQiRCtO82PU@zodiac.mech.utsunomiya-u.ac.jp [160.12.42.1]) by zodiac.mech.utsunomiya-u.ac.jp (8.9.3+3.2W/3.7W/zodiac-May2000) with ESMTP id MAA20629; Sat, 22 Jul 2000 12:14:26 +0900 (JST) Message-Id: <200007220314.MAA20629@zodiac.mech.utsunomiya-u.ac.jp> To: "Jordan K. Hubbard" Cc: stable@freebsd.org, yokota@zodiac.mech.utsunomiya-u.ac.jp Subject: Re: psmintr: out of sync (0080 != 0000). ARGH! In-reply-to: Your message of "Fri, 21 Jul 2000 15:50:24 MST." <6390.964219824@localhost> References: <6390.964219824@localhost> Date: Sat, 22 Jul 2000 12:14:25 +0900 From: Kazutaka YOKOTA Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >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 majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message