Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp1528731rdb; Sat, 23 Dec 2023 10:04:52 -0800 (PST) X-Google-Smtp-Source: AGHT+IHfyqneOa6bOhkE92EgDGMX+stV2WZGNM11dDTqYK60ZuC1YZ5UgYswNvl6JV7SDhF+a3ee X-Received: by 2002:aa7:8d07:0:b0:6d0:8b0f:1091 with SMTP id j7-20020aa78d07000000b006d08b0f1091mr3033342pfe.30.1703354692515; Sat, 23 Dec 2023 10:04:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703354692; cv=none; d=google.com; s=arc-20160816; b=WSHtw+rpMFQ7dB0aGMDd/E9XQ3mOKWiw7QhqSH6AOMNg7Xj9dhgIyb7u0Jq73FsC9f ScfX6wblPB1OT5NKpoYXPl4GOAmK3s/7SDYNCWJiTUZQbmThDlw/2x1SKOFv/5RPIW7l +FUKMl5SaYgS1b96IOG3Q9Y2Dr5tz+KQdDGiduACyQf7b8fL+4FSei5bBrrKDzwRnskM 4p4wJxSSdIDHWfT8RFApZsNghBWNsAFPg5fCLeKQboe0DzjZkK34ihZJJfZUfnmQf3Jw m0UBo53CLiwytg/PRIotsHQmPRXLKufj86DzGsVYYkWW5IP8R1E6/+2JAJqwmYSCICNd 12RA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :dkim-signature; bh=clZIOd3V3Ycgt96OLxSdyCojGLmOX01/RV/V1oCF3ME=; fh=I8UiX5D1+TNYLslhClw/cnmoOiBa1aFDjg03AaJWf8c=; b=LLZe3qa9f0z/zSx/QhjI5CkBPpCkfW6juMN7igj4wcyWYwgYzf31QaT43mEXfBFtP9 u1+bE5CHMmKvvzD81zuMO/Tnk3GsIKsOd88drTrYE8SiZVYZoAiT6ESE4Uns/VVYNfDF v9f4IQiS7EyFzVOQoJ+TPVlC1s/47nmS/akg/VQWWuzSApsZSpiiwN4KpzQNDBRWGGOv OfNiF5+cKmXkTp2gAIEWRhuncfkPNLcvjt16083Zb7txe9hTIYJzuRhhIOZTCWg5e3Lh bfdo3eivk3sewofdlcV3ikRwBNbVP+ojYT2WQGeegGCkndboH+uwcduCpQtPX1VjRgJA wNNA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@khvoinitsky.org header.s=key1 header.b=BjGFN+t+; spf=pass (google.com: domain of linux-kernel+bounces-10519-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10519-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=khvoinitsky.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id b16-20020aa78ed0000000b006d93395deddsi5111252pfr.190.2023.12.23.10.04.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 23 Dec 2023 10:04:52 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-10519-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@khvoinitsky.org header.s=key1 header.b=BjGFN+t+; spf=pass (google.com: domain of linux-kernel+bounces-10519-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-10519-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=khvoinitsky.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 27F20282FA2 for ; Sat, 23 Dec 2023 18:04:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 0AC3612E5D; Sat, 23 Dec 2023 18:04:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=khvoinitsky.org header.i=@khvoinitsky.org header.b="BjGFN+t+" X-Original-To: linux-kernel@vger.kernel.org Received: from out-186.mta0.migadu.com (out-186.mta0.migadu.com [91.218.175.186]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E793712E56 for ; Sat, 23 Dec 2023 18:04:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=khvoinitsky.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=khvoinitsky.org X-Gm-Message-State: AOJu0Yyg+j9071jyseCb+7HOu08V/ste7PwuNUP/yjhjEe9xAxWUH9s4 K2+7kjjqGYXGWk3z30mbNjcTSLqSP9qp8jO5imw= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=khvoinitsky.org; s=key1; t=1703354679; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=clZIOd3V3Ycgt96OLxSdyCojGLmOX01/RV/V1oCF3ME=; b=BjGFN+t+F40aRuhstFBxIkli4GbVz5sQiuhuaGZy98F/BRw+pXsW3az/ZcLoXaoBZLgQQ0 mlJWu8wTUiFy9urWx7rJrQbY/83ley+SsiwfKBOZKsTNbDR744qK9Jl+ONB/1LvD/9eS/B PhYhL+Hz8hSYjH60ez6gM1yP/HYFaxs= X-Received: by 2002:a05:6512:b86:b0:50e:6fda:818 with SMTP id b6-20020a0565120b8600b0050e6fda0818mr2135494lfv.3.1703354677681; Sat, 23 Dec 2023 10:04:37 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <3a29c0a6-9b53-433d-a83d-5b68a87c1155@mailbox.org> In-Reply-To: <3a29c0a6-9b53-433d-a83d-5b68a87c1155@mailbox.org> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Mikhail Khvoinitsky Date: Sat, 23 Dec 2023 20:04:26 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] HID: lenovo: Restrict detection of patched firmware only to USB cptkbd To: "Uli v. d. Ohe" Cc: jkosina@suse.com, benjamin.tissoires@redhat.com, iam@valdikss.org.ru, jekhor@gmail.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Migadu-Flow: FLOW_OUT Hello. Thank you for the report, sorry about that. I've received one more report of the same issue by email. So this means that the only reliable way is to add a sysfs parameter. I'll send a patch. On Fri, 22 Dec 2023 at 17:32, Uli v. d. Ohe wrote: > > I get buggy middle button scrolling behavior on my USB Compact Keyboard > (i.e., "1st gen") with original, unmodified firmware and the patch (of > Sep. 23). > > Sometimes the keyboard sends REL_X events while the middle button is > pressed. Thus the old "workaround" is disabled and middle button > scrolling henceforth exhibits the known buggy behavior. > > Explicitly, I can confirm that the following values occur, leading to > erroneous disabling of the workaround: > > cptkbd_data->middlebutton_state == 1 > usage->type == 2 [i.e., EV_REL] > usage->code == 0 [i.e., REL_X] > > The keyboard is identified by lsusb as: > ID 17ef:6047 Lenovo ThinkPad Compact Keyboard with TrackPoint > > This was tested with kernel 6.1.67 which contains the backported patch > (commit 6e2076cad8873cc2a9f96e4becab35425c3656dc). > > I didn't test the latest patch of Dec. 12. However, I don't expect it to > fix my issue as the only added condition > hdev->product == USB_DEVICE_ID_LENOVO_CUSBKBD > should be satisfied, which I understand is also the intention. > (USB_DEVICE_ID_LENOVO_CUSBKBD == 0x6047, which is the device ID of my > keyboard as reported by lsusb.) > > Best regards, > Uli