From patchwork Thu Jul 30 15:00:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 6903481 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 34A89C05AC for ; Thu, 30 Jul 2015 15:01:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5AB2720569 for ; Thu, 30 Jul 2015 15:01:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1F6EA2055A for ; Thu, 30 Jul 2015 15:01:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750892AbbG3PBA (ORCPT ); Thu, 30 Jul 2015 11:01:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59537 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750847AbbG3PA7 (ORCPT ); Thu, 30 Jul 2015 11:00:59 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 88B92B7CCA; Thu, 30 Jul 2015 15:00:59 +0000 (UTC) Received: from shalem.localdomain (vpn1-7-2.ams2.redhat.com [10.36.7.2]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t6UF0u4w009755 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 30 Jul 2015 11:00:57 -0400 Subject: Re: ALPS DualPoint double click bug To: =?UTF-8?Q?Pali_Roh=c3=a1r?= References: <20150721071218.GA27290@pali> <20150722072116.GA22138@pali> <55B0B48D.7010603@redhat.com> <55B65EEA.5080404@redhat.com> <55BA31F3.3070807@redhat.com> <20150730144643.GG26714@pali> Cc: Douglas Christman , Benjamin Tissoires , linux-input , Dmitry Torokhov , cpaul@redhat.com From: Hans de Goede Message-ID: <55BA3C28.3080506@redhat.com> Date: Thu, 30 Jul 2015 17:00:56 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <20150730144643.GG26714@pali> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.26 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_TVD_MIME_EPI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hi, On 30-07-15 16:46, Pali Rohár wrote: > On Thursday 30 July 2015 16:17:23 Hans de Goede wrote: >> Hi, >> >> On 28-07-15 01:38, Douglas Christman wrote: >>> On Mon, Jul 27, 2015 at 12:40 PM, Hans de Goede wrote: >>>> >>>> OK, please let me know soon, I would like to get to the bottom >>>> of this, and knowing the exact commit causing the problem will >>>> help a lot. >>>> >>>> Regards, >>>> >>>> hans >>> >>> I've verified that reverting 92bac83d on a clean v4.1 kernel >>> (b953c0d2) resolves the issue. >> >> Thanks, >> >> Can you please apply the attached patch on a clean v4.1 kernel, >> and confirm that that fixes this ? >> >> Regards, >> >> Hans > >> From ee3d5d5a298b178ae5284b9766ca849665a37670 Mon Sep 17 00:00:00 2001 >> From: Hans de Goede >> Date: Thu, 30 Jul 2015 15:49:16 +0200 >> Subject: [PATCH] alps: Only Dell laptops have separate button bits for v2 >> dualpoint sticks >> >> It turns out that only Dell laptops have the separate button bits for >> v2 dualpoint sticks and that commit 92bac83dd79e ("Input: alps - non >> interleaved V2 dualpoint has separate stick button bits") causes >> regressions on Toshiba laptops. >> >> This commit adds a check for Dell laptops to the code for handling these >> extra button bits, fixing this regression. >> >> This patch has been tested on a Dell Latitude D620 to make sure that it >> does not reintroduce the original problem. >> >> Reported-by: Douglas Christman >> Cc: stable@vger.kernel.org >> Signed-off-by: Hans de Goede >> --- >> drivers/input/mouse/alps.c | 6 ++++-- >> 1 file changed, 4 insertions(+), 2 deletions(-) >> >> diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c >> index 113d6f1..889aec1 100644 >> --- a/drivers/input/mouse/alps.c >> +++ b/drivers/input/mouse/alps.c >> @@ -20,6 +20,7 @@ >> #include >> #include >> #include >> +#include >> >> #include "psmouse.h" >> #include "alps.h" >> @@ -251,8 +252,9 @@ static void alps_process_packet_v1_v2(struct psmouse *psmouse) >> return; >> } >> >> - /* Non interleaved V2 dualpoint has separate stick button bits */ >> - if (priv->proto_version == ALPS_PROTO_V2 && >> + /* Dell non interleaved V2 dualpoint has separate stick button bits */ >> + if (dmi_name_in_vendors("Dell") && >> + priv->proto_version == ALPS_PROTO_V2 && >> priv->flags == (ALPS_PASS | ALPS_DUALPOINT)) { >> left |= packet[0] & 1; >> right |= packet[0] & 2; > > What about introducing new flag ALPS_ instead calling > dmi_name_in_vendors() function every time when we need to process > packet? That is a good idea. Douglas can you test the attached version instead of the previous one please ? Thanks & Regards, Hans From 93a1852f32ab37b2cbcdb7e797f1ad59eb6bbef4 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Thu, 30 Jul 2015 15:49:16 +0200 Subject: [PATCH] alps: Only Dell laptops have separate button bits for v2 dualpoint sticks It turns out that only Dell laptops have the separate button bits for v2 dualpoint sticks and that commit 92bac83dd79e ("Input: alps - non interleaved V2 dualpoint has separate stick button bits") causes regressions on Toshiba laptops. This commit adds a check for Dell laptops to the code for handling these extra button bits, fixing this regression. This patch has been tested on a Dell Latitude D620 to make sure that it does not reintroduce the original problem. Reported-by: Douglas Christman Cc: stable@vger.kernel.org Signed-off-by: Hans de Goede --- drivers/input/mouse/alps.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c index 113d6f1..4d24686 100644 --- a/drivers/input/mouse/alps.c +++ b/drivers/input/mouse/alps.c @@ -20,6 +20,7 @@ #include #include #include +#include #include "psmouse.h" #include "alps.h" @@ -99,6 +100,7 @@ static const struct alps_nibble_commands alps_v6_nibble_commands[] = { #define ALPS_FOUR_BUTTONS 0x40 /* 4 direction button present */ #define ALPS_PS2_INTERLEAVED 0x80 /* 3-byte PS/2 packet interleaved with 6-byte ALPS packet */ +#define ALPS_DELL 0x100 /* device is a Dell laptop */ #define ALPS_BUTTONPAD 0x200 /* device is a clickpad */ static const struct alps_model_info alps_model_data[] = { @@ -251,9 +253,9 @@ static void alps_process_packet_v1_v2(struct psmouse *psmouse) return; } - /* Non interleaved V2 dualpoint has separate stick button bits */ + /* Dell non interleaved V2 dualpoint has separate stick button bits */ if (priv->proto_version == ALPS_PROTO_V2 && - priv->flags == (ALPS_PASS | ALPS_DUALPOINT)) { + priv->flags == (ALPS_DELL | ALPS_PASS | ALPS_DUALPOINT)) { left |= packet[0] & 1; right |= packet[0] & 2; middle |= packet[0] & 4; @@ -2550,6 +2552,8 @@ static int alps_set_protocol(struct psmouse *psmouse, priv->byte0 = protocol->byte0; priv->mask0 = protocol->mask0; priv->flags = protocol->flags; + if (dmi_name_in_vendors("Dell")) + priv->flags |= ALPS_DELL; priv->x_max = 2000; priv->y_max = 1400; -- 2.4.3