Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp1155523rwb; Wed, 9 Nov 2022 13:44:09 -0800 (PST) X-Google-Smtp-Source: AMsMyM73V2KyAAAH22ErqbarNQnkv1mXRjZPjO9yrKrFpw4HGooj0m1cH+I2UrGGAtMXVe6PJkX1 X-Received: by 2002:a17:902:9a0a:b0:188:4f8b:abb8 with SMTP id v10-20020a1709029a0a00b001884f8babb8mr37244927plp.157.1668030249562; Wed, 09 Nov 2022 13:44:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668030249; cv=none; d=google.com; s=arc-20160816; b=0ur8osM6hthp9JeUoohu3E73LgAhDKjwLYz4XNV7Jh3uyZD74tForj9ZXFfhO9yTgY EmzYh1D85JN9c+ydN82e1i5UTzP4oE8ZbVf1f+FhoAPO1mbjyqoAT0+qVQSNqkIpc+du EcIdMQZbBX6kxg+KAt0xOUp6VtA2QVZkZpcyIrsOxCBr/CGauWWd4EWbQUC/lS7T8XeF 0xsg5Ktx9aNr1y3lyaPr47uN9xPv13RK3pWfXe51afVVLgJvB7TUu+eMJeuY+ybfylsd nnsUnqKTFz+62rUTfTf/VBzZzYQgFi4oh3r8Z0uE+uPmSGWJYn+szyL7niO/qPE1Y2EH Gmig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=InpZuUPAqdLNRZfUvkFqKxqkR/PtlXfF3L7vmxZzkAM=; b=09RNxfOl6r09FLkYaWT3F+qL1BO1XvhuRBrBk6aFp32epRXDWAAFoK8vbGs/ELdpv2 HhMpC3YZDvnE9sPkGSJSgTL9pj533v6wkhfHSdXaSWhtMTJxE1b0bczEP8yhFvjm2MtR sF0PqZeG7qDUXZXt6+iZ9amJiawhlE1g3Zt3kxguesUMJr4BtVEtCmaVZMNE90CaV6lF mgt540QyZ21nDLo9UQS2t/BzhFvFbzKGabRcIt9BEh5MDPP99nEkoxwYwcYWTnV3DuCx YqrumkEVIze6aN9NaZl6tOH7jWPlffH7SKeyAY4d3IUYkYyw/QDyWHJcKsj7W1X6QCHs 5TcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=o2OxATjD; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d14-20020a056a00198e00b0056d67d820ecsi20619145pfl.258.2022.11.09.13.43.45; Wed, 09 Nov 2022 13:44:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth-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=@gmail.com header.s=20210112 header.b=o2OxATjD; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230388AbiKIVax (ORCPT + 99 others); Wed, 9 Nov 2022 16:30:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229447AbiKIVax (ORCPT ); Wed, 9 Nov 2022 16:30:53 -0500 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 226497659; Wed, 9 Nov 2022 13:30:52 -0800 (PST) Received: by mail-wm1-x32b.google.com with SMTP id p13-20020a05600c468d00b003cf8859ed1bso2226978wmo.1; Wed, 09 Nov 2022 13:30:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=InpZuUPAqdLNRZfUvkFqKxqkR/PtlXfF3L7vmxZzkAM=; b=o2OxATjDf+ddXmI+ZuHWylIuDNXI/Q3lJI1hgIb5Hw1zNvqU8sPS3yrHEj7/xH1kJr KnAIyHlE9RRxhLvGurvT8fOf4SLmodCrLFbhfUUoVN1LmNfsbqy3x+GKEurhn51cYcTO 4ygzySO3nm6rCI1FHC7Hyw6CQ/+RdEOOt9XS0vOjpWrvTcouSr129TH53UlUc/S229CZ /v6Tp0nQvfIjfHNGt3yvUtp0bwAd4qnNwfYYB/7c5itgkPlxoaUIK+UTTw3paZq88+Y9 sKFxzKzj76BXyW5DUAhZi1FgFSjghhu384isFZpqFoL1GJNQ5sHjDSrZty5WFYJyulRg QeGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=InpZuUPAqdLNRZfUvkFqKxqkR/PtlXfF3L7vmxZzkAM=; b=YdmoCSfwE9vZa0UnyO1C65/rsiRRNdGW5IIDoIvwAaDzw+Be/XHkAeLMtNbtn6zlQo 5nS3Gz/sinKE1itiFDgrIoA3Od8clv9x+yRg0ct6bcJnivPAu77w1EnbuEY6LnR/SUZu A9oVj32iQ0I3RCHfizrff0h/kl2FY5lwlI6j/plVpqPJ5ASW/9cO6krSm9WfDn4oAEC6 8W1EUumx5xB16JVdloMn4z3gh4hyosk3jaFZ3M1U3qlNYZQmB2jI4UEDWLEGiDSXPAb2 /55J0vtY+RRfUvCLGYqIyimWeE8vQlRMrEgk+ga8JjDlUylN+FZR6t8cROBmp91ufbYx kgBw== X-Gm-Message-State: ACrzQf3T1sGfG5LitNRi4aLX/kTMblfCGSZaFPr/ArayVPlOcUMlnnPK H1DeH74XTeGOOZwq6CP8lGw= X-Received: by 2002:a05:600c:491c:b0:3cf:7336:8704 with SMTP id f28-20020a05600c491c00b003cf73368704mr34363578wmp.101.1668029450528; Wed, 09 Nov 2022 13:30:50 -0800 (PST) Received: from 168.52.45.77 (201.ip-51-68-45.eu. [51.68.45.201]) by smtp.gmail.com with ESMTPSA id e8-20020a5d5948000000b0023657e1b97esm14304813wri.11.2022.11.09.13.30.48 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 09 Nov 2022 13:30:49 -0800 (PST) Message-ID: Date: Wed, 9 Nov 2022 22:30:46 +0100 MIME-Version: 1.0 User-Agent: nano 6.4 Subject: Re: [PATCH 3/3] Bluetooth: btusb: Add a parameter to let users disable the fake CSR force-suspend hack Content-Language: en-US To: Luiz Augusto von Dentz Cc: marcel@holtmann.org, johan.hedberg@gmail.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, luiz.von.dentz@intel.com, quic_zijuhu@quicinc.com, hdegoede@redhat.com, linux-kernel@vger.kernel.org, linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org, Jack , Paul Menzel References: <20221029202454.25651-1-swyterzone@gmail.com> <20221029202454.25651-3-swyterzone@gmail.com> From: Swyter In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_HELO_IP_MISMATCH,RCVD_IN_DNSWL_NONE,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-bluetooth@vger.kernel.org On 09/11/2022 21:49, Luiz Augusto von Dentz wrote: > Hi Ismael, > > On Sat, Oct 29, 2022 at 1:25 PM Ismael Ferreras Morezuelas > wrote: >> >> A few users have reported that their cloned Chinese dongle doesn't >> work well with the hack Hans de Goede added, that tries this >> off-on mechanism as a way to unfreeze them. >> >> It's still more than worthwhile to have it, as in the vast majority >> of cases it either completely brings dongles to life or just resets >> them harmlessly as it already happens during normal USB operation. >> >> This is nothing new and the controllers are expected to behave >> correctly. But yeah, go figure. :) >> >> For that unhappy minority we can easily handle this edge case by letting >> users disable it via our «btusb.disable_fake_csr_forcesuspend_hack=1» kernel option. > > Don't really like the idea of adding module parameter for device > specific problem. It's not for a single device, it's for a whole class of unnamed devices that are currently screwed even after all this. >> - ret = pm_runtime_suspend(&data->udev->dev); >> - if (ret >= 0) >> - msleep(200); >> - else >> - bt_dev_warn(hdev, "CSR: Couldn't suspend the device for our Barrot 8041a02 receive-issue workaround"); >> + ret = pm_runtime_suspend(&data->udev->dev); >> + if (ret >= 0) >> + msleep(200); >> + else >> + bt_dev_warn(hdev, "CSR: Couldn't suspend the device for our Barrot 8041a02 receive-issue workaround"); > > Is this specific to Barrot 8041a02? Why don't we add a quirk then? > We don't know how specific it is, we suspect the getting stuck thing happens with Barrot controllers, but in this world of lasered-out counterfeit chip IDs you can never be sure. Unless someone decaps them. Hans added that name because it's the closest thing we have, but this applies to a lot of chips. So much that now we do the hack by default, for very good reasons. So please reconsider, this closes the gap. With this last patch we go from ~+90% to almost ~100%, as the rest of generic quirks we added don't really hurt; even if a particular dongle only needs a few of the zoo of quirks we set, it's alright if we vaccinate them against all of these, except some are "allergic" against this particular "vaccine". Let people skip this one. :-) You know how normal BT controllers are utterly and inconsistently broken, now imagine you have a whole host of vendors reusing a VID/PID/version/subversion, masking as a CSR for bizarre reasons to avoid paying any USB-IF fees, or whatever. That's what we are fighting against here.