From patchwork Sat Dec 30 15:22:13 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Schmidt X-Patchwork-Id: 10137751 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 86E8060233 for ; Sat, 30 Dec 2017 15:22:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6F281286AE for ; Sat, 30 Dec 2017 15:22:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 618B5287E2; Sat, 30 Dec 2017 15:22:25 +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_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham 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 7A5D0286AE for ; Sat, 30 Dec 2017 15:22:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750960AbdL3PWV (ORCPT ); Sat, 30 Dec 2017 10:22:21 -0500 Received: from karr.yath.de ([144.76.4.50]:47822 "EHLO karr.yath.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750950AbdL3PWV (ORCPT ); Sat, 30 Dec 2017 10:22:21 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=yath.de; s=13083; h=Content-Type:MIME-Version:Message-ID:Subject:Cc:To:From:Date; bh=uiSofL/gtJKAZQGs1IMa7hx5E7JbqqpSRjweFOD2TxQ=; b=KY+oPJFG9w+L4jwMGHYhTN+7S/uk6dBv2+oUyW6Tu/N063aZ+dDWfh5aR4tF5E7UFeUj+h5mj92TKDYIayst1wTUeWXHNWPNLUJOxTKxXK0MaGaPxY27YZiHOl5Qb3wdi5ccEu3ewQDgIAt49mQStc4I1MEdElnU0Jk/KTN1cO4=; Received: from [2001:4c50:11c:8000:d4c5:f65a:9b1d:653e] (helo=marax.lan.yath.de) by karr.yath.de with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1eVIxn-0002oB-4f; Sat, 30 Dec 2017 16:22:19 +0100 Received: from yath by marax.lan.yath.de with local (Exim 4.90_RC4) (envelope-from ) id 1eVIxh-0000aF-R8; Sat, 30 Dec 2017 16:22:13 +0100 Date: Sat, 30 Dec 2017 16:22:13 +0100 From: Sebastian Schmidt To: linux-input@vger.kernel.org, dmitry.torokhov@gmail.com Cc: Greg KH , Aaron Ma Subject: [PATCH] Revert "Input: trackpoint - add new trackpoint firmware ID" Message-ID: <20171230152213.GA2099@marax.lan.yath.de> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.9.2 (2017-12-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 This reverts commit ec667683c532c93fb41e100e5d61a518971060e2, which breaks the Trackpoint on ThinkPad X1 Carbon Gen5 (Model 20HR). That commit intended to add support for later firmware versions to the trackpoint driver, however, the version is reported in the second byte whereas the change was made to the magic byte preceding that version. The update package linked by Lenovo suggests that 20HR models use an ALPS Touchpad instead. Signed-off-by: Sebastian Schmidt Acked-by: Greg KH Cc: stable@vger.kernel.org --- drivers/input/mouse/trackpoint.c | 3 +-- drivers/input/mouse/trackpoint.h | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/input/mouse/trackpoint.c b/drivers/input/mouse/trackpoint.c index 0871010f18d5..20b5b21c1bba 100644 --- a/drivers/input/mouse/trackpoint.c +++ b/drivers/input/mouse/trackpoint.c @@ -265,8 +265,7 @@ static int trackpoint_start_protocol(struct psmouse *psmouse, unsigned char *fir if (ps2_command(&psmouse->ps2dev, param, MAKE_PS2_CMD(0, 2, TP_READ_ID))) return -1; - /* add new TP ID. */ - if (!(param[0] & TP_MAGIC_IDENT)) + if (param[0] != TP_MAGIC_IDENT) return -1; if (firmware_id) diff --git a/drivers/input/mouse/trackpoint.h b/drivers/input/mouse/trackpoint.h index 88055755f82e..5617ed3a7d7a 100644 --- a/drivers/input/mouse/trackpoint.h +++ b/drivers/input/mouse/trackpoint.h @@ -21,9 +21,8 @@ #define TP_COMMAND 0xE2 /* Commands start with this */ #define TP_READ_ID 0xE1 /* Sent for device identification */ -#define TP_MAGIC_IDENT 0x03 /* Sent after a TP_READ_ID followed */ +#define TP_MAGIC_IDENT 0x01 /* Sent after a TP_READ_ID followed */ /* by the firmware ID */ - /* Firmware ID includes 0x1, 0x2, 0x3 */ /*