Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1988991imu; Wed, 12 Dec 2018 07:43:44 -0800 (PST) X-Google-Smtp-Source: AFSGD/VgVRvjL4b1LcTR9i/f8e5BFAQSSc5B8S4Tw/GpkviMis5ZxLFw7jCiMjJQ0efEVxZmPpPU X-Received: by 2002:a63:7a5b:: with SMTP id j27mr18694068pgn.112.1544629424525; Wed, 12 Dec 2018 07:43:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544629424; cv=none; d=google.com; s=arc-20160816; b=bNlBHRZrub8z7sq336zZaJpPwBMZgvdb4XEBRvtxLgg70teMPx3NZTUEkdDwbXi6pB h8z93zJnERVcP2Vyycy/AgU1MfGVvSIGzP9ctLXFki0XRleC+R4zkS/vHB8Ph4RIeohH Ka9Cg820n+SIjhrl0gJkLY3VgtcjFWGQyi2Ug/TBkhv3aqF7S6qjTHuWg4WbkoUGOAkQ pPiznlSglGgpCtF2dzMJGKUB5F81EEcKihYm6G/9O70Bi3MNMgaU0FHWda2HDxegJK+L boi/InDlT4+GRG45MP2EJxgw7DN2ik/zkLOjH6eP2NDONsbtxsRuRRyibVMRi8AtMCZm B6IA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=gYSEL7b445kHkjt/eSRY4Dy4Zr907lWaDjbfKZDAKCY=; b=h4Gfe1mg70T9y0hmfPK2fcV16StOzBhHuqYzZ7+ySAexbCekIRHCx37Yhv2be9SDnE pqIdWbimXveBfXgCYtNZ1yPm3i+qD4lh0IzgxSknqn+bk4FpOGAN7mrhkeMqwrCKX2OB LTdSWwjlHBeriv+X4JhJtTiykTnE6SGo7yIoyRzGEJU7qTE9oxF6M6bsFFp4pxXzxcAx UgC1VOy12FE5fmP5T8ZQpo3Et2rG3Y3HlVAxwPu+G5spG4Cxjypzd62Q4oPCifOjNgSj o1d02klHogY+knHQmZCau9BwFI0HyQPKhRw5gSVivPVwaUtmYcDHtBwXBvAhw3iFtTss KjYQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v83si16205627pfk.264.2018.12.12.07.43.09; Wed, 12 Dec 2018 07:43:44 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727677AbeLLPmS (ORCPT + 99 others); Wed, 12 Dec 2018 10:42:18 -0500 Received: from mx1.redhat.com ([209.132.183.28]:56426 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726325AbeLLPmS (ORCPT ); Wed, 12 Dec 2018 10:42:18 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3095C89ACB; Wed, 12 Dec 2018 15:42:17 +0000 (UTC) Received: from plouf.redhat.com (ovpn-116-24.ams2.redhat.com [10.36.116.24]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8876D60C5C; Wed, 12 Dec 2018 15:42:12 +0000 (UTC) From: Benjamin Tissoires To: Dmitry Torokhov , kt.liao@emc.com.tw, Aaron Ma , Kai Heng Feng Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Benjamin Tissoires , stable@vger.kernel.org Subject: [PATCH] Input: elantech - Disable elan-i2c for P52 and P72 Date: Wed, 12 Dec 2018 16:42:05 +0100 Message-Id: <20181212154205.24025-1-benjamin.tissoires@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 12 Dec 2018 15:42:17 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The current implementation of elan_i2c is known to not support those 2 laptops. A proper fix is to tweak both elantech and elan_i2c to transmit the correct information from PS/2, which would make a bad candidate for stable. So to give us some time for fixing the root of the problem, disable elan_i2c for the devices we know are not behaving properly. Link: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1803600 Link: https://bugs.archlinux.org/task/59714 Fixes: df077237cf55 Input: elantech - detect new ICs and setup Host Notify for them Cc: stable@vger.kernel.org # v4.18+ Signed-off-by: Benjamin Tissoires --- drivers/input/mouse/elantech.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/drivers/input/mouse/elantech.c b/drivers/input/mouse/elantech.c index 2d95e8d93cc7..830ae9f07045 100644 --- a/drivers/input/mouse/elantech.c +++ b/drivers/input/mouse/elantech.c @@ -1767,6 +1767,18 @@ static int elantech_smbus = IS_ENABLED(CONFIG_MOUSE_ELAN_I2C_SMBUS) ? module_param_named(elantech_smbus, elantech_smbus, int, 0644); MODULE_PARM_DESC(elantech_smbus, "Use a secondary bus for the Elantech device."); +static const char * const i2c_blacklist_pnp_ids[] = { + /* + * these are known to not be working properly as bits are missing + * in elan_i2c + */ + "LEN2131", /* ThinkPad P52 w/ NFC */ + "LEN2132", /* ThinkPad P52 */ + "LEN2133", /* ThinkPad P72 w/ NFC */ + "LEN2134", /* ThinkPad P72 */ + NULL +}; + static int elantech_create_smbus(struct psmouse *psmouse, struct elantech_device_info *info, bool leave_breadcrumbs) @@ -1802,10 +1814,12 @@ static int elantech_setup_smbus(struct psmouse *psmouse, if (elantech_smbus == ELANTECH_SMBUS_NOT_SET) { /* - * New ICs are enabled by default. + * New ICs are enabled by default, unless mentioned in + * i2c_blacklist_pnp_ids. * Old ICs are up to the user to decide. */ - if (!ETP_NEW_IC_SMBUS_HOST_NOTIFY(info->fw_version)) + if (!ETP_NEW_IC_SMBUS_HOST_NOTIFY(info->fw_version) || + psmouse_matches_pnp_id(psmouse, i2c_blacklist_pnp_ids)) return -ENXIO; } -- 2.19.2