Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Sep 1998 14:26:14 -0400 (EDT)
From:      tbuswell@mediaone.net
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   misc/8027: PS/2 intellimouse and "psmintr: out of sync" messages
Message-ID:  <199809221826.OAA00789@tbuswell.ne.mediaone.net>

next in thread | raw e-mail | index | archive | help

>Number:         8027
>Category:       misc
>Synopsis:       PS/2 intellimouse and "psmintr: out of sync" messages
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 22 11:30:01 PDT 1998
>Last-Modified:
>Originator:     Ted Buswell
>Organization:
>Release:        FreeBSD 3.0-BETA i386
>Environment:

	PS/2 "MS Intellimouse" and i386/isa/psm.c 1.54

>Description:

	No recovery is attempted when the psm driver detects
	that it is "out of sync" with the device.  Once this condition is
	reached, all subsequent activity with the mouse will generate a
	message such as:
		/kernel: psmintr: out of sync (00c8 != 0008).
	A reboot is required to regain error-free use of the mouse.

>How-To-Repeat:

	1) disconnect the mouse from the host
	2) reconnect the mouse
	3) move the mouse to generate "out of sync" messages.

>Fix:

	In my opinion, when the "out of sync" condition is detected,
	an effort should be made to resync, possibly through
	reinitialization of the device.
	
	The attached diff fixes the problem, at least for my
	"Intellimouse"-type device, by reinitializing the device.
	[is the spltty() needed?]

Index: psm.c
===================================================================
RCS file: /home/ncvs/src/sys/i386/isa/psm.c,v
retrieving revision 1.54
diff -c -r1.54 psm.c
*** psm.c	1998/07/06 16:10:06	1.54
--- psm.c	1998/09/22 18:12:15
***************
*** 1696,1703 ****
  	 */
  	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;
  	}
  
--- 1696,1711 ----
  	 */
  	if ((sc->inputbytes == 0) 
  		&& ((c & sc->mode.syncmask[0]) != sc->mode.syncmask[1])) {
+             int s;
              log(LOG_DEBUG, "psmintr: out of sync (%04x != %04x).\n", 
!                 c & sc->mode.syncmask[0], sc->mode.syncmask[1]);
!             s = spltty();
!             if( kbdc_lock(sc->kbdc, TRUE) ) {
!               if (!reinitialize(unit, &sc->mode) || !enable_aux_dev(sc->kbdc))
!                 recover_from_error(sc->kbdc);
!               kbdc_lock(sc->kbdc, FALSE);
!             }
!             splx(s);
              continue;
  	}
  
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



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