Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1006167rwb; Thu, 8 Dec 2022 05:49:15 -0800 (PST) X-Google-Smtp-Source: AA0mqf7AIfAMC6bfMnliteYHeBOqzAGFCHuI4W/SHCUopjQPobA+yMzqF+2kTEzRlkk1EkSvPXAK X-Received: by 2002:a17:90a:e691:b0:21a:1290:952d with SMTP id s17-20020a17090ae69100b0021a1290952dmr6888125pjy.38.1670507354919; Thu, 08 Dec 2022 05:49:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670507354; cv=none; d=google.com; s=arc-20160816; b=DQoDmI/QE3OtViZEZdNeFXlVEx8HdQAC3duJqMHgY3bDN56IJ8limYKC+RfVxtYkVn q6Peo/8kipd4b3/LMI+PvOxDmFIP8b6tWkPQdwljJdu+fy1j+BXnZpcfBDzIZNsxi/Ys Nw7/ZbM3yaRHTDCK/3QSUBgwy2cseBLr1ynLZNBzxwWlfC0FSH7FvJXGYPKjjumiOzVK J6pVXHl9rGML4Q+5ok9497QY6d31XfKF+Cuexi3S+GU/7bX+oi2LwcCwN5k0I5YZv3Si Y0ETIlSwDvI21pvx+6ncQGglotMe4XZDj9V6xCB6rRzg9dkCvRfqh+NHBfuxwRUULYlo 0uOA== 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:dkim-signature; bh=r2Y2q8xXkweyHb7q+LdaF3QQfL2xTZoL/8BGcjmlxh0=; b=XMFfM4Ae5Ekn3UKtOuYNE2ki6ouQPVol5fst46t+WAcsUQe8pT8bsxFzG8kHP/2QLS NKR6Ikr3Rb0rq5urCAjeiQpQqfzHPoUPBAH74ZLbdcXhhbOtDzALg4PazF3cyZPgfUTk RsjruigqU0mN3oPyylKWb/yIXBFzRxjC3czIixowPuNdbCjKmnXEAzkZ4VVH/iifZmUp mZ/S7CvKIY0xU7aN/qErZK3GpZouVRNQLSbhAwgNTK4mynLwlirgtCpDV4C5d+FvEwC7 MJERMArDJvauzcqRmNGpYB62km2vHVLPE6QhvMcQRMrwi4ooy24qfRIPPVwpEFWNnrwc TAsg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=J97WSX3v; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t9-20020a17090340c900b00188bee6e9f2si23607460pld.239.2022.12.08.05.49.05; Thu, 08 Dec 2022 05:49:14 -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=J97WSX3v; 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 S229694AbiLHNd3 (ORCPT + 72 others); Thu, 8 Dec 2022 08:33:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229845AbiLHNd1 (ORCPT ); Thu, 8 Dec 2022 08:33:27 -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 DA34588B57 for ; Thu, 8 Dec 2022 05:32:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1670506348; 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=r2Y2q8xXkweyHb7q+LdaF3QQfL2xTZoL/8BGcjmlxh0=; b=J97WSX3v3WSOLRKu2RMUOtr0bGSrLyazoRhquClf405eYV7I7Udpap040JiWtkCJyTh05k t6syP4m0dC1cq1Yq2aPxFgyKYLgrBtpBD8z0L2E9E0lna1/GmyXPQWo225pXJVn2OVMgaj bAUQ8kt85btXwDFdW+pGyyfiPvs5I5w= Received: from mail-il1-f197.google.com (mail-il1-f197.google.com [209.85.166.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-447-jF1BhhrTN4649YEczzUO7g-1; Thu, 08 Dec 2022 08:32:26 -0500 X-MC-Unique: jF1BhhrTN4649YEczzUO7g-1 Received: by mail-il1-f197.google.com with SMTP id e9-20020a056e020b2900b003036757d5caso1114736ilu.10 for ; Thu, 08 Dec 2022 05:32:26 -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=r2Y2q8xXkweyHb7q+LdaF3QQfL2xTZoL/8BGcjmlxh0=; b=lAYLFx9NsprluPTqbaFGcIOtjx391UxQmQ0uF9hwXCg6HMDlsWRi3CSIm461eu9544 OIqRtmWfhdUBosnkQcUhtdkKgVwshAuRgfsYAuyoo9Alg0FGT2IJJtPr7Uc3SaJiR6yb R4qcwlMphSw3bmSiIfzghz3NvMQFZXe/R2Wv4SnOkL5GOkJrH3nbP+F5dlF//gdy7V9e rPq13wJKU7QW47Bl5sj6GieVY2sysUY0nNwXozsro7Utg0HNOlt6SMXOOOpyGePRDk8A UmoRKvw4BwRxYnNr1bU0g4TBcghZ4BLQF5CqPfLVqcki1UvT7hmNU7pVvbYpMZsoBgLa zyyg== X-Gm-Message-State: ANoB5pnOfdozrsdT1ZMicezMvskrqSLim15fAQ25oEz9k9sWHYle1RiF rp4Ox9ps7kqqajUpgEQtSnuPiBKXNU5bv5l6ny8vteJzROs2W8j/AnmgVK/UCpo7RS6Cq5wG7Ea xYIfRjRueqOlv5cg9qkHddT1admILroD6jNPewEto X-Received: by 2002:a05:6602:418b:b0:6dd:813a:bfaa with SMTP id bx11-20020a056602418b00b006dd813abfaamr34563939iob.146.1670506346282; Thu, 08 Dec 2022 05:32:26 -0800 (PST) X-Received: by 2002:a05:6602:418b:b0:6dd:813a:bfaa with SMTP id bx11-20020a056602418b00b006dd813abfaamr34563933iob.146.1670506345920; Thu, 08 Dec 2022 05:32:25 -0800 (PST) MIME-Version: 1.0 References: <2262737.ElGaqSPkdT@kreacher> <5647715.DvuYhMxLoT@kreacher> <2283816.ElGaqSPkdT@kreacher> <8c28a60ede7b568352141d2aae2952d2923234a7.camel@hadess.net> In-Reply-To: <8c28a60ede7b568352141d2aae2952d2923234a7.camel@hadess.net> From: Benjamin Tissoires Date: Thu, 8 Dec 2022 14:32:14 +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: Jiri Kosina , "Rafael J. Wysocki" , "Rafael J. Wysocki" , =?UTF-8?Q?Filipe_La=C3=ADns?= , linux-input@vger.kernel.org, LKML , Thorsten Leemhuis Content-Type: text/plain; charset="UTF-8" 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 On Wed, Dec 7, 2022 at 3:24 PM Bastien Nocera wrote: > > On Wed, 2022-12-07 at 13:43 +0100, Bastien Nocera wrote: > > On Wed, 2022-12-07 at 11:19 +0100, Jiri Kosina wrote: > > > On Wed, 7 Dec 2022, Benjamin Tissoires wrote: > > > > > > > Agree, but OTOH, Rafael, your mouse is not brand new AFAICT, so I > > > > am > > > > worried that you won't be the only one complaining we just killed > > > > their > > > > mouse. So I think the even wiser solution would be to delay (and > > > > so > > > > revert in 6.1 or 6.2) the 2 patches that enable hid++ on all > > > > logitech > > > > mice (8544c812e43ab7bdf40458411b83987b8cba924d and > > > > 532223c8ac57605a10e46dc0ab23dcf01c9acb43). > > > > > > If we were not at -rc8 timeframe, I'd be in favor to coming up with > > > proper > > > fix still for 6.1. But as things currently are, let's just revert > > > those > > > and reschedule them with proper fix for 6.2+. > > > > Has anyone seen any other reports? > > > > Because, honestly, seeing work that adds support for dozens of > > devices > > getting tossed out at the last minute based on a single report with > > no > > opportunity to fix the problem is really frustrating. > > FWIW, I went out to buy a Logitech device that uses Bluetooth Classic, > the only one I could find in 2 different shops among dozens of Logitech > devices, tested it, and it worked correctly. Again, I understand the frustration. But the problem is not so much that we might or might not ever need another entry in that list. The problem is that some devices were supported previously (not in a fancy way), and now we have a chance to just disable those devices. Of course, we could say "just rmmod hid-logitech-hidpp". I have already been through that as well, and then you fight for 10 years on some forums where everybody says that if you have an issue with your touchscreen, just disable when the particular touchscreen is *not* using that driver at all. Anyway, let me write down my thoughts since yesterday: 1. Rafael already realized that the ->match() function was not working outside any other driver than hid-generic (and this was the design at the time) 2. We have an issue in hid-logitech-hidpp where during probe calling hidpp_root_get_protocol_version() returns an error, when userspace tools are working fine for the exact same command 3. IMO, the way hid-logitech-hidpp probe function is behaving is not resilient enough to be able to have a generic catch-all, because there is a non-zero chance the probe returns -ENODEV (see all the exit paths that return -ENODEV in probe). To solve 1, it needs a little bit of tinkering and Rafael already sent a v1 for that. IMO we should refine it, but that's an already ongoing process To solve 2, Bastien already mentioned one piece of the puzzle (the error code not being correctly reported and the signification changed between HID++ 1.0 and 2.0). But I am still yet to understand why there is a difference between userspace call of the function, and kernel space. To solve 3, I initially started to work on a simple, more resilient probe in hid-logitech-hidpp. I thought that we could regroup all device initialization we do in a hidpp_preinit() call, and if that call fails, revert to the generic hid processing. But then, looking at the bigger picture, it would make sense to not do that exactly. Instead of returning 0 and handling the device through hid-logitech-hidpp, maybe we should actually return -ENODEV, and have a fallback mechanism in hid-core that says "it seems I have tried all possible drivers, all of them failed, let's force hid-generic for this one". And as I type those lines, how about the cases when we actually want to disable a USB interface from HID because it is legitimate to do so? I'll need to think about this a little bit more. To be able to reintroduce the bluetooth catch-all, I think we need to solve 1 and 3. 2 would be nice to understand but is not preventing the series from being merged back. Cheers, Benjamin