Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 09 Jun 2000 10:41:39 +0900
From:      Kazutaka YOKOTA <yokota@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..
Message-ID:  <200006090141.KAA27612@zodiac.mech.utsunomiya-u.ac.jp>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200006090141.KAA27612>