Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp21166pxb; Wed, 29 Sep 2021 23:35:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyEEHCgUJTIAaUW4bAW0QLNbIL/2BFiimas5oL+AvGENxtdesmwCcLSO6isKhIuhan+fcgV X-Received: by 2002:a17:907:2083:: with SMTP id pv3mr4696251ejb.370.1632983721181; Wed, 29 Sep 2021 23:35:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632983721; cv=none; d=google.com; s=arc-20160816; b=s5jC51HNztLHLOjkCV4889cLVGgSUKyrGu1/UxHDUmQzDiAlFC7RXR4fDqNpUqujR4 ogWBTOTFQI90pqVTEv3DTsn8HoR1R62fQ7v8lYpIGBn/cgpbO5VOnckcV/+F+LuQvTEe EGIgDH3e8+ZEYfnHaZQd6Ln8iHOBZYV6aOXYCv+tg7iwJqPPYE6WyKdwFl2uM1oN0p1x iRKHHU4mD4MDlKFnAAL0Z8RheYQzvPxvxb7EwMFRNzz3W4DQg5NBJStnE+/zhkw5gSKA 05k6NPMg6b3we0fPVyKQquXat9+c1e0yN6w/9hSMxJO3DrI+jjnBeF00dPOaK8QdXKJx Sn4Q== 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:subject:reply-to:cc:from:to :dkim-signature:date; bh=hCJzelxpI/8EEO8zQFRfUJi7q3yxmz/nJ845rrtiffk=; b=S/mC79ajgYfhy+cY3+XpDLkkYAm5wERm88b4ZjNi8O0akK8MUDBHmQPSLwpaVkgD6f tfXMmYN436WMpxQBwA9HW5+zg3A3XuHHKIlYhgSNpiXqQAxOHpLg3b7GUP1uboM2KKO+ 1FN79h925pKqWbEfswWME+Z5Tqsq9XIMzaD+R4/LOe/Iwij0Xs8NtN18NZ1jpqvSz/5U Z5PkXzm6PX4X3DAd6HeTkIK5vcp/2g5y8XH2MZmywt+VL7GfjRMyLSOnxsyhi6wrK85U FYQpZUxP0i54a4vJFy+rxkPXQgd9H5VLrTx5uJ3PQaQdE53eXRnqTYawcXCh7gp9ZPe5 Wgpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail header.b="d2ZQD/To"; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j6si1882343edw.374.2021.09.29.23.34.37; Wed, 29 Sep 2021 23:35:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@protonmail.com header.s=protonmail header.b="d2ZQD/To"; spf=pass (google.com: domain of linux-bluetooth-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-bluetooth-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=protonmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1348034AbhI3Gew (ORCPT + 99 others); Thu, 30 Sep 2021 02:34:52 -0400 Received: from mail-0201.mail-europe.com ([51.77.79.158]:57981 "EHLO mail-0201.mail-europe.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236162AbhI3Gew (ORCPT ); Thu, 30 Sep 2021 02:34:52 -0400 Date: Thu, 30 Sep 2021 06:32:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1632983587; bh=hCJzelxpI/8EEO8zQFRfUJi7q3yxmz/nJ845rrtiffk=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=d2ZQD/ToxtGp2b3t5P1J4EZF4GKjmjzTsUwVj1dCEbBiDBzoSctY+o+JANb2EiRaS IfOALQna9PleJcFvuvpGGyMoQPegX6hv+6Ua/QqSaTXNDGYRbCkHbZ9CU1k9i/cWD4 WBYTRRo/6efNH7ZoeiRbUHsU3vSQPn+nWGK4fBBA= To: redecorating@protonmail.com From: Orlando Chamberlain Cc: danielwinkler@google.com, johan.hedberg@intel.com, linux-bluetooth@vger.kernel.org, marcel@holtmann.org, regressions@lists.linux.dev, sonnysasaka@chromium.org Reply-To: Orlando Chamberlain Subject: Re: [regression] Bluetooth: Query LE tx power on startup broke Bluetooth on MacBookPro16,1 Message-ID: <20210930063106.19881-1-redecorating@protonmail.com> In-Reply-To: <4970a940-211b-25d6-edab-21a815313954@protonmail.com> References: <4970a940-211b-25d6-edab-21a815313954@protonmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-1.2 required=10.0 tests=ALL_TRUSTED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM shortcircuit=no autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on mailout.protonmail.ch Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org I've realised that thunderbird has added empty lines between each line in m= y previous email, but here's the same patch I sent before that adds a quirk disabling querying LE tx power for affected controllers, but this time without the aforementioned extra empty lines (I'm using git send-email now)= . --- drivers/bluetooth/btbcm.c | 4 ++++ include/net/bluetooth/hci.h | 9 +++++++++ net/bluetooth/hci_core.c | 3 ++- 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/bluetooth/btbcm.c b/drivers/bluetooth/btbcm.c index e4182acee488..4ecc50d93107 100644 --- a/drivers/bluetooth/btbcm.c +++ b/drivers/bluetooth/btbcm.c @@ -353,6 +353,10 @@ static int btbcm_read_info(struct hci_dev *hdev) =09=09return PTR_ERR(skb); =09bt_dev_info(hdev, "BCM: chip id %u", skb->data[1]); + +=09if (skb->data[1] =3D=3D 150) +=09=09set_bit(HCI_QUIRK_BROKEN_READ_TRANSMIT_POWER, &hdev->quirks); + =09kfree_skb(skb); =09/* Read Controller Features */ diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index b80415011dcd..9ce46cb8564d 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h @@ -246,6 +246,15 @@ enum { =09 * HCI after resume. =09 */ =09HCI_QUIRK_NO_SUSPEND_NOTIFIER, + +=09/* +=09 * When this quirk is set, LE tx power is not queried on startup +=09 * and the min/max tx power values default to HCI_TX_POWER_INVALID. +=09 * +=09 * This quirk can be set before hci_register_dev is called or +=09 * during the hdev->setup vendor callback. +=09 */ +=09HCI_QUIRK_BROKEN_READ_TRANSMIT_POWER, }; /* HCI device flags */ diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 8a47a3017d61..9a23fe7c8d67 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -742,7 +742,8 @@ static int hci_init3_req(struct hci_request *req, unsig= ned long opt) =09=09=09hci_req_add(req, HCI_OP_LE_READ_ADV_TX_POWER, 0, NULL); =09=09} -=09=09if (hdev->commands[38] & 0x80) { +=09=09if (hdev->commands[38] & 0x80 && +=09 =09!test_bit(HCI_QUIRK_BROKEN_READ_TRANSMIT_POWER, &hdev->quirks)) = { =09=09=09/* Read LE Min/Max Tx Power*/ =09=09=09hci_req_add(req, HCI_OP_LE_READ_TRANSMIT_POWER, =09=09=09=09 0, NULL); -- 2.33.0