From owner-cvs-all@FreeBSD.ORG Sun Aug 22 03:52:08 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8D68116A4D0; Sun, 22 Aug 2004 03:52:08 +0000 (GMT) Received: from aslan.scsiguy.com (aslan.scsiguy.com [63.229.232.106]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0320543D5F; Sun, 22 Aug 2004 03:52:08 +0000 (GMT) (envelope-from gibbs@scsiguy.com) Received: from aslan.scsiguy.com (aslan.scsiguy.com [63.229.232.106]) by aslan.scsiguy.com (8.12.11/8.12.11) with ESMTP id i7M3pqhL008556; Sat, 21 Aug 2004 21:51:52 -0600 (MDT) (envelope-from gibbs@scsiguy.com) Date: Sat, 21 Aug 2004 21:51:52 -0600 From: "Justin T. Gibbs" To: Brian Somers Message-ID: <53F72233A48EFF2AFE6728E6@aslan.scsiguy.com> In-Reply-To: <20040821222914.04419f2d@dev.lan.Awfulhak.org> References: <200408171812.i7HICbLM078769@repoman.freebsd.org> <20040819051134.7f088757@dev.lan.Awfulhak.org> <20040821195714.232ea67f@dev.lan.Awfulhak.org> <20040821222914.04419f2d@dev.lan.Awfulhak.org> X-Mailer: Mulberry/3.1.6 (Linux/x86) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/isa psm.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: "Justin T. Gibbs" List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Aug 2004 03:52:08 -0000 > This won't work for the moused cases I quoted previously: > > if (pBufP == 0 && (rBuf & cur_proto[0]) != cur_proto[1]) > return 0; It is correct for this case. This test is looking for the start of a packet. Setting cur_proto[0] to 0 essentially disables this test - the psm driver is doing it for moused. > /* is there an extra data byte? */ > if (pBufP >= cur_proto[4] && (rBuf & cur_proto[0]) != cur_proto[1]) > { For this case, it is hard to say if it is correct or not. The 4th byte is further vetted by the fourth byte sync mask futher down. The question is whether, in the PS/2 protocol case, the packets ever vary in size in some unpredictable fashion that can only be detected by seeing the sync bits in the first byte of the next packet. From looking at psm.c, that doesn't seem to be the case. The format is stable once the mouse is put in a particular mode. Anyway, the patch that I posted before has the same effect on moused as using the "disable sync checking" option in psm.c, but without actually disabling sync checking in psm. Since I don't have your mouse, I can't say if your mouse will function correctly through this code path with a syncmask of zero or not. > So the psm.c 1.79 changes have essentially broken moused's method of > determining the first byte. Not exactly. 1.79 caused moused to always discard the first byte for your mouse. The second change insures that this doesn't happen and should work so long as your mouse has a fixed packet size - seems to be the case for all PS/2 mice acording to psm.c. I'm not against further cleanups of moused and friends, but I would like to know if the second change fixes the problem for you. -- Justin