From patchwork Sat Nov 12 19:15:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Torokhov X-Patchwork-Id: 9424421 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 641FB60512 for ; Sat, 12 Nov 2016 19:16:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5AA0728B49 for ; Sat, 12 Nov 2016 19:16:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4F54928BA5; Sat, 12 Nov 2016 19:16:09 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EDF1328B49 for ; Sat, 12 Nov 2016 19:16:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966863AbcKLTPv (ORCPT ); Sat, 12 Nov 2016 14:15:51 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:33727 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966663AbcKLTPt (ORCPT ); Sat, 12 Nov 2016 14:15:49 -0500 Received: by mail-pg0-f67.google.com with SMTP id 3so4756195pgd.0; Sat, 12 Nov 2016 11:15:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=PKjWGWjkYGMRZWSM2Huq9FG7VAyjzVknB0wpKgqnDIg=; b=beB1jtFUrWzBFIDQ4oJFu+6bOg6FTpga8ddXtKTwHoHpYvE63L5/DC6ul7nh3nilUu r6J87ZVAFn/c95kLfk3ySgURKPKPFkuL1xxmPjht14ymfc9QVI2IANhrtmYE928DxyRS BLe2Ct6k80R9yb698Lsg2U/luVaMw98Gsx8WPODl55s63Dza2OFnlMb28ygr3795nrvJ up56hAjmKKsbzTM4dmhFHfZnPgSO5ZfYfhMPFnieN4OnvhhZNroJrA5WDebiW5I18iLz pKHhmcmkLNwy/uIa5ppFePYIMiSqlUGWd997VoXJSpOkv5BA89vaaVDpRJ1gDIU/pUaY XIEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=PKjWGWjkYGMRZWSM2Huq9FG7VAyjzVknB0wpKgqnDIg=; b=K8yQnELdJW5zCZmo/h5u70tLuS2TQkcAdGhdeWMdOaSQpY9jrVfLhV2pte5QgIVcHd XQiI999x/K+atLzyxf9Z0VyUuyGQpPsstGrTRartoYb29rVZ5/Fnye7YK3yuN/02RGbk doCe9i+8vKneKeUsPipRZhTmg3/f6YCTvAbYKr9tt7nS3g2PRLpVE9xU48izzsZ7V7A3 tbSYbtnWkWo7ciVFGEEN3qHM+9N75eejBWRZW2yiyso8N2wvNLPcJWlL0G8kMcRDHJ6E qoGnqQMR3Sdteh6KzLD1DrFFRAlrmygQX8wqbOFIkYfB5kdQg7zFdX4JPQUUOq34xzmK UZ7A== X-Gm-Message-State: ABUngvcDF4ojvsGLn5dnCveVnVBvsbSUzuMO6Zk0G6ppbGO1AIsp5t9z0Bmb9yi9cspuMw== X-Received: by 10.99.158.18 with SMTP id s18mr4956354pgd.163.1478978148538; Sat, 12 Nov 2016 11:15:48 -0800 (PST) Received: from dtor-ws ([2620:0:1000:1311:8974:781c:b1b2:2a2d]) by smtp.gmail.com with ESMTPSA id y134sm652060pfg.81.2016.11.12.11.15.47 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Sat, 12 Nov 2016 11:15:48 -0800 (PST) Date: Sat, 12 Nov 2016 11:15:45 -0800 From: Dmitry Torokhov To: linux-input@vger.kernel.org Cc: Hans de Goede , Pali =?iso-8859-1?Q?Roh=E1r?= , Chris Diamand , phonesyfreakies@gmail.com, Michael Shell , Eric Wong , Ondrej Zary , Christophe TORDEUX , Richard Pospesel , linux-kernel@vger.kernel.org Subject: [PATCH] Input: psmouse - disable automatic probing of BYD touchpads Message-ID: <20161112191545.GA19531@dtor-ws> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP BYD automatic protocol detection is extremely unreliable and is often triggers false positives on regular mice, Sentelic touchpads, and other devices. BYD has several documents that have recommended detection sequence, but they conflict with each other and, as far as I can see, still would not produce unique enough output to reliably differentiate BYD from other PS/2 devices. OEMs sourcing BYD devices also do not do us any favors by not supplying any reasonable DMI data and instead leaving turds like "To Be Filled By O.E.M." in place of vendor data, or "System Serial Number" as serial number. On top of that BYD is not truly modern multitouch controller, but rather a single-touch transitional device that only reports absolute coordinates at the beginning of finger contact and then reverts to reporting displacements, and thus not very precise; the only benefit from using BYD mode vs the legacy PS/2 mode is possibility of edge scrolling. Given the above, and the fact that BYD devices are somewhat uncommon, let's disable automatic detection of BYD devices. Users who know they have BYD trackpads or want to experiment can attempt to activate BYD protocol via sysfs: echo -n "byd" > /sys/bus/serio/devices/serio1/drvctl Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=151691 Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=175421 Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=120781 Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=121281 Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov --- drivers/input/mouse/psmouse-base.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c index fb4b185..bee2674 100644 --- a/drivers/input/mouse/psmouse-base.c +++ b/drivers/input/mouse/psmouse-base.c @@ -1115,10 +1115,6 @@ static int psmouse_extensions(struct psmouse *psmouse, if (psmouse_try_protocol(psmouse, PSMOUSE_TOUCHKIT_PS2, &max_proto, set_properties, true)) return PSMOUSE_TOUCHKIT_PS2; - - if (psmouse_try_protocol(psmouse, PSMOUSE_BYD, - &max_proto, set_properties, true)) - return PSMOUSE_BYD; } /*