Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3336059imu; Sun, 11 Nov 2018 12:39:04 -0800 (PST) X-Google-Smtp-Source: AJdET5e+MRgiGy8taPtQ4uKI3ypRdSWB0zj4cp90Qq5VkZ6XI7FBaby96hkL5+C1kDIFKQ8dRZ39 X-Received: by 2002:a17:902:7402:: with SMTP id g2mr1828381pll.198.1541968744045; Sun, 11 Nov 2018 12:39:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541968744; cv=none; d=google.com; s=arc-20160816; b=MsOXNitIxJrpom8VS+m082jcX9DqtpXuTkPB54NqQxNuHM6KWYIJRmwvTMqmwsIoVw 0Bs0+4KADhhZ3NrRGu2J7MjOfvSwEedF8h/HR5nv80tphayLHRI0VqcgkrJGeE3qD4nU WYHqxJspXZgzVdfiv4icWDhtPYlaOb+BnLxgfLSCKqTR7PVVX2qJZRu0iqwWU5haj/YD jhRhxcOWf9JsL0zWnFvJThSyZX3SiqX3AarLT3+OKzvppRF3jdeJumzD/3wEkqxdoNJT dnP4YGkCJzSZjBkGOIvHTWaAovZx2F/JTQL8tWVxBkfrSOWutMhptTkYyPZX3Rmw+JIu 56EA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=33iSVM8UEwjN/ZspEbCJm04aT5MM/v3UCTaLtEgXqCQ=; b=rryPAiEg76Hf9tz2RrjLWb9INcLow/6KExv3Opq1uzOBEIhNyQNk3FQCVMrOhIm3FW sYx0eKTFWdb7hdRNWXuEr2A8GZP2wGcwSPMCQKIEcCf1N8xZhhK07ZQZID0s3KB+gGv0 BMiAOLLumaTUzIRdroZEZ+yCcgi1ANHTAQhrHW5+4HVWEt/fuVBFaNid7bjVoM4B6loW Kc7cP8TKr5VuQLDvjm5/ltHUdn8Q2m7uShSp14cWnpdQkeMW/rp7h7fbcAczxchmF6dE 0VNfyfHJn4e98KDcLw+dL9WlwPdGAc5LQObuBx5x9yOKWfrLVHIplWllWVHYum2yaqzm MVzA== 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 z33-v6si10740349plb.91.2018.11.11.12.38.48; Sun, 11 Nov 2018 12:39:04 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730465AbeKLG0l (ORCPT + 99 others); Mon, 12 Nov 2018 01:26:41 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:49752 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730073AbeKLFsK (ORCPT ); Mon, 12 Nov 2018 00:48:10 -0500 Received: from [192.168.4.242] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gLvsW-0000l5-26; Sun, 11 Nov 2018 19:58:40 +0000 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1gLvsT-0001bw-Fe; Sun, 11 Nov 2018 19:58:37 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Dmitry Torokhov" , "???" Date: Sun, 11 Nov 2018 19:49:05 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 178/366] Input: elantech - fix V4 report decoding for module with middle key In-Reply-To: X-SA-Exim-Connect-IP: 192.168.4.242 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.61-rc1 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 Signed-off-by: Dmitry Torokhov Signed-off-by: Ben Hutchings --- 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 @@ -737,7 +737,7 @@ static int elantech_packet_check_v4(stru if (etd->crc_enabled) sanity_check = ((packet[3] & 0x08) == 0x00); else - sanity_check = ((packet[0] & 0x0c) == 0x04 && + sanity_check = ((packet[0] & 0x08) == 0x00 && (packet[3] & 0x1c) == 0x10); if (!sanity_check)