Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp8355659imu; Fri, 28 Dec 2018 16:22:13 -0800 (PST) X-Google-Smtp-Source: ALg8bN7mgo3dpJcD/ODlGp92e649Qk9OtGZ5sMgj5+li1oil/9dQGyglztFe1l6bnct2n4eIJmZf X-Received: by 2002:a62:6cc9:: with SMTP id h192mr16914588pfc.223.1546042933817; Fri, 28 Dec 2018 16:22:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546042933; cv=none; d=google.com; s=arc-20160816; b=qCS5Em7gCOKLTjoI33+b9MWRPoMmIix7A8cFyUpTbtxTK+rWk5CO/yMZ/0R42IuirS awRDvYMZYBzi1mIWl4ASx2KooRynDNHfgwx7F44TFHmK8Wr8nq0a9Rv2smFBsk5vzW5F d7a+mlNANEPFyqA/sTyNTMt033nWsjBMfTJ1b/t2ERu6cjLo1liLLbtH3CrJ1PZi9Cva YsIQarCEZpVenCecRmQ8FJG2GHWQbqlKnL4VBI4fyKE7BSbqBrYD6PF7yaFoUe7kZrqD o/vIK5pQAyXqqe8R/I7EBjZGfTJwhA6dfrhhInIbfRmiMNfNJEMTkDnBn0VxvI7cpSLy qXEA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=YFxuS7/qj8z2IHuM62IeJtO1QYoGT+UDzMF3Fa8w3ag=; b=pq6nVQ8oh3HdYXKcmsqUEKTI+DAqpdni/5nvJtDljRTrGAAq2i2cZ+3zUSsUchbb4S p4JtAdGDp3ZfpSlGeBCbdBKBK5FX8+kR/5+xW+a3eQaEvHFkydUe9fMYKxktnIz7McbH qdxM1X+ylUdxay5knybYwnGGxgrV59UDNuR56WATwdrap73lvmeRVcQfC92EX9vmPxEX ZrTVHtXSmVC1G4b3sdTb7CBFy7Twyi5MfNrZGVE9gE/LqivHUx21J8h/M7u14APzf5Me uQLVMDkMt341wexSu30ig12QVXZkwxZgvambL9RYK/jpukVEt3SfxlYIkNm4gN5DYLhQ EF8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=bH+UuLyq; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z8si39079546pgf.577.2018.12.28.16.21.57; Fri, 28 Dec 2018 16:22:13 -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; dkim=pass header.i=@kernel.org header.s=default header.b=bH+UuLyq; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729312AbeL1MWV (ORCPT + 99 others); Fri, 28 Dec 2018 07:22:21 -0500 Received: from mail.kernel.org ([198.145.29.99]:34450 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732411AbeL1MPY (ORCPT ); Fri, 28 Dec 2018 07:15:24 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 218832148E; Fri, 28 Dec 2018 12:15:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1545999323; bh=FQifLs/y9Rfmm4XxEh8U8VirgW4E4OZFMhaKzw7NKeg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bH+UuLyqh7NXR2S/fOII8yHxS/vv2yWzQ+LBRnAVEEOTg8HCHMa9Izqn91Bgy3/bn Z/6AzEWrBle6lX1shxCTdwr+o6/3H4vDxga8UBVRo5ZiFh8fSgQ5lW/5aZqQiX1mad jeUpPzFMQSunAQLDOP9kMvmhVJ3WvnvH+kSBDnGo= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Benjamin Tissoires , Peter Hutterer , Dmitry Torokhov Subject: [PATCH 4.19 44/46] Input: elantech - disable elan-i2c for P52 and P72 Date: Fri, 28 Dec 2018 12:52:38 +0100 Message-Id: <20181228113127.550916114@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20181228113124.971620049@linuxfoundation.org> References: <20181228113124.971620049@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Benjamin Tissoires commit d21ff5d7f8c397261e095393a1a8e199934720bc upstream. 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 Acked-by: Peter Hutterer Signed-off-by: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/input/mouse/elantech.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) --- a/drivers/input/mouse/elantech.c +++ b/drivers/input/mouse/elantech.c @@ -1767,6 +1767,18 @@ static int elantech_smbus = IS_ENABLED(C 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 p 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; }