Subject: kern/24363: Slight tweak for pms code
To: None <gnats-bugs@gnats.NetBSD.org>
From: seebs <seebs@vash.cel.plethora.net>
List: netbsd-bugs
Date: 02/08/2004 12:30:38
>Number:         24363
>Category:       kern
>Synopsis:       PS/2 mouse code could be a bit smarter
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun Feb 08 18:31:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     seebs
>Release:        NetBSD 1.6ZI
>Organization:
	
>Environment:
System: NetBSD vash.cel.plethora.net 1.6ZI NetBSD 1.6ZI (VASH) #3: Tue Feb 3 01:31:41 CST 2004 root@vash.cel.plethora.net:/usr/src/sys/arch/i386/compile/VASH i386
Architecture: i386
Machine: i386
>Description:
	The pms code tries to remember its state, so it can reset again if
	there was a problem.  It sometimes resets when it shouldn't.
>How-To-Repeat:
	Mess around with cheap console switches.
>Fix:
	Change != to <.  :)

Index: pms.c
===================================================================
RCS file: /cvsroot/src/sys/dev/pckbc/pms.c,v
retrieving revision 1.12
diff -c -r1.12 pms.c
*** pms.c	2002/10/02 16:52:04	1.12
--- pms.c	2004/02/08 18:30:24
***************
*** 455,461 ****
  			    res));
  		sc->protocol = PMS_UNKNOWN;
  		pms_enable(sc);
! 		if (sc->protocol != save_protocol) {
  #if defined(PMSDEBUG) || defined(DIAGNOSTIC)
  			printf("%s: protocol change, sleeping and retrying\n",
  			    sc->sc_dev.dv_xname);
--- 455,461 ----
  			    res));
  		sc->protocol = PMS_UNKNOWN;
  		pms_enable(sc);
! 		if (sc->protocol < save_protocol) {
  #if defined(PMSDEBUG) || defined(DIAGNOSTIC)
  			printf("%s: protocol change, sleeping and retrying\n",
  			    sc->sc_dev.dv_xname);
>Release-Note:
>Audit-Trail:
>Unformatted: