Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp4645941rdb; Tue, 12 Dec 2023 05:46:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IHiysfsFuG5jBoE+/Wpyb0zsTkNtIon39LdST5uZe6pZcIQZ4VVkEWk3hjnqFf+F5/oFng2 X-Received: by 2002:a17:90a:f0d6:b0:28a:52e6:2f8 with SMTP id fa22-20020a17090af0d600b0028a52e602f8mr1942107pjb.19.1702388780209; Tue, 12 Dec 2023 05:46:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702388780; cv=none; d=google.com; s=arc-20160816; b=grLAeErfcWqTMO9/KktSSUBtSiDSbq9K8+XjTQ5YDYhB40eKrCFvfen/Yr7PYnArD4 2AFBG5dNpZaKXdVWzJQk5y+FpVZ00YS+sbYIvSvS3lW03CtERNpcOKarPfzrO2yK/0W/ bUg46/fgx46Udq2Box1Kl9WMccKdFdcT1ZX7pFsJlfSvGrG/M7L7f3IdOhT9gF80Y5s9 OlZAFoMw+QBLvRXqy6r3VYnlIDUrqjO5jrdjfLEe8qKvrbcaN5JSh0QItykAgJyNPSJL +O30CMZOzqDJr59T0EcaAPyYbZ+gVwBRC2D/t0LX55Iogre7wx4INHbR96qWySFSbrZy RIkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:date:from:dkim-signature; bh=CR6YV6JXDxeQ/rjFiHQEN+mV93eZyCa8/ozpNXx5zdY=; fh=k/GJdIvvLNXKfQJWNq+NoMPE7bF2K5jQvMWi1PwqbzU=; b=PPXY4b/TKoSfojuDFj9KiaxyCcrJTLTY7BnMVd/A+WxF68LiwSD6HFfmajarBaRAKD N8aZAprxeQ1ftYISz/xWk6ZeNOcY4m4UuWw723cpSI3JBJP4q/IbbN4GrRDkk+A6qANB VD9u0LQGFzcLUGt08jLiFeW0c1moI9BgDk3WIALrLc9GCtGbpmCtswAapC0hPdjUCyCS cOr8Q4qPmEAgbqhjgxLx6WaHiVo/DIkQ+44vrMdR86qIGQ+GQbWmuWN1Bjxt0iCE/ZEM QrS6+QLJGHquXwesCtyiOJgTB9UlGXYsuzsPgXnWBaiL57musHXeJ2sEbrpofmlx9in/ l6hQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.com header.s=google header.b=Ixahxs+d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id gt9-20020a17090af2c900b00286bf822f9bsi8000417pjb.179.2023.12.12.05.46.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 05:46:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=google header.b=Ixahxs+d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 73D33809A99A; Tue, 12 Dec 2023 05:46:17 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346673AbjLLNqB (ORCPT + 99 others); Tue, 12 Dec 2023 08:46:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346679AbjLLNpz (ORCPT ); Tue, 12 Dec 2023 08:45:55 -0500 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80CA8E8 for ; Tue, 12 Dec 2023 05:46:00 -0800 (PST) Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-a1db99cd1b2so706558066b.2 for ; Tue, 12 Dec 2023 05:46:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1702388759; x=1702993559; darn=vger.kernel.org; h=mime-version:user-agent:references:message-id:in-reply-to:subject :cc:to:date:from:from:to:cc:subject:date:message-id:reply-to; bh=CR6YV6JXDxeQ/rjFiHQEN+mV93eZyCa8/ozpNXx5zdY=; b=Ixahxs+dTdQgT7cfaPrk8AB/dgQtuFqnWGJ/zVC7UhP1Pjdzk3mJOAuZqPw0pKGFtt FGC+KkChacxpn5dYWEghV16lm0Yy0mGQb4op8gr82awrlc+m08QUkesQJnNuQG3HHxYX grTmUrEWnr+MiAksFlTF+FcQrnRTxQRYhFacNQAOklxQxTG5/z5V/LCroM7uJf7JJ1o2 ANM186mP0CflfZqtipRTaR/gE/HvYuTbKZru90zDCTOekaNVylf+tOpkD++MKPPMXp80 1hJdzBm21adU01oIoFvKJsfE/dVbytKFCMcPlc4DGXk/BoGfvM8xpNM3ypoyABIfv/Vf egng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702388759; x=1702993559; h=mime-version:user-agent:references:message-id:in-reply-to:subject :cc:to:date:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=CR6YV6JXDxeQ/rjFiHQEN+mV93eZyCa8/ozpNXx5zdY=; b=IK6umH64Zu2fRhsJbD5XX61oQsMXhlFBhN+ulF8v0hLgHS9ftISfpN72MKBVNTkp7W kmbPD1HKrF/+ZefA+6qBEUyaMt7qjqAEHP/1r+M4wQQ2aft87i9G4YKlhfrPOPLqc19x 8APTfzLaGppCby6zpyoGTMuA3ol7RcpD33RRlbm3whSmkcid5bHGitB9ZdPzkqfUg2Sk jqkipa/7fNkcrA34zynZqnHCYSqpgX6BMSMrmTTF4CU4vOZhyNOqNGqzASdmJEWDHa5V XvPTW85kDW47aGvLGu6vkR49bbRPr/h5KzaAMejlB8Jnl6R6DkV+vBAeZrKA/rRj6ZGG dOdg== X-Gm-Message-State: AOJu0YyA2qwKkIjCd4GKCLlFxeVO7M1DlZ1DEryhEerbP+nMMbFK+DHi H2mXOeojvjCJ3YlUa0Lh/8+eFDLn07cxDssLKok= X-Received: by 2002:a17:907:e86:b0:a19:9b79:8b49 with SMTP id ho6-20020a1709070e8600b00a199b798b49mr2555735ejc.90.1702388758799; Tue, 12 Dec 2023 05:45:58 -0800 (PST) Received: from localhost ([193.86.92.180]) by smtp.gmail.com with ESMTPSA id tj10-20020a170907c24a00b00a1db7b77675sm6381621ejc.90.2023.12.12.05.45.57 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Dec 2023 05:45:57 -0800 (PST) From: Jiri Kosina X-Google-Original-From: Jiri Kosina Date: Tue, 12 Dec 2023 14:45:58 +0100 (CET) To: Mikhail Khvainitski cc: benjamin.tissoires@redhat.com, iam@valdikss.org.ru, jekhor@gmail.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] HID: lenovo: Restrict detection of patched firmware only to USB cptkbd In-Reply-To: <20231212133148.1000761-1-me@khvoinitsky.org> Message-ID: References: <20231212133148.1000761-1-me@khvoinitsky.org> User-Agent: Alpine 2.21 (LSU 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Tue, 12 Dec 2023 05:46:17 -0800 (PST) On Tue, 12 Dec 2023, Mikhail Khvainitski wrote: > Commit 46a0a2c96f0f ("HID: lenovo: Detect quirk-free fw on cptkbd and > stop applying workaround") introduced a regression for ThinkPad > TrackPoint Keyboard II which has similar quirks to cptkbd (so it uses > the same workarounds) but slightly different so that there are > false-positives during detecting well-behaving firmware. This commit > restricts detecting well-behaving firmware to the only model which > known to have one and have stable enough quirks to not cause > false-positives. > > Fixes: 46a0a2c96f0f ("HID: lenovo: Detect quirk-free fw on cptkbd and stop applying workaround") > Link: https://lore.kernel.org/linux-input/ZXRiiPsBKNasioqH@jekhomev/ > Link: https://bbs.archlinux.org/viewtopic.php?pid=2135468#p2135468 > Signed-off-by: Mikhail Khvainitski > Tested-by: Yauhen Kharuzhy > --- > drivers/hid/hid-lenovo.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/hid/hid-lenovo.c b/drivers/hid/hid-lenovo.c > index 7c1b33be9d13..149a3c74346b 100644 > --- a/drivers/hid/hid-lenovo.c > +++ b/drivers/hid/hid-lenovo.c > @@ -692,7 +692,8 @@ static int lenovo_event_cptkbd(struct hid_device *hdev, > * so set middlebutton_state to 3 > * to never apply workaround anymore > */ > - if (cptkbd_data->middlebutton_state == 1 && > + if (hdev->product == USB_DEVICE_ID_LENOVO_CUSBKBD && > + cptkbd_data->middlebutton_state == 1 && > usage->type == EV_REL && > (usage->code == REL_X || usage->code == REL_Y)) { > cptkbd_data->middlebutton_state = 3; Applied, thanks. -- Jiri Kosina SUSE Labs