From patchwork Tue Nov 30 11:48:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aditya Garg X-Patchwork-Id: 517916 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CB2F6C433EF for ; Tue, 30 Nov 2021 11:48:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229478AbhK3Lv6 (ORCPT ); Tue, 30 Nov 2021 06:51:58 -0500 Received: from mail-ma1ind01olkn0177.outbound.protection.outlook.com ([104.47.100.177]:22528 "EHLO IND01-MA1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S236623AbhK3Lvu (ORCPT ); Tue, 30 Nov 2021 06:51:50 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lsMAyf6KLEyeK3koK8Ivf8Ws9u4qR8ORj+VD+5ApM4GNCKi8ULxJ3/q5JX69LkhY1C2PVo2MNAUaMVoHkQYJe3WmGPfNyn/qHVHxx6NMaQcMqVIL6uT6R076TvDXlY6Aiit1uZdKLlDbY0Bz0UUB+cy+B6qHny11LR7hY1C2U1U3TRqwKMj+Xu12a5mKqbL+uzx43lgh+uY/O4FI42NXdalu8tQFdoS2mTcjYmiUSKFEKobZDqS/h5CRdQdBdUAYwbKZqey9GKxwgSObuN6m+8/McppmoXupZIJ3I/Yelrw7szDsDppLUfZOid1ccXkPCLD7wYMsLoCjP18pvtu3WA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=UkJHDi7nLC/KsDru/+pcC7FMb0EnENPZsFVS1Yni2Bk=; b=Ubb2rm7X+ZyZcn5WiBEMlhO7O/kwm4hnyvajre+3wNhVaUUKwD0ot6E7Cy0CiGb6vuwHaafn3bf+s4nrg9g/BxGonLNXtBryavlXKElelyOFMhbl2pXHCzMq6vLu5wKGCeSn77kqaNmoTGR21Kw8+j/SLLhpIWvFx7J62Zfz0P0gHZwewmF2sAC57QcpPwI8yQJU4/JQHe7Q9wux8hWxLd+aWn8q6wioidbnLlyXrYFJRKDo5YC0h67kiofiWYoOuLHbqpLLDE33H9kG8XZFI36b0qXH9ZwjfVhzAnO+AGu0FxTu5eg0ZtOCoaC347iL2Vf4Uw1DWMp0QG3XajCiwA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UkJHDi7nLC/KsDru/+pcC7FMb0EnENPZsFVS1Yni2Bk=; b=sKHfAoIc9/9pWq9HCD0JTbTkkYtGqdT1HiJgHUl2Pf7ZVMx7AyVebkxznnnuHINPn1k+LNKA6Wh2wFDjb+/ng4AvBGay0WqrNkf25RJc1DRo77VG1RPdEZtyKbhNqGfQRWMuWLGSlrYU9kIDVarU+oFu5fvDf5zwMLKPLV5I0/6X1fWXOS6kDc0M5NtOE3ELpHkB1dbiHEIagVVsC3L/ca9te6BHOfOqS/O01Sl89rENOewd+dUtvUAkks1npVNSOEQ8hqV07zfaU+ga0zH40UxnSN1JnWYXJev/ACFf46bluUUASjxVzo2w1tWDEoP8ZlQe6dbNitDPE6GI/soWfQ== Received: from PNZPR01MB4415.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:1b::13) by PNZPR01MB4286.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:4::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.23; Tue, 30 Nov 2021 11:48:25 +0000 Received: from PNZPR01MB4415.INDPRD01.PROD.OUTLOOK.COM ([fe80::7ca6:9165:19ec:4cd7]) by PNZPR01MB4415.INDPRD01.PROD.OUTLOOK.COM ([fe80::7ca6:9165:19ec:4cd7%5]) with mapi id 15.20.4734.024; Tue, 30 Nov 2021 11:48:25 +0000 From: Aditya Garg To: Marcel Holtmann CC: Greg KH , Thorsten Leemhuis , Orlando Chamberlain , Daniel Winkler , Johan Hedberg , "linux-bluetooth@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Luiz Augusto von Dentz , "regressions@lists.linux.dev" , "sonnysasaka@chromium.org" , "stable@vger.kernel.org" Subject: [PATCH v7 resend 1/2] Bluetooth: add quirk disabling LE Read Transmit Power Thread-Topic: [PATCH v7 resend 1/2] Bluetooth: add quirk disabling LE Read Transmit Power Thread-Index: AQHX5eAufml6VMnYEkSqbdrb67pBiw== Date: Tue, 30 Nov 2021 11:48:25 +0000 Message-ID: <312202C7-C7BE-497D-8093-218C68176658@live.com> References: <3B8E16FA-97BF-40E5-9149-BBC3E2A245FE@live.com> <52DEDC31-EEB2-4F39-905F-D5E3F2BBD6C0@live.com> <8919a36b-e485-500a-2722-529ffa0d2598@leemhuis.info> <20211117124717.12352-1-redecorating@protonmail.com> <40550C00-4EE5-480F-AFD4-A2ACA01F9DBB@live.com> <332a19f1-30f0-7058-ac18-c21cf78759bb@leemhuis.info> <287DE71A-2BF2-402D-98C8-24A9AEEE55CB@live.com> <42E2EC08-1D09-4DDE-B8B8-7855379C23C5@holtmann.org> <6ABF3770-A9E8-4DAF-A22D-DA7113F444F3@live.com> <92FBACD6-F4F2-4DE8-9000-2D30852770FC@live.com> <3716D644-CD1B-4A5C-BC96-A51FF360E31D@live.com> <9E6473A2-2ABE-4692-8DCF-D8F06BDEAE29@live.com> <64E15BD0-665E-471F-94D9-991DFB87DEA0@live.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [UrXlc18aHztjttVrWKai8Dv58Y8XSAGLfgW6OnYA7Noua3pnIGVfy/IdIy7UOePs] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: db3de10c-9883-4111-fd27-08d9b3f75185 x-ms-traffictypediagnostic: PNZPR01MB4286: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 5TjO+5dMUyEbXqZ34UVdmNaV4qqizLxI0Z9TZah8UcpXiio8VF4D494CACkAF1HykBK/WLj5+EEZu7sv2nJTyfpOViFMXLn9MUqCQtu1XU7UiJIgAP8KmqGCLCFbF3m4f0wjx0pc3QYvqTEQNBzMrSzVf6SVJe+wQC3dvND65eAzXpkmtc9sOM+fVNNIN/FkvCxIWVUoSnUrvhyGaS1kO+vldPt3xUYSNtq+HiP+9mKZfLn4Z5fSm0QJZbJQDBz1Dx0O44QlmS+ujS9YZztWKGi8N+VyiVvpCLO2MNoAs2N5A5kYoqBeMCVUFQTq6n1GUwJAcE1niVjvlUMxqejWf12KjEKXkxOU3dY557MCgZZn5Ap0yfYnL1ieoqPRO+abM7bT4BFy0aiaLAEKOCKS5FDHklkeBqI0oabkLB4vfd387OryKo20OusZTv4EFbGQk9lw3bijo8L1bjYcT90Vf6QscPB6/hdYl2Z1aW0XKucZmB2J9Oav4ptg6jGOaHdtzrZo4dFdU/SvA0QmaW5rq2uS63tPWzt7LlnLOpcxnKtpfBk2p93/Iidg16pJFbCKxk4zb8gXDwh5V57DAMTKSPTuezFzE87uyHDSMx7ZKtG42agWto4iZuHkMo4RT1vC x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: BmY1ZK/CG0YlAS9Kh3KQQcAgHedIE7OVzsEUXHaHC5PW53/14JKL+h778MWI8cVp8/NOmT679vRwhRLYq5wxaw9FyO92ZWSHOxDhflIHEepVMqcYQTjkEltgXQa6pIjRfrAHHXEXSznhOSNrn9jzbX0mPPHJk8i82S23rLOxtnsZa60WLeIYTpRps7gWrU23hyVGsx4Vgp783D/GxJ/lwduHYJ0Rcr2j1TEX4ayx44u+/O0TWqVA4WThF/+h9w4kp/2eTzP6QEyJsHJs8hN7+swfcG89lKRQ22yi+KkouvhVs/Z05F4dqV2QdeFTKuevJBLXcjeIAQbk2bYoHS7grEQz0rdtPx798RR+8y5ctbMZm8ypeWs5F/BPDLjo8qhPlJWdPdQJZcIO5LCw8AEaf4HDGbgo4zbRbTX4Cq92SwakB3pwABChRWXCYsJlTle2QETvUU2TY2AfjoYT1X1UmyFx+zLvneuM4MEmHDY8cgESWguZVpQtLwNYCDo2pOCN+j3Hu6liA/gmQRcgP0vrwtPxNDoBYMD0QKqU1DezU9UV7wJV9tQYw3kj+mfjXxweg2eLMeo9RcCUKH/Z/5jAs3Me3/KqvHRvA/zBB7ysF/27YDMK4XuFWXVsV9WeARlsjWX7/VFZG6qim4mVUm15vukR3bwlRjoxKdrRyXFuk3OR5FPt69ThaQfRyR1ZcefpNlawxIam46HQ3YpMNXyowSuxCznyvewRpaLJNWGnHoPPx7/EaKaf2IWn8bz6gprd8ZVyg3L0M2VatHmOocp5dA== Content-ID: <01DA3761CE47EF479B09DC1EC252F90A@INDPRD01.PROD.OUTLOOK.COM> MIME-Version: 1.0 X-OriginatorOrg: sct-15-20-3174-20-msonline-outlook-a1a1a.templateTenant X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PNZPR01MB4415.INDPRD01.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: db3de10c-9883-4111-fd27-08d9b3f75185 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Nov 2021 11:48:25.4679 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PNZPR01MB4286 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Aditya Garg Some devices have a bug causing them to not work if they query LE tx power on startup. Thus we add a quirk in order to not query it and default min/max tx power values to HCI_TX_POWER_INVALID. Signed-off-by: Aditya Garg Reported-by: Orlando Chamberlain Tested-by: Orlando Chamberlain Link: https://lore.kernel.org/r/4970a940-211b-25d6-edab-21a815313954@protonmail.com Fixes: 7c395ea521e6 ("Bluetooth: Query LE tx power on startup") --- v7 :- Added Tested-by. include/net/bluetooth/hci.h | 9 +++++++++ net/bluetooth/hci_core.c | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h index 63065bc01b766c..383342efcdc464 100644 --- a/include/net/bluetooth/hci.h +++ b/include/net/bluetooth/hci.h @@ -246,6 +246,15 @@ enum { * HCI after resume. */ HCI_QUIRK_NO_SUSPEND_NOTIFIER, + + /* + * When this quirk is set, LE tx power is not queried on startup + * and the min/max tx power values default to HCI_TX_POWER_INVALID. + * + * This quirk can be set before hci_register_dev is called or + * during the hdev->setup vendor callback. + */ + HCI_QUIRK_BROKEN_READ_TRANSMIT_POWER, }; /* HCI device flags */ diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index 8d33aa64846b1c..434c6878fe9640 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c @@ -619,7 +619,8 @@ static int hci_init3_req(struct hci_request *req, unsigned long opt) hci_req_add(req, HCI_OP_LE_READ_ADV_TX_POWER, 0, NULL); } - if (hdev->commands[38] & 0x80) { + if ((hdev->commands[38] & 0x80) && + !test_bit(HCI_QUIRK_BROKEN_READ_TRANSMIT_POWER, &hdev->quirks)) { /* Read LE Min/Max Tx Power*/ hci_req_add(req, HCI_OP_LE_READ_TRANSMIT_POWER, 0, NULL); From patchwork Tue Nov 30 12:54:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aditya Garg X-Patchwork-Id: 517914 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7A3F7C433EF for ; Tue, 30 Nov 2021 12:55:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234672AbhK3M6b (ORCPT ); Tue, 30 Nov 2021 07:58:31 -0500 Received: from mail-bo1ind01olkn0171.outbound.protection.outlook.com ([104.47.101.171]:51866 "EHLO IND01-BO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S229572AbhK3M6W (ORCPT ); Tue, 30 Nov 2021 07:58:22 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eJhv5ONOyiDAUpoL24B6ijulTVoeaCfFHuUPhGzQCbKTDfTx4GYt/KsTY+WT1zkrJnSypMpKpGFrf+5WfurqyoROUKk5VeIWbjZzTxXH1AvFEH6YqzZywRQE8XOhSKPmEtZj4xEex63rt2LcqVJc5QUZb09lcfO6uAftTc2mJ2tCS8g/lI8A/1hQAAnEyLVyIBSwLfiB0DVNwYMicrsbtU6ly3EfmvYgvk+LtOrbqPFvbw6tZLlSufyUdTokGXQ2RKMwCEFgV7w2786/btRtH5bKyZz+PRHSBamzVkei4fwGhFkf6xEnT+S2zo8OReoRdnUpmynj83s8Tn5GXEML0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=pz0p8LLfQr6v958JajpVhHxG5s51yct4J06YNTgYADU=; b=OpaZOv6ww9Sd/HUtN4INVWlRc/U/+wG/yjyuCJFz5q1ANJm/mb7ZzFNCk7pef0V1LpgqQmyOhIGD/x+Yb+l0xubaGTWI9PFC7skg8nFQUBgLM7W9y/pXKS1er3lsCisS+LHoD6Bom1Pn60dq3zpdfEue2+1hXQDWpJdFscZmFACE0wOiwGtkC+9DuFCc5F1cEyNoiFHjQ4Cvun+zvOGmDDwZP5r5kwaOhmtvuuwwSS8ZviJnusshRQ5PCYP0/CHOeeVA1xk5StIGewLp/ssKs1Pl2PgYqdAc9C5XA+GQv1xgW3NCSySO1XYqwOQg6SV30QVJwhIqBZ9GDWTiKwILPg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=pz0p8LLfQr6v958JajpVhHxG5s51yct4J06YNTgYADU=; b=PoXHdO3708w8AZHKU0/N4nuREhu+7Kv86mxBpsl+Ey38BCtwEGEB+L6KqktrD1OdBbQPO6V4aTN1HpIO1YZMWnrKPi8QcQ2wdrkGHYH0Fnr0qWbLt3Zib2m6pd+Yf43XsalVha82PI04Q7kohVaiOgsN2BLblaOs+wI0fodLtXmZAq8v+8wWbKIOMQeQpVef8f16MrKZLTIHuwMEdk5IcxrN5PARa1bmyYEBEKJMPN0947c32Si/U7lyfIbeu7xdSZ7/93dahhVb/7RR83uBXvwCrGSPrLWtDsqBlLnp2eerTRDVeWCAPZu6/rPcoUYedYt/qGTBvLrs/UnPY49Hcw== Received: from PNZPR01MB4415.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:1b::13) by PNZPR01MB4669.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:30::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.23; Tue, 30 Nov 2021 12:54:56 +0000 Received: from PNZPR01MB4415.INDPRD01.PROD.OUTLOOK.COM ([fe80::7ca6:9165:19ec:4cd7]) by PNZPR01MB4415.INDPRD01.PROD.OUTLOOK.COM ([fe80::7ca6:9165:19ec:4cd7%5]) with mapi id 15.20.4734.024; Tue, 30 Nov 2021 12:54:56 +0000 From: Aditya Garg To: Marcel Holtmann CC: Greg KH , Thorsten Leemhuis , Orlando Chamberlain , Daniel Winkler , Johan Hedberg , "linux-bluetooth@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Luiz Augusto von Dentz , "regressions@lists.linux.dev" , "sonnysasaka@chromium.org" , "stable@vger.kernel.org" Subject: [PATCH v8 2/2] btbcm: disable read tx power for affected Macs with the T2 Security chip Thread-Topic: [PATCH v8 2/2] btbcm: disable read tx power for affected Macs with the T2 Security chip Thread-Index: AQHX5el5+zXbGbWre0aNpmpcG4Bq8g== Date: Tue, 30 Nov 2021 12:54:56 +0000 Message-ID: <74BC7DFC-6B8E-4697-83E4-FBFCFB1C96D5@live.com> References: <3B8E16FA-97BF-40E5-9149-BBC3E2A245FE@live.com> <52DEDC31-EEB2-4F39-905F-D5E3F2BBD6C0@live.com> <8919a36b-e485-500a-2722-529ffa0d2598@leemhuis.info> <20211117124717.12352-1-redecorating@protonmail.com> <40550C00-4EE5-480F-AFD4-A2ACA01F9DBB@live.com> <332a19f1-30f0-7058-ac18-c21cf78759bb@leemhuis.info> <287DE71A-2BF2-402D-98C8-24A9AEEE55CB@live.com> <42E2EC08-1D09-4DDE-B8B8-7855379C23C5@holtmann.org> <6ABF3770-A9E8-4DAF-A22D-DA7113F444F3@live.com> <92FBACD6-F4F2-4DE8-9000-2D30852770FC@live.com> <3716D644-CD1B-4A5C-BC96-A51FF360E31D@live.com> <9E6473A2-2ABE-4692-8DCF-D8F06BDEAE29@live.com> <64E15BD0-665E-471F-94D9-991DFB87DEA0@live.com> <312202C7-C7BE-497D-8093-218C68176658@live.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [aM4K+W+9cpx0XyBidhCISBwuaqm2LjsYm/ga01LTzVvBNu2MZE2cS+WN5HyuHKUt] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 550e3ce6-1b6e-42c9-71e0-08d9b4009c56 x-ms-traffictypediagnostic: PNZPR01MB4669: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: SumpRN/Xnov0WcVsO25mGpaI9Mco0wtYOz92vIVCD2rIZ8jtEUb2fDW+dmnA0RBpCZ4mR6WkN27b6BA9vBOpKmOwWAla7lGa8O/wchCy8kkA7n6NkO5j7xkohykiyvgZVjjwAvwDC48fyd4fHHx2/kJo1TTvSTedAskQ3hj8OSdjaNjoRqgNnmdtQy3uBi7ag+5N0sxHeYfUVuzSe7rfRcryxIgT3rHCWO/nv3DSLlIkL1h1UoIt4BXhOZsHHaDa82pmWG8WNbjRLk7Od8f6ze5yPYTt4E/daOqhcE8X6BqMK+AJphDdldPaLUQenAjBlZF1rURsaL0hMVAhb2PHOH3pLTBvNRKccHE30Iq6YyLObGRl/6uPFxQQC/XWTdZb2tcD3RTLgp1Vlpnfl9nxNjAxgu1aK5Jg5SqZQs+++91FVLpP0FZkKT/JLv5pRyg0dqNGwxjMjvKNd78eUWx2XmFvYqRm01Rpy3S2IgANp+LBM1auWk5t/2EVpXFZluS3DEJ2kRwrIpoEitInMcXa0KcMM8XjmL5MK4DxpZ1QFssyYN6OpNQWsNv73C9DaDuTbJARcVGL8YT/oxMLE65BeobqRYisr8FQPfmrF8unJ62BGoja0/53elzMCK42YeUV x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: F2mohjQ79acgSv5WWlefOy/6HYnOZ3CiwQ7Ijw9BzvFz7jjmTlwOCeeL8yJ5nmOnaa7XBoz0TK+1eR+IEpA/jJIhD0E1a1nn/4uhD05D6L8uvqmjfUmASG2PSdq7hXClszj6ZyoW0DMPUzO6qxToH9v7Tc8gGedZrj4Ifkg/2DjBcoo2LjDdf0e8uO8mjl2Y3nRjf1aF1bXiac+3tdU5iqc1ITrzjBLmUYnfxfd1BfMlH8Pd1xBg+870gjku1mLD5ncrTiWzyVW650Ms8IbbOaVLEdGaASqPca2BZHIDoHDqMTOQqAGD8zYYPPRVJ7btRuqvALtRyHD6HI/0Lfy72rqxd/gT5VVVY7uZ7mPNWiy9EvPWeWjfKJtoLKoPqAy7WVH64wMuO6gZzob7Kv6UoPhRSGYu2WTHGZRUBQxflLTphiU9eP850rXcKekQxN+n9eExPryV3e6VoGHfnZzDPZ1sONojCTSQWfMVtx0lJBzJ3WAtn2XQQhvRROoO/X1rPTH1+dAFQXLGfqyyO3acsAEiRdB1UFlgN6OpE0y714z7NIMiAURWVKmAG5ShxH44ErSqdvSV/IUa08jyZ0zvhiXpR1607LIZnuuRVOB5HIwbjU6nPGw3/yfWhAyTZ8didp8EMkRQI8VoVyh97SqPe3a8V2JpW5KutczwGnltb6sQvEa8yDFfRKo2yZL1FbP9/X8rTvuAWOR+LRA7URMyUdpZ3zmPHDkIjkDd9emE+/5rZPjqSBZ0HqKX1BXeCPXy2aVgrBbZikkmz3sLgnN3Hw== Content-ID: MIME-Version: 1.0 X-OriginatorOrg: sct-15-20-3174-20-msonline-outlook-a1a1a.templateTenant X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PNZPR01MB4415.INDPRD01.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 550e3ce6-1b6e-42c9-71e0-08d9b4009c56 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Nov 2021 12:54:56.5217 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PNZPR01MB4669 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Aditya Garg Some Macs with the T2 security chip had Bluetooth not working. To fix it we add DMI based quirks to disable querying of LE Tx power. Signed-off-by: Aditya Garg Reported-by: Orlando Chamberlain Tested-by: Orlando Chamberlain Link: https://lore.kernel.org/r/4970a940-211b-25d6-edab-21a815313954@protonmail.com Fixes: 7c395ea521e6 ("Bluetooth: Query LE tx power on startup") --- v7 :- Removed unused variable and added Tested-by. v8 :- No change. drivers/bluetooth/btbcm.c | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/drivers/bluetooth/btbcm.c b/drivers/bluetooth/btbcm.c index e4182acee488c5..07fabaa5aa2979 100644 --- a/drivers/bluetooth/btbcm.c +++ b/drivers/bluetooth/btbcm.c @@ -8,6 +8,7 @@ #include #include +#include #include #include @@ -343,6 +344,40 @@ static struct sk_buff *btbcm_read_usb_product(struct hci_dev *hdev) return skb; } +static const struct dmi_system_id disable_broken_read_transmit_power[] = { + { + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "Apple Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro16,1"), + }, + }, + { + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "Apple Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro16,2"), + }, + }, + { + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "Apple Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro16,4"), + }, + }, + { + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "Apple Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "iMac20,1"), + }, + }, + { + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "Apple Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "iMac20,2"), + }, + }, + { } +}; + static int btbcm_read_info(struct hci_dev *hdev) { struct sk_buff *skb; @@ -363,6 +398,10 @@ static int btbcm_read_info(struct hci_dev *hdev) bt_dev_info(hdev, "BCM: features 0x%2.2x", skb->data[1]); kfree_skb(skb); + /* Read DMI and disable broken Read LE Min/Max Tx Power */ + if (dmi_first_match(disable_broken_read_transmit_power)) + set_bit(HCI_QUIRK_BROKEN_READ_TRANSMIT_POWER, &hdev->quirks); + return 0; } From patchwork Mon Nov 29 07:45:38 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aditya Garg X-Patchwork-Id: 519112 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9B325C433F5 for ; Mon, 29 Nov 2021 07:48:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241175AbhK2Hvd (ORCPT ); Mon, 29 Nov 2021 02:51:33 -0500 Received: from mail-ma1ind01olkn0183.outbound.protection.outlook.com ([104.47.100.183]:45067 "EHLO IND01-MA1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S241208AbhK2Htc (ORCPT ); Mon, 29 Nov 2021 02:49:32 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DQ0T8fijhHFqRrsf6+gB/BqQ9KBEnpX5CAProcyb8Sy+xLiIgzdnQun9jYo45mj+3h+PNFhO7uJrad8Cly3p2ARoN12vikDcROjp47oJvyggyfTJrzjyyDH7wqn5F1UfX4sOf0uNMcPIaLyAeMe8Z9Gb/BUgl6W4D1HNcidkSvH4PJ/gGMV18/wp4CCQkRVq7QOFpKShNDCxf8QstZQDDKmb8vqeNHBVKrtZZfXeHi5H2Qf3JEGcAIHBK2P3zYaRYwgmka1OJ9oF3dzvjdvU4+aMSrzOjDP9AxJZ3P1Xh86F/jcfn5vxO/KAxDK982x7LA25ovBu2Uw1+3Q08YP9yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=KtnrQ9+sBuX4m4+XIoltCPcUosCcNTFW8m43umLb05E=; b=VCOLDFgJTQeL5Y0W0jquYMFtlRVaeP/s6/qfdU1c2daaWLp4P/0e6bYBleh/YI9tKQuQZU0kfSK2GRWBn2fgmoKH2WspV4WgXr9GRG6HuawNeUsb47RhTx3N90IipsiUF3r3cO2S3YmfBA1XyLpvQ1GQsTVGS6UwpHLXG2BQ3OqySBWDXNkHcb7NB7wWYf5OXuVK+3skIq52kmBHS5uH/QKdSvcfC5xtB2DjG3rkGRtt2T47GEzoEuM5VuEsIMYT9n6h5NmubPsRqpBGW0Bkacrpshdcak8tpQIQpSCASvw1UPvt8Zeca0m2A2B6WDuuU363zON/Wqa2O48aYR96Lg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KtnrQ9+sBuX4m4+XIoltCPcUosCcNTFW8m43umLb05E=; b=pZusEHCEcKxngLQ8TC3fgJce/6XbvEZR1QUaTLZ7h1skHCm/4prkg333RB3MKFst7N5XkZW+f/9GKD8H7nqUTawopJdt1ZBFqsA9KMklhY741aQ5/PhDXgwbCNGzh01pGgSCKGh1nGMF3ZwUKE8ZET/sJ3HWRuOl9fHu51ZIkvffkKkWXTcZ8qRP7Ea94vt0q5vlnm/jcOESXOSCRFsg+ioAQrvahLwKROrqJoVuii9NJKFi9MgBOKOH97rkKAkOhheC6w+ZrRb71iyYC13Wb4FKxMAVUjWOgu7/5uO7tBTco8F/ap+NhSdl4XYI33ePRfdopDuYudI/qYSv1Bh/6Q== Received: from PNZPR01MB4415.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:1b::13) by PN1PR0101MB1821.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:12::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.23; Mon, 29 Nov 2021 07:45:38 +0000 Received: from PNZPR01MB4415.INDPRD01.PROD.OUTLOOK.COM ([fe80::7ca6:9165:19ec:4cd7]) by PNZPR01MB4415.INDPRD01.PROD.OUTLOOK.COM ([fe80::7ca6:9165:19ec:4cd7%5]) with mapi id 15.20.4734.024; Mon, 29 Nov 2021 07:45:38 +0000 From: Aditya Garg To: Thorsten Leemhuis CC: Marcel Holtmann , Orlando Chamberlain , Daniel Winkler , Greg KH , Johan Hedberg , "linux-bluetooth@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Luiz Augusto von Dentz , "regressions@lists.linux.dev" , "sonnysasaka@chromium.org" , "stable@vger.kernel.org" Subject: [PATCH v2 3/6] btbcm: disable read tx power for MacBook Pro 16, 2 (13 inch - 4 Thunderbolt Ports, 2020) Thread-Topic: [PATCH v2 3/6] btbcm: disable read tx power for MacBook Pro 16, 2 (13 inch - 4 Thunderbolt Ports, 2020) Thread-Index: AQHX5PUa/z//CIHYdESpK5xBMpoj/w== Date: Mon, 29 Nov 2021 07:45:38 +0000 Message-ID: <8FE730BD-C120-494E-8B3C-B16B48D280BE@live.com> References: <20211001083412.3078-1-redecorating@protonmail.com> <70a875d0-7162-d149-dbc1-c2f5e1a8e701@leemhuis.info> <20211116090128.17546-1-redecorating@protonmail.com> <3B8E16FA-97BF-40E5-9149-BBC3E2A245FE@live.com> <52DEDC31-EEB2-4F39-905F-D5E3F2BBD6C0@live.com> <8919a36b-e485-500a-2722-529ffa0d2598@leemhuis.info> <20211117124717.12352-1-redecorating@protonmail.com> <40550C00-4EE5-480F-AFD4-A2ACA01F9DBB@live.com> <332a19f1-30f0-7058-ac18-c21cf78759bb@leemhuis.info> <5B9FF471-42DD-44DA-A9CE-0A83BA7A4212@live.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [SVKyoKcIpKL5gKoBqaJm396nvJEfJqKR+AXHPDVQzfpam+U2C/+OUGzpIO7ZfOdo] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 9e6aa2cc-5e89-4526-0a1a-08d9b30c3c99 x-ms-traffictypediagnostic: PN1PR0101MB1821: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 6FlEoAPIVcwTg/yQoafk5SbZFdgON7R2MScyOo2oOpZSn/fRi5qzLLMeEEdZrhdAvAzR4FkLzuKszOh/lByvVUFXjEhdMqJoqE7M0iQ6z8M/MMa6OC/kGa7h6sWXKi4C0Enmk/1l9/LrDv1MUHjO6GF5hKqfx/ThQLr6NdQoXGZJCRnTg8YKUwXdt3CBrnxOh8S/yoTXYR+HKjUR7g1xDf80M/5Ig0FodekHbcFDfG4RTURgmRJqRSfNyphYr3pk0kfThuoNX2LXslxby/lC+oAWPhTENS0HXisqxcWp26GJZEk7wCZA7afscKa4ljZTzbMipIxrURReEbDlyAEdbBLgQzYUBUfjCtUKuUpva5nfzDBt/5ZI5R3l8ea666h8xhN/twt75BCo1uzk390VvIm1mF6JnoxZLJ/yN+zXi2nTSGU6g/2WWG+08qw/tPJdcRwD8IWw8IgwbZSFKgoRfYVtKHlBVpKcEgvNn4vp5qJJPB1azDVXWdktuHVOgRco6uVXL9ppgAKo6O/q4nt1pqoNJDTHsCFSEq9Tsc0nxQv5+UtIe9T6+Zc1lk2321RDKuxN0KBHefb9zIm7CNmimA== x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: msbF5XmPEGZVXaCOJX5uQeJ2tGxGmit+n4gW0XGK6NG90QZY8456P7D9RXjzjBIVvBAkxUK0lLcTBjtB7zCckNdCPnEHtKSm3DA2DmcA3Pym/jTGw5UYNALJCELED17sfMVJuMPju/1fBA0GKDksVUMIAuZF/+IV//lsVHknoVO+QoKd3y66lORgBihNgA+R95IknMsSnmOTUeQ7IiZBH4kk3b1MASDcfKLvs+o4l3IcCPHKABqJqMKwqg9vx8fevypQvCOQMHmTsi0z9eUCpHYwUnyrlLCd/DULpDebFih5qjMnkuGzmDtXPSj1kTV/nIxO9Q2D10/NOryXI3t7NPgijL8NuU81B1Q/ZsK8lPx6PV0T30yddmCpWG8x2PsOj1d6YMQ3kijH0/4eiOirRwC3tWpJzlF2jqOr6BULUu/mDzQhqc1nOG1Jrm2jYhkko5CQEq0LUKDvyCuLJCOW7MwbaQl4YINlqlvZx7y0gxW+gBTFatrTh80fPlK6lHSEc12u1+r7ODKo1R+N6UDq8kbTCXu0Mr7BDRWNPmlw6Xb85AJkEUOj7g6pH5u/guJcl3eNynBawJ0kvAQLu2iCfNIzD32ez8+RyYGo91lbFeyHR4eUsNNTuqQCegffApMzK7kZTCpLJqn0/laNF84r0Rj7fWg+YFCYj2+J8fuMJxrasV+/nJJOo9WtOGtFVdM3ibwzLcYVaCmIGGBUI7e0PZw2iuDfpvcr7eJFR1T4ptCA0n2gnifCYJusLmFSWRHbOkNl9tc4uoqFD19KPwb5NA== Content-ID: MIME-Version: 1.0 X-OriginatorOrg: sct-15-20-3174-20-msonline-outlook-a1a1a.templateTenant X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PNZPR01MB4415.INDPRD01.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 9e6aa2cc-5e89-4526-0a1a-08d9b30c3c99 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Nov 2021 07:45:38.6112 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PN1PR0101MB1821 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Aditya Garg Bluetooth on Apple MacBook Pro 16,2 is unable to start due to LE Min/Max Tx Power being queried on startup. Add a DMI based quirk so that it is disabled. v2: Wrap changelog in 72 columns Signed-off-by: Aditya Garg --- drivers/bluetooth/btbcm.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/bluetooth/btbcm.c b/drivers/bluetooth/btbcm.c index c1b0ca63880a6..ab7b754855d8a 100644 --- a/drivers/bluetooth/btbcm.c +++ b/drivers/bluetooth/btbcm.c @@ -354,6 +354,15 @@ static const struct dmi_system_id disable_broken_read_transmit_power[] = { DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro16,1"), }, }, + { + /* Match for Apple MacBook Pro 16,2 which needs + * Read LE Min/Max Tx Power to be disabled. + */ + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "Apple Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro16,2"), + }, + }, { } }; From patchwork Mon Nov 29 07:30:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aditya Garg X-Patchwork-Id: 519115 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12153C433F5 for ; Mon, 29 Nov 2021 07:32:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239526AbhK2Hfs (ORCPT ); Mon, 29 Nov 2021 02:35:48 -0500 Received: from mail-bo1ind01olkn0144.outbound.protection.outlook.com ([104.47.101.144]:31217 "EHLO IND01-BO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S239922AbhK2Hdr (ORCPT ); Mon, 29 Nov 2021 02:33:47 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mhONl4x9Y7Bkt0faYqGVTESLJ88pTp3FO5/0MKhoUtixswyxiS7MaLNU8xa0RksdR+SVB24Lne9VZrEKLvZ94EEoqKHu4pkxnOeqOGurUXA2FSf2pOZanjOuAMCzY3RN319pqMlAudGxcwrk6zJ7DU9xHIIHPv0suB1WCzo9h/2LlUjfFMS7KThlrXfWNP2S11BDveTIRJi4mu96qE2mNRlw4WdwJsTNTZgx1IsPfQ/GRUmyWswI9hJZ3fVxcv96XauaqvsYRTwnoWdRCuGpK4RneOF9wz3t93xT7/HRE6XkBQhe8putswA4/vZ/8BQ0/SvevtzapYV+mdTAxC9Gaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=mBOpIZQrppyIhhKD+IeNfX3v+GIOMzBax3GPQID51yU=; b=fdeKN42tJKIahHCWurYjFKvv5b8UisQoDtQDF7e9ll+wvkCxi7fGCp8VJRhnVEnGxjMHiHHW2VfKHli6751Z15hFo+xPWx72CQqN5YRpQ799xYbNGSRi/jlrmam4DNOYJ3lZGEIVEd1VJRCgLCgCIjtvc23n+VJxK0qkzXzvAi1+iqip+ygT8pa6588wd4/unjkagXt/vD6mFm2H6zIp8DosYj4SNNL9sDFS6hgAqAd9n0c9OaG1Z1z5wwi4l/dPmLq0cGTPX0aW+H0rjtIh4oDx260rA+arwbI5YBEkNZSc8sc6H+FB3sPOjsqbAx7JMqmjH8RYTjzDrtcQND7k6Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=mBOpIZQrppyIhhKD+IeNfX3v+GIOMzBax3GPQID51yU=; b=MOGUL0G4Uied6c/c/ocynWt1KshtxqeBKNiao059H4XIwdQcTfhzEnvtPtPyKzbhhtBaOf0m0vgxDqH78sss8g5bHqwoMos91S6emrAxbYwZeHbDrwfu1vT/KG4nlbgWSc6PtyJJbI4PrGMf0rm7KtcK/7SBZWOEs1ko0ugbw+Hut5h7JBH0hbd0ejCX5ehK17WzXBjoB+VWejRyNaqcZMyyGL7z6bpipBI4Rh5W1S6sYkPXdRAHW1AIFlfiXC63UcDvX6eBbCDRcIK9jQ1AB8iY8g7bDO8I2P7gLu69d+qGvVz9nExLfkzSivhEEvs/baepJsK1+4hqiSsxKXIkHQ== Received: from PNZPR01MB4415.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:1b::13) by PN1PR0101MB1662.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:18::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.23; Mon, 29 Nov 2021 07:30:24 +0000 Received: from PNZPR01MB4415.INDPRD01.PROD.OUTLOOK.COM ([fe80::7ca6:9165:19ec:4cd7]) by PNZPR01MB4415.INDPRD01.PROD.OUTLOOK.COM ([fe80::7ca6:9165:19ec:4cd7%5]) with mapi id 15.20.4734.024; Mon, 29 Nov 2021 07:30:24 +0000 From: Aditya Garg To: Thorsten Leemhuis CC: Marcel Holtmann , Orlando Chamberlain , Daniel Winkler , Greg KH , Johan Hedberg , "linux-bluetooth@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Luiz Augusto von Dentz , "regressions@lists.linux.dev" , "sonnysasaka@chromium.org" , "stable@vger.kernel.org" Subject: [PATCH 4/6] btbcm: disable read tx power for MacBook Pro 16,4 (16 inch, 2019) Thread-Topic: [PATCH 4/6] btbcm: disable read tx power for MacBook Pro 16,4 (16 inch, 2019) Thread-Index: AQHX5PL5As0z3EQYbkmkPAL7i0mDog== Date: Mon, 29 Nov 2021 07:30:24 +0000 Message-ID: <3E9D8424-A65C-4211-B5E4-B6D62400E711@live.com> References: <20211001083412.3078-1-redecorating@protonmail.com> <70a875d0-7162-d149-dbc1-c2f5e1a8e701@leemhuis.info> <20211116090128.17546-1-redecorating@protonmail.com> <3B8E16FA-97BF-40E5-9149-BBC3E2A245FE@live.com> <52DEDC31-EEB2-4F39-905F-D5E3F2BBD6C0@live.com> <8919a36b-e485-500a-2722-529ffa0d2598@leemhuis.info> <20211117124717.12352-1-redecorating@protonmail.com> <40550C00-4EE5-480F-AFD4-A2ACA01F9DBB@live.com> <332a19f1-30f0-7058-ac18-c21cf78759bb@leemhuis.info> <5B9FF471-42DD-44DA-A9CE-0A83BA7A4212@live.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [YHhy18QfjCXPvGQP/fh+3mJH5s5ipxTm0koxojFY5h7t2tbijOs1hNKJtOEO3xMn] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b588e600-c6b6-41f0-df08-08d9b30a1bbb x-ms-traffictypediagnostic: PN1PR0101MB1662: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: D/5CTJPPEJB2+G3XwbJ16wfxoK0iS+hPqTQeIkLdd2HFdV7MUOi8C6D/cN8YPN1Yzy3fVARGVFOk86KVxX7MJ036zqEwSx4+m6Q2/QCnrP8bdOV4rdE7xUYXIM+5nUK+/aPSPwCOd8N6UGzqiE+a0/dWdFvCHnidvcQL/ktO4zaQHi823mNbu/JRgtjbJwvqVBHxiqs9QjtPg1p+ASa9kN+Pa8Qdk5TrB3ARMb6WrOSHluAglklWjbhNvif1NZtjdjZ/BLIZfSSlsQq9/gHqf0MF/Z2rEVy+1z5jYx9v7TqwDswB5f1A0FgpZz+CFDV/uC2wO82JvmhjcggiOYpUU4gN0evjGfT4ZRykTRcxdsjXFjfMkIWoLjV7+g8oovxW50gNq+f9ddQ4newOJvgO2uP5gKGl6xmJOfWlnvydrbXlzyHgIQ6aYFNeSeYqYviH9fNpz8dKONO/Zhoy7vqERLOrzmgpwqLXMzmtaGFtlcztsma7pABcLRRhyHoaQV2avIPay/ftm8PjEPsaOoARqMVSfy+KJO971WMTID023Kt3ZqWHZJuLoyDy7n5BVEkh3Qmj1H7saHswAGuBPCpwmQ== x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: R7QZAs6xOapVuVYneOFpY/ycXtT/zi9x6WVRdB4vNmoDPxVwLSx4kcKAw1vya1yMJ+k+GXACbE3nnG7ZamXZ4sd/e46w1ZAaj0blPTSe0Bx6+OdTH1vChnB+cLPVkZcepF7/H6Bcs5gV0GQZEc5AnBT+klxasvkwKb1U9i8sgCklIV9mOYcs2tgPT7xI/zhuL0UQdlPPVS6DoVYi38d9M48CuMbQQRj4HAbFSF75XqN8GNUP8nDklzKayZi+sIU5AxSbfOwb9dpKWeo0cE1xiAoZernTNPzDjk5HqqSG+5hO+tD2ZEJeCB7lAV8S0oPkiW+DcU4hgKnM1Tqz4plKhqCKnRyhTT+7pS4kZ6zrmDw5XnIr3mocdzqRk5szgckMmYkZKGK+zekZTh9ibMpwbFErk/0Wv0HMPScmLVOX18+reAdaf57fqZEOz+Uw5qlNYUecr8qzot01UeSmufh/Z9b4UAR3qWDySqDjSUK3poIu3sWge/3YTGQwEcIcHw3c8jDGnzvUYyfmynYIkCnLEFz1Pr8RGXmGSsvLgvTfwTg7cyG9YA9e+9vnnnvK+dE1v6UvNFV9vfM7y/EaFAY75g7lVHtM4uKGEp4LRJBnpu5LcZUN/fDa121pLL6lj0hLZSSuaqlayytTR0G5RlQowsdV3Yry4GnMCU6DXnaxYBNDawH0qdVVgPShXMJaRkIxeY4BaChehKGleLKX4esUu9onR9QFPItw8Slt2zS/51izjN43mHilbdF6eI0NWopeMdQGzjPN6aNby0Ta/dqZSw== Content-ID: MIME-Version: 1.0 X-OriginatorOrg: sct-15-20-3174-20-msonline-outlook-a1a1a.templateTenant X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PNZPR01MB4415.INDPRD01.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: b588e600-c6b6-41f0-df08-08d9b30a1bbb X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Nov 2021 07:30:24.5619 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PN1PR0101MB1662 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Aditya Garg Bluetooth on Apple MacBook Pro 16,4 is unable to start due to LE Min/Max Tx Power being queried on startup. Add a DMI based quirk so that it is disabled. Signed-off-by: Aditya Garg --- drivers/bluetooth/btbcm.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/bluetooth/btbcm.c b/drivers/bluetooth/btbcm.c index 348a4afa0774e..88214b453b0ce 100644 --- a/drivers/bluetooth/btbcm.c +++ b/drivers/bluetooth/btbcm.c @@ -363,6 +363,15 @@ static const struct dmi_system_id disable_broken_read_transmit_power[] = { DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro16,2"), }, }, + { + /* Match for Apple MacBook Pro 16,4 which needs + * Read LE Min/Max Tx Power to be disabled. + */ + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "Apple Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro16,4"), + }, + }, { } }; From patchwork Mon Nov 29 07:32:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aditya Garg X-Patchwork-Id: 519114 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8BE24C433F5 for ; Mon, 29 Nov 2021 07:34:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239888AbhK2Hhw (ORCPT ); Mon, 29 Nov 2021 02:37:52 -0500 Received: from mail-bo1ind01olkn0144.outbound.protection.outlook.com ([104.47.101.144]:31217 "EHLO IND01-BO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S238618AbhK2Hft (ORCPT ); Mon, 29 Nov 2021 02:35:49 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Q8FS8WQopda2xCZP5RJCGFGwxsr0TcH5hpqqKC7gwXYDFoY2/KAfYjrOYOnSe/yYMkoTxxIkAvX6/a/MIoB3ajOQoWoCYKzwGKppvsHP79KSXgXWVp5j24EB+otL8KdvsoWxzMkU1DMODRBE5PZ0CyR6vIXeLwXU0I5ehi2h5P55dw4qT8foaUuiorCZ+VvabxEwvI6GlyKe0Inn+1G/R2ShBPff/43IDU1KmHxrMqmXB2WgnXI/NbjEoVDK3v3rz8wlXu7T6wtWe/2fu5Z5bKf9S1wOhpPuidl/rlSruF4pWfk0bRjn8YdzrseTE5u+yixKluIoaa3E+TPCjnh5Rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=RkH27gCEV+OD6JJHa+O51Ed3T2E7qY5Sx4nj3Id7qb4=; b=l5dCHLHUaHXnO5cmqQRTw0toXoT8zIDhBF5H/d1ND/CEXb5xEiTbwIuGIOPE2gBmDtBoruPUUMQA2CC+asZQKtb6M1YwBTiSsigRoQozYWcCuPQ36IGNEKRv1DWB5E6AA2WXLgt09En/umG9fSiWtRQBMKt94lIqRfq3+w5ZV0WAQC7zFyCSfQI5PT7KAjUMVmJJ11raF6FOZ+iAb917aqskAW2OlYJdC8pxrHQf8pNi9/QeC83CtwPuqZjk/XAWbHvFavKeuZlqAgFp+oxLuNM4TGpT6HZMbpN56d8Yk9CzEJhlNWJx2ygivrY80ZbUYDhT0RKfQmSHVv3zGEfUag== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RkH27gCEV+OD6JJHa+O51Ed3T2E7qY5Sx4nj3Id7qb4=; b=gjB4z7xMU+P2V0JmAFGYBSnbA0yEbMBqU2BTy+Kf4yVt+LFN30I/ClQNQ8q1UEOE5t2CH5sLJt5zczoIh9ZWPkyYFNIUE7ozT1nphWDAZGMo+wI+eusemIJ2iNsPEibPF9eKwMugxsHP31m94e4aRNBM4DfC74Pk/cEt0G5TzVS+/JaJPPN9secfxF0cxX6cTLG0Ygki9O0xRneNrXc1VDVvuypyg+L6m9Vm5nXs2mwZ+yVbdhZ0ioqp6oBUVG/UBe8RGibYhjoRUoKH3WHBNXC2EZpa8FARrEcCtUSzj0kCPRf9tsC9K3RUNlcjZltmeKDLfpeTbFCD7ne3ULbgaw== Received: from PNZPR01MB4415.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c01:1b::13) by PN1PR0101MB1662.INDPRD01.PROD.OUTLOOK.COM (2603:1096:c00:18::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.23; Mon, 29 Nov 2021 07:32:24 +0000 Received: from PNZPR01MB4415.INDPRD01.PROD.OUTLOOK.COM ([fe80::7ca6:9165:19ec:4cd7]) by PNZPR01MB4415.INDPRD01.PROD.OUTLOOK.COM ([fe80::7ca6:9165:19ec:4cd7%5]) with mapi id 15.20.4734.024; Mon, 29 Nov 2021 07:32:24 +0000 From: Aditya Garg To: Thorsten Leemhuis CC: Marcel Holtmann , Orlando Chamberlain , Daniel Winkler , Greg KH , Johan Hedberg , "linux-bluetooth@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Luiz Augusto von Dentz , "regressions@lists.linux.dev" , "sonnysasaka@chromium.org" , "stable@vger.kernel.org" Subject: [PATCH 6/6] btbcm: disable read tx power for iMac 20,2 (Retina 5K, 27-inch, 2020) Thread-Topic: [PATCH 6/6] btbcm: disable read tx power for iMac 20,2 (Retina 5K, 27-inch, 2020) Thread-Index: AQHX5PNAeslAiRbqaEqN39DGKwYeHg== Date: Mon, 29 Nov 2021 07:32:24 +0000 Message-ID: <8E63B397-FADC-4FD2-9C90-B4F09C5498A1@live.com> References: <20211001083412.3078-1-redecorating@protonmail.com> <70a875d0-7162-d149-dbc1-c2f5e1a8e701@leemhuis.info> <20211116090128.17546-1-redecorating@protonmail.com> <3B8E16FA-97BF-40E5-9149-BBC3E2A245FE@live.com> <52DEDC31-EEB2-4F39-905F-D5E3F2BBD6C0@live.com> <8919a36b-e485-500a-2722-529ffa0d2598@leemhuis.info> <20211117124717.12352-1-redecorating@protonmail.com> <40550C00-4EE5-480F-AFD4-A2ACA01F9DBB@live.com> <332a19f1-30f0-7058-ac18-c21cf78759bb@leemhuis.info> <5B9FF471-42DD-44DA-A9CE-0A83BA7A4212@live.com> <3E9D8424-A65C-4211-B5E4-B6D62400E711@live.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [rbmKKae7n0rYxAWJMHFlc/KhwDJ5GSRzAQ/2/qUbk2lmr+g4v+cQ/EDoYQkrl/i9] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 49584d43-29e9-476f-436c-08d9b30a6313 x-ms-traffictypediagnostic: PN1PR0101MB1662: x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: mcdgbXAD2ZsKVmfdvCyMhpewSt1Q1568hl2i91G8MTQ9MVHyiHpGDASOnhZA5xo6HzxLKxGapBQQv4sfLViP8GcSMmGGRvGUbDVpRaocdnqJCwtSl3ia/3dUyyBG6axGvGFfkDxEHjM17HOOMMX0hpjSfA/2Un17w/1aWx13i4rJbpwxV6QayyB42FNUzEicPey9zlAfAcmf+O3uHF1Uy2x7TkB3fCygWIU8pvIi2SZBkvPHFw1Dlb7eDizfzo3uxFYv8nQwtrk2wcDP0aCmxzUxlLeUbBsbv7ivP7IPZSwPN6Z0BYf0XVsVlXhkZSg0chIWhuz2rO3H7h1EAJOLxoqX+rsMzSq/4OlTmGqDQm3niIewCFqaVZh9tHBiQjs+ySPgX06kKx5udia4fUwfbvF5FOrNI+r3Ufy5m7lGmOgRwZ4mkxSqq0xfHsVYVBMEaEkKqBz2Ca53dj59tJ+jKIBzwwHC6n7YDSO9W4pwTURzehsFO9IZVBoFdym0QaXJnG70ZvNh+XQcwecbTV5qLgcA70KK4coaggtA3L2tDuI5WWAjCp9ev+5IGtoS37j3RAtmuuaf/BFk3na8Ey/MXA== x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: LEWUmfdJOndhqsovCfECzViSn01v77GCoR5tAk7IK+aVms/BN0bzdfOuoUdVOdIU3JhmGrkeT3WhuUZY+NKWZtYiEGLYOmLIoRhNxsZMZ4SeES7y36hmTtYLSIOIjOkL076vWY8YoQXKWK4YS3aEtCxq8bjQ6ZLGJhx+Gsq+rWC1AY2TW1V289qcEJLPkgp5w5cEahahjrM6sE1mEVbjXGRW/d+teuGhrSnzKYkAHFbi4JIfHgTbxoR+GReEb1GmdkRAhKX56D93uuOo3fpPUBGOBihghlVVRR1WT9jlYahO3S0D4PVIOf2crmu4KNlABq8WjDHmLg4SXVtqTYUu39gz0/6/t0qwNxSl0w8EEww9NxXkkuDg+uvfBCCq9LCFDtjSUTbbom6Qx+8dF4uUlCCZb5gljl4XA8+UcWlUfZ/TD+g0jCjuZ4Pfk0aZOVhqCBavANVd7tOsa5PCVXlmOS/W1O09fmKr/EvtrwSVG1eh104MvKmVfOc9TRf5oJu1DBwmxAXFScjPLaH+mVcAOnrKlM2g4AF/rdxY5FFO5RIWpacYFF7p+ce+xxy0W6MjMOg4ZobuXfjivyQz+YGtapzNWtjt9ndcpxa5+/yG5hx9bF0ly+rrZzncI6q4aD/o4ZignYxfvswpfC8P5gA6gJB0v9Cayc/R143ogXVVUBE9bXF1mAjjpAwsFvKZ/YKt7ZtqCDHNhpxjpi0VNm2g6RVNrHX6gzEWkcEcqPOkph1M5ovQ1E8SPjga+7Xd8H8by41Q7hUja3oE2KhxJlI/sg== Content-ID: <78A1319314FF5D48B2BD956C0A1C1864@INDPRD01.PROD.OUTLOOK.COM> MIME-Version: 1.0 X-OriginatorOrg: sct-15-20-3174-20-msonline-outlook-a1a1a.templateTenant X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PNZPR01MB4415.INDPRD01.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-CrossTenant-Network-Message-Id: 49584d43-29e9-476f-436c-08d9b30a6313 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Nov 2021 07:32:24.1782 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PN1PR0101MB1662 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Aditya Garg Bluetooth on Apple iMac 20,2 is unable to start due to LE Min/Max Tx Power being queried on startup. Add a DMI based quirk so that it is disabled. Signed-off-by: Aditya Garg --- drivers/bluetooth/btbcm.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/drivers/bluetooth/btbcm.c b/drivers/bluetooth/btbcm.c index 15c5be927c659..601337b5a5130 100644 --- a/drivers/bluetooth/btbcm.c +++ b/drivers/bluetooth/btbcm.c @@ -381,6 +381,15 @@ static const struct dmi_system_id disable_broken_read_transmit_power[] = { DMI_MATCH(DMI_PRODUCT_NAME, "iMac20,1"), }, }, + { + /* Match for Apple iMac 20,2 which needs + * Read LE Min/Max Tx Power to be disabled. + */ + .matches = { + DMI_MATCH(DMI_BOARD_VENDOR, "Apple Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "iMac20,2"), + }, + }, { } };