From patchwork Wed Dec 7 14:24:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Tissoires X-Patchwork-Id: 30881 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp215554wrr; Wed, 7 Dec 2022 06:27:53 -0800 (PST) X-Google-Smtp-Source: AA0mqf4rvYbPHIyb1Z6sKoGwN3oncyaxuKLAM7Hc6YqunwieZlM2XLjrlbBe6gEF2iBz4+C09Oj6 X-Received: by 2002:a05:6402:d74:b0:46d:1a33:2197 with SMTP id ec52-20020a0564020d7400b0046d1a332197mr6178476edb.282.1670423273437; Wed, 07 Dec 2022 06:27:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670423273; cv=none; d=google.com; s=arc-20160816; b=d/571v+Rl5cbFltXR0GqXF4nKDXcQzMc1h1Tto6q/5+hOB0ykKMEjuixrGdL9m87ck neERSrD3PvBYJG6CwN15cTiwTFcKSIfkonLzwdnjZFg4F9pvOcYTa9H6taHc661V9Jlt /Ph/U4TwZIkn6pm+wH80DExULkCxtogTDWEn0iLPQvT6EAWauQtCI6BaWtnzHwtwhIWC 5oPn8o+WHubpQvHmoIfafvIngYTJGod9GuGOJ+qFBfVON1BS0xjZZF53gva5VSg/bQvr YIM/DFuRrRkMkb6qhQsT8UVATaKtNhdDFAZkLX4innktNqtj3Nsc3O4Uy91pIvpYLeDe J1iw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=9NVnDQLtbjn77YDKLnB8ntVnNNT30a6KgFCsUYPTGIE=; b=oyq+2MzdMhVSXsPUZ+QrWhoDzXksV8FBM4rzC0BR4BcqIngv2v2rmr2aGOTULMpULc tVYz/N13N0jnxteYx4IBbgqR+RA7gISYdgKmqXAThW5RRSqPa4zblJkIgU2Jb0fn+4c0 0OzF+wXK9WadYkpBHGkiAnVaIpvHsYxFVSp/TJOVIzW4WIsK0MtgD0mIGQ4fP+Utxctb 573xBQTxESM54FZkdFDjfp4Ml2hShMpgVvKZlJIfsLG7qYjXTsTfsVjDiYpPh0UwS6gO kgdHErw8Sc8o0Si/tccV6VOOMPwxZRy52BmyeROz+i3a1sj7Xz/gIjJ+1sxvVaz+sIUC 655Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fJSsYcnH; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gt15-20020a1709072d8f00b007bad1338dd3si18599630ejc.851.2022.12.07.06.27.29; Wed, 07 Dec 2022 06:27:53 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fJSsYcnH; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230155AbiLGO0B (ORCPT + 99 others); Wed, 7 Dec 2022 09:26:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229836AbiLGOZl (ORCPT ); Wed, 7 Dec 2022 09:25:41 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6CECD1147F for ; Wed, 7 Dec 2022 06:24:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670423083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9NVnDQLtbjn77YDKLnB8ntVnNNT30a6KgFCsUYPTGIE=; b=fJSsYcnHqCqYAdlfUbFNDgqxgSTyDDNisUfxOir31Gzl2SMeBWDwFnyKBTGL8BGI1F7pWl H9edR9BNCt4YmYvB7xt/F259hVPxQ1S0bhr6oUMa3DmSUGKjef8Q/WrEAX30+yBM+L7sBN kZf2bZT9uItqIPpww/BpWND68BpfVDI= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-495-oEbsQfYbN1WcYW-T-XkgdQ-1; Wed, 07 Dec 2022 09:24:42 -0500 X-MC-Unique: oEbsQfYbN1WcYW-T-XkgdQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id EFEB83C10EC8; Wed, 7 Dec 2022 14:24:41 +0000 (UTC) Received: from plouf.redhat.com (unknown [10.39.193.117]) by smtp.corp.redhat.com (Postfix) with ESMTP id A29F22027061; Wed, 7 Dec 2022 14:24:40 +0000 (UTC) From: Benjamin Tissoires To: Jiri Kosina , =?utf-8?q?Filipe_La=C3=ADns?= , "Rafael J . Wysocki" , Bastien Nocera , Thorsten Leemhuis Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Benjamin Tissoires Subject: [PATCH v1 2/2] Revert "HID: logitech-hidpp: Enable HID++ for all the Logitech Bluetooth devices" Date: Wed, 7 Dec 2022 15:24:33 +0100 Message-Id: <20221207142433.1158329-3-benjamin.tissoires@redhat.com> In-Reply-To: <20221207142433.1158329-1-benjamin.tissoires@redhat.com> References: <20221207142433.1158329-1-benjamin.tissoires@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751565754004879456?= X-GMAIL-MSGID: =?utf-8?q?1751565754004879456?= This reverts commit 532223c8ac57605a10e46dc0ab23dcf01c9acb43. As reported in [0], hid-logitech-hidpp now binds on all bluetooth mice, but there are corner cases where hid-logitech-hidpp just gives up on the mouse. This leads the end user with a dead mouse. Given that we are at -rc8, we are definitively too late to find a proper fix. We already identified 2 issues less than 24 hours after the bug report. One in that ->match() was never designed to be used anywhere else than in hid-generic, and the other that hid-logitech-hidpp has corner cases where it gives up on devices it is not supposed to. So we have no choice but postpone this patch to the next kernel release. [0] https://lore.kernel.org/linux-input/CAJZ5v0g-_o4AqMgNwihCb0jrwrcJZfRrX=jv8aH54WNKO7QB8A@mail.gmail.com/ Signed-off-by: Benjamin Tissoires --- drivers/hid/hid-logitech-hidpp.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c index f11890f65c06..c6e4a96e882e 100644 --- a/drivers/hid/hid-logitech-hidpp.c +++ b/drivers/hid/hid-logitech-hidpp.c @@ -4269,21 +4269,6 @@ static void hidpp_remove(struct hid_device *hdev) mutex_destroy(&hidpp->send_mutex); } -static const struct hid_device_id unhandled_hidpp_devices[] = { - /* Logitech Harmony Adapter for PS3, handled in hid-sony */ - { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_HARMONY_PS3) }, - /* Handled in hid-generic */ - { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_DINOVO_EDGE_KBD) }, - {} -}; - -static bool hidpp_match(struct hid_device *hdev, - bool ignore_special_driver) -{ - /* Refuse to handle devices handled by other HID drivers */ - return !hid_match_id(hdev, unhandled_hidpp_devices); -} - #define LDJ_DEVICE(product) \ HID_DEVICE(BUS_USB, HID_GROUP_LOGITECH_DJ_DEVICE, \ USB_VENDOR_ID_LOGITECH, (product)) @@ -4376,9 +4361,6 @@ static const struct hid_device_id hidpp_devices[] = { { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, 0xb01e) }, { /* MX Master 3 mouse over Bluetooth */ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, 0xb023) }, - - { /* And try to enable HID++ for all the Logitech Bluetooth devices */ - HID_DEVICE(BUS_BLUETOOTH, HID_GROUP_ANY, USB_VENDOR_ID_LOGITECH, HID_ANY_ID) }, {} }; @@ -4392,7 +4374,6 @@ static const struct hid_usage_id hidpp_usages[] = { static struct hid_driver hidpp_driver = { .name = "logitech-hidpp-device", .id_table = hidpp_devices, - .match = hidpp_match, .report_fixup = hidpp_report_fixup, .probe = hidpp_probe, .remove = hidpp_remove,