From owner-freebsd-current Sat May 25 03:39:29 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id DAA00353 for current-outgoing; Sat, 25 May 1996 03:39:29 -0700 (PDT) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id DAA00348 for ; Sat, 25 May 1996 03:39:24 -0700 (PDT) Received: (from bde@localhost) by godzilla.zeta.org.au (8.6.12/8.6.9) id UAA13162; Sat, 25 May 1996 20:29:54 +1000 Date: Sat, 25 May 1996 20:29:54 +1000 From: Bruce Evans Message-Id: <199605251029.UAA13162@godzilla.zeta.org.au> To: jkh@time.cdrom.com, mark@seeware.DIALix.oz.au Subject: Re: bad keyboard reset routine? Cc: freebsd-current@FreeBSD.ORG Sender: owner-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >> Unfortunately since this error message started showing up my keyboard >> also stopped working! Running -stable a few days old. >I see! >Uh, so.. Bruce, you have any plans for this since you didn't like >my (stupid) suggestion of removing the error message? :-) First, don't read KB_DATA in the initial loop without checking that it is valid. A succession of false negative responses results in sending 5 resets in a row to the keyboard, and who knows what the keyboard would do then. Second, increase the arg in DELAY(10) into something that can give a resonably accurate result on all systems of interest. DELAY() has a guaranteed accuracy of -20..+infinity us, except at probe time has a guaranteed accuracy of -20..+20 us on all systems of interest. DELAY(1000) would be OK for the probe, but DELAY(1000) is too wasteful once the system has started. (So is DELAY(1) :-).) Third, increase the number of retries in the second loop until the error message goes away. Fourth, figure out why the total timeout retries needs or needed to be about 50 times larger for some keyboards than for others. My keyboards aren't very sensitive to timing, so this is hard for me to debug. Bruce