Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261347AbVBJTJO (ORCPT ); Thu, 10 Feb 2005 14:09:14 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261342AbVBJTJN (ORCPT ); Thu, 10 Feb 2005 14:09:13 -0500 Received: from mx1.redhat.com ([66.187.233.31]:32735 "EHLO mx1.redhat.com") by vger.kernel.org with ESMTP id S261349AbVBJTHu (ORCPT ); Thu, 10 Feb 2005 14:07:50 -0500 Date: Thu, 10 Feb 2005 11:07:46 -0800 From: Pete Zaitcev To: Dmitry Torokhov , linux-kernel@vger.kernel.org Subject: Re: [PATCH] Fix ALPS sync loss Message-ID: <20050210110746.1c779ffd@localhost.localdomain> In-Reply-To: References: Organization: Red Hat, Inc. X-Mailer: Sylpheed-Claws 0.9.12cvs126.2 (GTK+ 2.4.14; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 911 Lines: 24 On Tue, 8 Feb 2005 18:40:12 -0500, Dmitry Torokhov wrote: > Here is the promised patch. It turns out protocol validation code was > a bit (or rather a byte ;) ) off. > +++ b/drivers/input/mouse/alps.c 2005-02-08 18:16:27 -05:00 > @@ -198,8 +198,8 @@ > return PSMOUSE_BAD_DATA; > > /* Bytes 2 - 6 should have 0 in the highest bit */ > - if (psmouse->pktcnt > 1 && psmouse->pktcnt <= 6 && > - (psmouse->packet[psmouse->pktcnt] & 0x80)) > + if (psmouse->pktcnt >= 2 && psmouse->pktcnt <= 6 && > + (psmouse->packet[psmouse->pktcnt - 1] & 0x80)) > return PSMOUSE_BAD_DATA; This seems to work here, no more dead pad. -- Pete - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/