From owner-freebsd-current Thu Aug 16 0:45:47 2001 Delivered-To: freebsd-current@freebsd.org Received: from nasu.utsunomiya-u.ac.jp (nasu2.utsunomiya-u.ac.jp [160.12.128.6]) by hub.freebsd.org (Postfix) with ESMTP id D051737B40F for ; Thu, 16 Aug 2001 00:45:36 -0700 (PDT) (envelope-from yokota@zodiac.mech.utsunomiya-u.ac.jp) Received: from nantai.utsunomiya-u.ac.jp by nasu.utsunomiya-u.ac.jp (8.11.2/1.1.29.3/26Jan01-1134AM) id f7G7iMb285510; Thu, 16 Aug 2001 16:44:32 +0900 (JST) Received: from zodiac.mech.utsunomiya-u.ac.jp by nantai.utsunomiya-u.ac.jp (8.11.2/1.1.29.3/30Jan01-0241PM) id f7G7h9K70118; Thu, 16 Aug 2001 16:43:09 +0900 (JST) Received: from zodiac.mech.utsunomiya-u.ac.jp (IDENT:EVIPJzRmt9na7YZT2T6OWg7NfKZ979In@zodiac.mech.utsunomiya-u.ac.jp [160.12.43.7]) by zodiac.mech.utsunomiya-u.ac.jp (8.9.3+3.2W/3.7W/zodiac-May2000) with ESMTP id QAA09356; Thu, 16 Aug 2001 16:52:49 +0900 (JST) Message-Id: <200108160752.QAA09356@zodiac.mech.utsunomiya-u.ac.jp> To: tlambert2@mindspring.com Cc: freebsd-current@freebsd.org, yokota@zodiac.mech.utsunomiya-u.ac.jp Subject: Re: psmintr: out of sync (was: Re: FreeBSD's aggressive keyboard probe/attach) In-reply-to: Your message of "Wed, 15 Aug 2001 23:43:40 MST." <3B7B6B9C.3866D87C@mindspring.com> References: <200108150924.SAA06230@zodiac.mech.utsunomiya-u.ac.jp> <3B7B6B9C.3866D87C@mindspring.com> Date: Thu, 16 Aug 2001 16:52:49 +0900 From: Kazutaka YOKOTA Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG >o If you are going to reset, disable and drain the input > queue before you do it; this will make the mouse lose > buffered data, making a partial send with a disable > in the middle not resume (e.g. it is no longer an > issue for you). Don't worry. I was going to do this :-) >o Because reinitialize can take a relatively _long_ > time, split the "reset" and "reset" complete operations > across a tsleep() (or msleep) so that the rest of the > system doesn't stall (I think the number I saw was 2 > seconds?!?). If you get an interrupt on the reset > complete because it always sends data, then that's not > a real issue: the tsleep becomes a guarantee, rather > than a requirement. Yes, we need to be careful about this. As the AT keyboard data and the PS/2 mouse data must read from the same keyboard controller port on the motherboard, we want to remove the mouse data from the keyboard controller port as soon as it arrives, otherwise the keyboard data will be blocked. >o You may want to implement a rate throttling mechanism; > init will stop respawning a getty on a port, if it is > exiting too rapidly, while inetd will rate limit the > number of connection attempts a second, as well. I > guess you probably don't want to disable it, ala init, > but limiting the number of reinitialize/resets per > interval would address the "too expensive" and "reset > causes additional resync errors" cases. We are not running getty on the mouse port. So, we don't need to worry about this. Kazu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message