From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dmitry Torokhov Subject: Re: [PATCH v3 3/4] input: alps: For protocol V3, do not process data when last packet's bit7 is set Date: Sat, 8 Nov 2014 23:50:39 -0800 Message-ID: <20141109075039.GA34700@dtor-ws> References: <1412329392-5580-1-git-send-email-pali.rohar@gmail.com> <1414884310-19842-1-git-send-email-pali.rohar@gmail.com> <1414884310-19842-4-git-send-email-pali.rohar@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from mail-ig0-f173.google.com ([209.85.213.173]:48935 "EHLO mail-ig0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751260AbaKIHuo (ORCPT ); Sun, 9 Nov 2014 02:50:44 -0500 Content-Disposition: inline In-Reply-To: <1414884310-19842-4-git-send-email-pali.rohar@gmail.com> Sender: linux-input-owner@vger.kernel.org List-Id: linux-input@vger.kernel.org To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: Hans de Goede , Yunkang Tang , Tommy Will , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Hi Pali, On Sun, Nov 02, 2014 at 12:25:09AM +0100, Pali Roh=E1r wrote: > Sometimes on Dell Latitude laptops psmouse/alps driver receive invali= d ALPS > protocol V3 packets with bit7 set in last byte. More often it can be = reproduced > on Dell Latitude E6440 or E7440 with closed lid and pushing cover abo= ve touchpad. >=20 > If bit7 in last packet byte is set then it is not valid ALPS packet. = I was told > that ALPS devices never send these packets. It is not know yet who se= nd those > packets, it could be Dell EC, bug in BIOS and also bug in touchpad fi= rmware... >=20 > With this patch alps driver does not process those invalid packets an= d drops it > with PSMOUSE_FULL_PACKET so psmouse driver does not enter to out of s= ync state. >=20 > This patch fix problem when psmouse driver still resetting ALPS devic= e when > laptop lid is closed because of receiving invalid packets in out of s= ync state. >=20 > Signed-off-by: Pali Roh=E1r > Tested-by: Pali Roh=E1r > Cc: stable@vger.kernel.org > --- > drivers/input/mouse/alps.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) >=20 > diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c > index 7c47e97..e802d28 100644 > --- a/drivers/input/mouse/alps.c > +++ b/drivers/input/mouse/alps.c > @@ -1181,6 +1181,16 @@ static psmouse_ret_t alps_process_byte(struct = psmouse *psmouse) > return PSMOUSE_BAD_DATA; > } > =20 > + if (priv->proto_version =3D=3D ALPS_PROTO_V3 && psmouse->pktcnt =3D= =3D psmouse->pktsize) { > + // For protocol V3, do not process data when last packet's bit7 is= set > + if (psmouse->packet[psmouse->pktcnt - 1] & 0x80) { > + psmouse_dbg(psmouse, "v3 discard packet[%i] =3D %x\n", > + psmouse->pktcnt - 1, > + psmouse->packet[psmouse->pktcnt - 1]); > + return PSMOUSE_FULL_PACKET; > + } > + } I wanted to apply it, but I would like some more data. Could you please send me the dmesg with i8042.debug wit this patch in place? Thanks! --=20 Dmitry -- To unsubscribe from this list: send the line "unsubscribe linux-input" = in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html