From owner-freebsd-current Sat Aug 18 2: 8:18 2001 Delivered-To: freebsd-current@freebsd.org Received: from nasu.utsunomiya-u.ac.jp (nasu.utsunomiya-u.ac.jp [160.12.128.3]) by hub.freebsd.org (Postfix) with ESMTP id CD5AC37B417 for ; Sat, 18 Aug 2001 02:07:54 -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 f7I97rc344827; Sat, 18 Aug 2001 18:07:53 +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 f7I97rK142372; Sat, 18 Aug 2001 18:07:53 +0900 (JST) Received: from zodiac.mech.utsunomiya-u.ac.jp (IDENT:97G64YeM9EOhI42ktvxwhNswbf38gKJB@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 SAA16375; Sat, 18 Aug 2001 18:17:34 +0900 (JST) Message-Id: <200108180917.SAA16375@zodiac.mech.utsunomiya-u.ac.jp> To: freebsd-current@freebsd.org Cc: 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 18:24:39 JST." <200108150924.SAA06230@zodiac.mech.utsunomiya-u.ac.jp> References: <200108150924.SAA06230@zodiac.mech.utsunomiya-u.ac.jp> Date: Sat, 18 Aug 2001 18:17:33 +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 >Anyway, I am now considering the following experiment. > >- We make the psm driver count the number of the "out-of-sync" errors. >- When the error is detected for the first time, the psm driver will > throw few data bytes (up to entire packet size) and see if it can > get back to sync. >- If the error still persists, the psm driver disable/enable the mouse > and see if it works. >- If the error still persists and the count goes up to N (10 or 20?), > the psm driver reset and reinitialize the mouse. The counter > is reset to zero. > >Too complicated? > >Kazu Ok, here is an experimental patch. It tries to implement the above scheme. http://people.freebsd.org/~yokota/psm-out-of-sync.diff.gz It also discards an incomplete data packet when the interval between two consequtive bytes are longer than pre-defined timeout (2 seconds in this patch). The last byte which arrived late will be regarded as the first byte of a new packet. This is louie's idea. Watch out for the followin messages: "psmintr: delay too long; resetting byte count" "psmintr: out of sync (%04x != %04x)" "psmintr: discard a byte (%d)" "psmintr: re-enable the mouse" "psmintr: reset the mouse" Please test if you are suffering from the out-of-sync errors! Kazu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message