Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp567663rwb; Wed, 7 Dec 2022 02:08:15 -0800 (PST) X-Google-Smtp-Source: AA0mqf6t1gug5brA3Mo65Y5y0QqICSbZNriYG/tvl3OjBhqNb+lwtDhORWbrSW959XkY7pW+bmmq X-Received: by 2002:a17:902:b707:b0:189:5f3c:fb25 with SMTP id d7-20020a170902b70700b001895f3cfb25mr63236260pls.123.1670407695152; Wed, 07 Dec 2022 02:08:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670407695; cv=none; d=google.com; s=arc-20160816; b=UnpRyIcQF2UyH0NgCGRqzYkVUP9mQgeM6nk6JQJPFMATvg79NmEp/WqIfjWl+lkD0Y 1SsxfPaB2J7WNRoNksIVVFngDOR/z3Nmmed9oANF3fHOzLkz3PIFB9nfwv+vcer6Yq3w +/fQR9RqTlFlX2LeG/ssxF3u9ZfIs6ZDSwmdHTB3rwwivkdFyzgcfdXUpBeK3MPSHvux rY8XCdngm/zBWP+DPjrgxEsAWJ/ZIFO5xa+J2UvQ7LDIP/3U4gzvhA9yBgp0h8nnbSsf C/9V46jWDr0w3ZFD5TuccWTgG7+cv+X8bTK6+k00+DmfjLtSxyjdZIlzTR1lFZaMNaan qpuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=GsGrbThrtxtMJ84GvLOA4rnIxBqoItSrS0phUYvneA0=; b=FaGpMqVZ7uAdPfN8JJadCJLvrQwSwdamssz4RI2wFC6X3nC41mvq6GBBFH8SibqVuT Zn10w7/RU0IdOyFczFgapUHtQ48Bcu3QYX1m3WzBy6ncd9rdGkyE7Equh2xFyxj8HssH Cv3VD+7OGfUSQ4rB9eBqFY89rg6/fkr3uQfosMgDCjzo9owiVt6ttpzfDIOmnWF/lUh1 J9xq8XQhl5bMwf6cDsnprto1ovZIKe3mo8tAnN9CLmFT+I2t42OArNspSvBBRH4PyAdo nciOQpF6Hq/Yfbezj1iaRKT0cjEWUM5BbnnvaSWoXgU1God4ajRra7hSUuoreQiNr9WD FW7g== 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d10-20020a63734a000000b00477b29bb008si19668519pgn.631.2022.12.07.02.08.04; Wed, 07 Dec 2022 02:08:15 -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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230177AbiLGJrb (ORCPT + 76 others); Wed, 7 Dec 2022 04:47:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229718AbiLGJra (ORCPT ); Wed, 7 Dec 2022 04:47:30 -0500 Received: from mail-qv1-f48.google.com (mail-qv1-f48.google.com [209.85.219.48]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB838140F7; Wed, 7 Dec 2022 01:47:29 -0800 (PST) Received: by mail-qv1-f48.google.com with SMTP id c14so12306402qvq.0; Wed, 07 Dec 2022 01:47:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=GsGrbThrtxtMJ84GvLOA4rnIxBqoItSrS0phUYvneA0=; b=JcIeU63c5fRCA5Kx5yZmDbahtGGxyYXbBJoGLrmrAB2Eo08TSgkrvpXfDHxwLqSZxd U4+VcC/BcRq4X29G0ElCnaqgEaPVlmgkE37h+TypiDNXc5oBfoGF545RfCS9OdO2x6zG +P+/y7+rXqtw4sT2g7/Xp6zyAYvcW92XdVJSEM7HpFvLAmwTFVjoBUdiSX1IuctOiX2T kUg/hmpCQnfFrxwhHPhh9bEK/t31yAniP3HH1RGhQgG96cQbMy/IfMQjSu4GGzNq2okR wgm6F2+cCVDknwoZXeLHI3P7HotPpnf+yCRNJK5aWTDaFIIe5UyJk6J8O90rFhNJwkm5 90DQ== X-Gm-Message-State: ANoB5pk5RI6jYmaBoFyQcKPCgSUN0cW1yT7NTUyAUgkKBPSOQqbi2QN6 yD1lYWr0N4dsjvsQOND+H3cX0TPDYv9MZT2H4UA= X-Received: by 2002:ad4:534b:0:b0:4b1:8429:a8a7 with SMTP id v11-20020ad4534b000000b004b18429a8a7mr64626603qvs.52.1670406448847; Wed, 07 Dec 2022 01:47:28 -0800 (PST) MIME-Version: 1.0 References: <2262737.ElGaqSPkdT@kreacher> <5647715.DvuYhMxLoT@kreacher> <2283816.ElGaqSPkdT@kreacher> In-Reply-To: From: "Rafael J. Wysocki" Date: Wed, 7 Dec 2022 10:47:17 +0100 Message-ID: Subject: Re: [PATCH v1 2/2] HID: logitech-hidpp: Add Bluetooth Mouse M336/M337/M535 to unhandled_hidpp_devices[] To: Bastien Nocera Cc: "Rafael J. Wysocki" , Jiri Kosina , =?UTF-8?Q?Filipe_La=C3=ADns?= , Benjamin Tissoires , linux-input@vger.kernel.org, LKML , "Rafael J. Wysocki" , Thorsten Leemhuis Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no 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 On Wed, Dec 7, 2022 at 10:29 AM Bastien Nocera wrote: > > On Wed, 2022-12-07 at 10:12 +0100, Rafael J. Wysocki wrote: > > From: Rafael J. Wysocki > > > > Evidently, Logitech Bluetooth Mouse M336/M337/M535 (0xb016) does not > > work when HID++ is enabled for it, > > This needs the output of the hidpp-list-features tool mentioned earlier > in the thread so we can avoid words like "evidently" and provide > concrete proof. Well, so point me to a binary of this, please. > But why is it needed in this case? Because it doesn't work otherwise. > We purposefully try to avoid blanket > blocklists. The lack of HID++ can be probed, so the device should work > just as it used to (if the fallback code works). No, because the hid-generic driver has no way to check that the probe function of your driver fails for this particular device. The probing of hid-generic will fail so long as the device matches the device ID list of any specific HID driver. With patch [1/2] from this series applied this is unless that specific driver has a ->match() callback rejecting the given device. You'd need a list of drivers that have been tried and failed somewhere for that and AFAICS no such list is present in the code. So a minimum fix for 6.1 that actually works for me is to add the non-working device to the blocklist. More sophisticated stuff can be done later. > We should only list devices that need special handling, and the ones > that don't work once HID++ was probed unsuccessfully. > > > so add it to the list of devices > > that are not handled by logitech-hidpp. > > > > Fixes: 532223c8ac57 ("HID: logitech-hidpp: Enable HID++ for all the > > Logitech Bluetooth devices") > > Signed-off-by: Rafael J. Wysocki > > --- > > drivers/hid/hid-logitech-hidpp.c | 1 + > > 1 file changed, 1 insertion(+) > > > > Index: linux-pm/drivers/hid/hid-logitech-hidpp.c > > =================================================================== > > --- linux-pm.orig/drivers/hid/hid-logitech-hidpp.c > > +++ linux-pm/drivers/hid/hid-logitech-hidpp.c > > @@ -4274,6 +4274,7 @@ static const struct hid_device_id unhand > > { 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) }, > > + { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, 0xb016) }, > > {} > > };