From owner-freebsd-stable Thu Jun 8 18:35: 7 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 F085437C0E5; Thu, 8 Jun 2000 18:34:54 -0700 (PDT) (envelope-from yokota@zodiac.mech.utsunomiya-u.ac.jp) Received: from zodiac.mech.utsunomiya-u.ac.jp (IDENT:7XidcUajliibfpqSo8DW5jjQiZMstYEf@zodiac.mech.utsunomiya-u.ac.jp [160.12.42.1]) by outmail.utsunomiya-u.ac.jp (8.9.3/3.7Wpl2) with ESMTP id KAA14770; Fri, 9 Jun 2000 10:34:52 +0900 (JST) Received: from zodiac.mech.utsunomiya-u.ac.jp (IDENT:qhCi9UzPvqUZ+lC6KjHMWiZgml6DzriB@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 KAA27612; Fri, 9 Jun 2000 10:41:40 +0900 (JST) Message-Id: <200006090141.KAA27612@zodiac.mech.utsunomiya-u.ac.jp> To: current@FreeBSD.org, stable@FreeBSD.org Cc: yokota@zodiac.mech.utsunomiya-u.ac.jp Subject: [PATCH] psmintr out of sync.. Date: Fri, 09 Jun 2000 10:41:39 +0900 From: Kazutaka YOKOTA Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Ok, folks. This is a test patch for the psm driver. I would like you to do some test for me. This is NOT the fix for the infamous "psmintr out of sync" message, but is a test patch to see how things are on your machines. The patch is for both CURRENT and STABLE. Please apply the patch to /sys/isa/psm.c (make backup copy first!), and rebuild the kernel. I would like you to carry out two tests: Test #1. Make sure you remove the flags 0x100 from the psm driver and see how your PS/2 mouse works. You may still see "psmintr out of sync", but I would like to know if the mouse pointer goes berserk when this message appears, or it seems to operate properly despite the message. Test #2. Add the flags 0x100 (NOCHECKSYNC) to the psm driver and see what happens. Please report your results together with your motherboard model, mouse model, FreeBSD version, mouse settings in /etc/rc.conf and XF86Config, and /var/run/dmesg.boot (after you reboot the kernel by typing "boot -v" at the boot loader prompt). Thank you for your cooperation. 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