Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp3254418rwb; Mon, 16 Jan 2023 05:53:43 -0800 (PST) X-Google-Smtp-Source: AMrXdXuxysAp6LZ/0vCmQ9V5zTmpt2AHp208sqEIUq/6PMTDtgfOVIKzVZbDrLUzJyIW0V5ei7YI X-Received: by 2002:a17:907:a709:b0:86e:d375:1f0c with SMTP id vw9-20020a170907a70900b0086ed3751f0cmr7829029ejc.37.1673877223546; Mon, 16 Jan 2023 05:53:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673877223; cv=none; d=google.com; s=arc-20160816; b=EqwIPm+c9JX/BRue01gUc9etYNTdLkfnXGyET+r0/AEX9Y80kYqTv/GYpSlkYX1tj9 Da+Mugx1ABwNeONDu5/lcEE6fbgbxe1h2hNI4y+LdvzY98fbjr0T5RHJCPnFWi95egUf fTNGwdLb/vKJ3fGtcumWc0LbzPq8iBanzwcO+a8elmBhx16zwHEto3c7TkBKkmiSeiH8 hGE9jFJlwy0HPvGuwygEPxEU8lbQfhQD3/lfLY/MxCSjOY9aRHdjenENCwXknoUFoiFt F31l2aBPF9bDthodMwAYyJ7E3S+U1yMhsVN5COO9326yHg7FM+rqEDdEA1fUX2IZqh0s rx8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=Rf60upUem0CBzjtABPD20a78YwiMododlMqnJvWMruE=; b=RHaOTNnDxoUIKmlMpyGc6nzHFBHbj1laph2TWIuQUdmYdkmEy9fy9JvA74N9R/nOFl th7sA/mjlihD9tP0znAuw6liAQpKLyPZzYqThG0kH2n65vBzndgDK3WJrNDjbZejxmlR yjQhD8by/VZ0f19AwQG0nlUzj54rHOUo4hEYQJ+zfTM5CHhVKm3vUG+gkRns4keMZOCZ bdxFp25Yb9fmU1C+7UmYVfm2333r5GIZTt38/KPULScsYxFR2ZRMDoeVM1/LJTx2rIby 8NSlMjl1MUH6VILvUr6Rn2idM7nzRstCHeXc+KppIjtw2xb0TsGCOq+21Qg4B8amTAKg 1Ewg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v4-20020a1709063bc400b0084cd9dba33asi24130652ejf.967.2023.01.16.05.53.31; Mon, 16 Jan 2023 05:53:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230076AbjAPNOh (ORCPT + 51 others); Mon, 16 Jan 2023 08:14:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231639AbjAPNNg (ORCPT ); Mon, 16 Jan 2023 08:13:36 -0500 Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B542D1E5E0; Mon, 16 Jan 2023 05:10:34 -0800 (PST) Received: (Authenticated sender: hadess@hadess.net) by mail.gandi.net (Postfix) with ESMTPSA id 7BB62E0005; Mon, 16 Jan 2023 13:09:38 +0000 (UTC) From: Bastien Nocera To: linux-input@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Jiri Kosina , Benjamin Tissoires , "Peter F . Patel-Schneider" , =?UTF-8?q?Filipe=20La=C3=ADns?= , Nestor Lopez Casado Subject: [PATCH] HID: logitech-hidpp: Hard-code HID++ 1.0 fast scroll support Date: Mon, 16 Jan 2023 14:09:37 +0100 Message-Id: <20230116130937.391441-1-hadess@hadess.net> X-Mailer: git-send-email 2.39.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org HID++ 1.0 devices only export whether Fast Scrolling is enabled, not whether they are capable of it. Reinstate the original quirks for the 3 supported mice so fast scrolling works again on those devices. Fixes: 908d325 ("HID: logitech-hidpp: Detect hi-res scrolling support") Link: https://bugzilla.kernel.org/show_bug.cgi?id=216903 Signed-off-by: Bastien Nocera --- drivers/hid/hid-logitech-hidpp.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c index abf2c95e4d0b..fa026e9107c5 100644 --- a/drivers/hid/hid-logitech-hidpp.c +++ b/drivers/hid/hid-logitech-hidpp.c @@ -77,6 +77,7 @@ MODULE_PARM_DESC(disable_tap_to_click, #define HIDPP_QUIRK_HIDPP_WHEELS BIT(26) #define HIDPP_QUIRK_HIDPP_EXTRA_MOUSE_BTNS BIT(27) #define HIDPP_QUIRK_HIDPP_CONSUMER_VENDOR_KEYS BIT(28) +#define HIDPP_QUIRK_HI_RES_SCROLL_1P0 BIT(29) /* These are just aliases for now */ #define HIDPP_QUIRK_KBD_SCROLL_WHEEL HIDPP_QUIRK_HIDPP_WHEELS @@ -3472,14 +3473,8 @@ static int hidpp_initialize_hires_scroll(struct hidpp_device *hidpp) hid_dbg(hidpp->hid_dev, "Detected HID++ 2.0 hi-res scrolling\n"); } } else { - struct hidpp_report response; - - ret = hidpp_send_rap_command_sync(hidpp, - REPORT_ID_HIDPP_SHORT, - HIDPP_GET_REGISTER, - HIDPP_ENABLE_FAST_SCROLL, - NULL, 0, &response); - if (!ret) { + /* We cannot detect fast scrolling support on HID++ 1.0 devices */ + if (hidpp->quirks & HIDPP_QUIRK_HI_RES_SCROLL_1P0) { hidpp->capabilities |= HIDPP_CAPABILITY_HIDPP10_FAST_SCROLL; hid_dbg(hidpp->hid_dev, "Detected HID++ 1.0 fast scroll\n"); } @@ -4296,9 +4291,15 @@ static const struct hid_device_id hidpp_devices[] = { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_T651), .driver_data = HIDPP_QUIRK_CLASS_WTP }, + { /* Mouse Logitech Anywhere MX */ + LDJ_DEVICE(0x1017), .driver_data = HIDPP_QUIRK_HI_RES_SCROLL_1P0 }, { /* Mouse logitech M560 */ LDJ_DEVICE(0x402d), .driver_data = HIDPP_QUIRK_DELAYED_INIT | HIDPP_QUIRK_CLASS_M560 }, + { /* Mouse Logitech M705 (firmware RQM17) */ + LDJ_DEVICE(0x101b), .driver_data = HIDPP_QUIRK_HI_RES_SCROLL_1P0 }, + { /* Mouse Logitech Performance MX */ + LDJ_DEVICE(0x101a), .driver_data = HIDPP_QUIRK_HI_RES_SCROLL_1P0 }, { /* Keyboard logitech K400 */ LDJ_DEVICE(0x4024), .driver_data = HIDPP_QUIRK_CLASS_K400 }, -- 2.39.0