Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp3053962imm; Sun, 1 Jul 2018 11:09:48 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdvPn8Nnr3qBWIJSN6yXyyF1JhRGprz7BXsWTDyRsA7v4Fj372F5mV68NuYg+4CNZn0Xl+J X-Received: by 2002:a63:b047:: with SMTP id z7-v6mr18956779pgo.335.1530468588283; Sun, 01 Jul 2018 11:09:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530468588; cv=none; d=google.com; s=arc-20160816; b=0YCN6TWG9p1Q4o/SIJoIDmtASzyWGnIb2US2l+iJtbBqgGw5ioJNyzw0JyM2V+eMgj ccA4srqBub8Am19rP9vsV+y1QUUbWe9aqv2cxqdCd+QhHhK9rYum4iePKZPaMx/f4eFB G+A14Of7+UJD82QOmS3roufjOM+nPWRxpJT8UPnw7K/NUcmRJxSX9sk/RzdWJnR7K90q IPvx0HNHKo/SEKfj5NvCU4En4JmWjtSwWdZPm6OPpKrGCdVBcTKrUjeWZ28e9H0bkzfH Tvc8HLzqhM6WaOneVgXJUo9z9eiIWJTRHRIiiTIBLXL+1cAcXRd+as9WHOH3Qde9DNQN 0LQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=fRjyQmdXs0gFr+0vmA/zHNRbh4P0gZi4/IDQGlUUFPU=; b=c9SpS992akQzddsqsqT0E8DFY7Kbouo1n036++GoswxOY4npl9qEPWcYptWa8iQUBt JDZ5ca3wwBjEcfvyUyHPJ7BxDuZz9lUs8DJB/E0OrlFzB+d8L9U9X+8lSSAzpz8nM+GG D09fBOYEmwKcRb86MWSrzsiwrlrG2b56hPYeo2OYcglaWxKdNFW0qh7it+ZhVf7d81/O 5p7QC1ATenax/oGlNd55saUxAX/lJVCffPn3IO40gp+Aqr9yNoKSChcIgy0PiOAzPkIX F8Il+BGI1f4+iF4mkE4ukGm06ZZHp5Nka6pNV2hccNTAZzPCPZyjSyAuputU4Aew7wYH 2FJw== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h2-v6si9315048pfg.126.2018.07.01.11.09.34; Sun, 01 Jul 2018 11:09:48 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934036AbeGASHv (ORCPT + 99 others); Sun, 1 Jul 2018 14:07:51 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:34360 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965702AbeGAQ2j (ORCPT ); Sun, 1 Jul 2018 12:28:39 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 984E992B; Sun, 1 Jul 2018 16:28:38 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, KT Liao , Dmitry Torokhov Subject: [PATCH 4.9 096/101] Input: elantech - fix V4 report decoding for module with middle key Date: Sun, 1 Jul 2018 18:22:22 +0200 Message-Id: <20180701160800.997786658@linuxfoundation.org> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180701160757.138608453@linuxfoundation.org> References: <20180701160757.138608453@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: ??? commit e0ae2519ca004a628fa55aeef969c37edce522d3 upstream. Some touchpad has middle key and it will be indicated in bit 2 of packet[0]. We need to fix V4 formation's byte mask to prevent error decoding. Signed-off-by: KT Liao Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/input/mouse/elantech.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/input/mouse/elantech.c +++ b/drivers/input/mouse/elantech.c @@ -800,7 +800,7 @@ static int elantech_packet_check_v4(stru else if (ic_version == 7 && etd->samples[1] == 0x2A) sanity_check = ((packet[3] & 0x1c) == 0x10); else - sanity_check = ((packet[0] & 0x0c) == 0x04 && + sanity_check = ((packet[0] & 0x08) == 0x00 && (packet[3] & 0x1c) == 0x10); if (!sanity_check)