Received: by 2002:a05:7412:40d:b0:e2:908c:2ebd with SMTP id 13csp334917rdf; Tue, 21 Nov 2023 04:17:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IFMVUPxXs76FuJ0Zp2w+le45hAZwW7V2gL2ZVGdRmjY4YomwlhX9NfGzcbfv3H+GNU8gTXh X-Received: by 2002:a54:4096:0:b0:3b6:daff:f502 with SMTP id i22-20020a544096000000b003b6dafff502mr10581099oii.58.1700569031434; Tue, 21 Nov 2023 04:17:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700569031; cv=none; d=google.com; s=arc-20160816; b=LIR1LEzkgAYEP9nyAKONEoXl2eROf7KMJhy3CXzH2MUbrigHtr6gJNAfkqeoRU6E2G v9m1Mz6i8ewpA14KBANIAPo/MWt0tASIha7AXmc14Jin1C6iHzqmBLy/EPkJuay4y3Xo 0YdZpvAG5Q8bICYoL6m9tpYEAwcvf7xMMBXYFUWAtNxAozbQi6xlwVKUKcrlEwdKJ6jr FCk+BFgLXl8/uEBTgtS58JuAA5q73xY7pGhGagXCO1sODCJsZNimATSHzBOoeyUb9tDM KXmZ/bCLMgyE+2u1eYFPFN0vKuFWRmsvmy5389F5lsTGo9MAAMgd1RTc5zNmSqY9G0Yv 9WBw== 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=SDfBS5q6cDTFSlV16iOv844qhbpjQ+ynxtdhphkjWrQ=; fh=3QOKGXxfBB7h7PGttQjFyMO8pZeC9UwdD/ORhgTNRDo=; b=EjimiJVhV4SinWu1d7CbV96nhxS8vJ/qBUVjEx+pb2onzjSG4/04o7x/SblfHhnM/D Kg8ZTW/pLLko0qnT60le9glFAdsDrpem6VXjThEw+mD31iAKLxou6audMp+C5c5g/3WO 8uwy0VqDJRNi29jeYdPBzIOuNOI/qGUIRqGYzMtM+sozFJf+not74qv29LCytpMJPG4D mi1fVyF4adO0uxDGhIUv+8t67O+lF86+CjTZkMNvrqeDQPAiXQ17wWQnBYvtxueJa+HY 6lBrXHOdNGFkCt88Fqd1n82ARTpGY0sPI7SX65MpEPn4IgTVrr2CQ6c8dhejiKq7Hkjj 4x9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marcan.st header.s=default header.b=r2IeCQq4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=marcan.st Return-Path: Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id q11-20020a056a00150b00b006cb4c6074c8si7671272pfu.311.2023.11.21.04.17.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Nov 2023 04:17:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@marcan.st header.s=default header.b=r2IeCQq4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=marcan.st Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id 738378080E3A; Tue, 21 Nov 2023 04:17:08 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232235AbjKUMQy (ORCPT + 99 others); Tue, 21 Nov 2023 07:16:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230428AbjKUMQx (ORCPT ); Tue, 21 Nov 2023 07:16:53 -0500 Received: from mail.marcansoft.com (marcansoft.com [212.63.210.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7E987137; Tue, 21 Nov 2023 04:16:49 -0800 (PST) Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: marcan@marcan.st) by mail.marcansoft.com (Postfix) with ESMTPSA id 4C73F41D83; Tue, 21 Nov 2023 12:16:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=marcan.st; s=default; t=1700569008; bh=iMeRzervuoudDuGdhL6yX2feFImvQm3SAtDHF37I57s=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=r2IeCQq429ic+JyT9x/9Ch2c+AqAnZ2/FRs8iJmEjkL5FDbywPnA8ojG3Rjd9q1w7 p8qCWUCIcbEJhe1F+aLxTAXUlvmwNTlQus1DMprVEqaRatWfi6i673AHnZaQ5Lj68t iXRTwlXGZioyvc62UBVZ29XnGCkD6a/F5H6o8LOQT6UxpqJik76oxJaWwWqHxtHkKF zfrOW8pd5gKp9V2tZXqehSeJuWO09yunle0lRdUDfoMOhpQKmv2hOtPi0zLBH9XHTZ ii6X/0OfRUjOFjuJkZdM0/wKrcjqUwJYwK2CwwnzzFWIm1HqzzZcnoRBAXvaQyV4+E kZ83sgdG3BEtQ== Message-ID: Date: Tue, 21 Nov 2023 21:16:42 +0900 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [REGRESSION] Bluetooth is not working on Macs with BCM4377 chip starting from kernel 6.5 Content-Language: en-US To: Aditya Garg Cc: Bagas Sanjaya , Sven Peter , Alyssa Rosenzweig , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Orlando Chamberlain , Kerem Karabay , Aun-Ali Zaidi , Asahi Linux Mailing List , Linux Kernel Mailing List , Linux Bluetooth , "j@jannau.net" References: <22582194-DE99-45E5-ABEE-C1C7900DA523@live.com> <88fcc70e-9f4b-eeb9-d826-03fa4c40e7c3@marcan.st> <6574A65F-3C4D-4E26-8848-F12C38668478@live.com> <03cdd06c-3991-dbf8-6068-e76384db8240@marcan.st> <0900292C-5E74-471A-B789-A1D35D1BBBF7@live.com> <3b5aedb4-da00-4ae2-a60f-685dba949223@marcan.st> From: Hector Martin In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 21 Nov 2023 04:17:08 -0800 (PST) On 2023/11/21 20:42, Aditya Garg wrote: > > >> On 20-Nov-2023, at 4:37 PM, Hector Martin wrote: >> >>  >> >>> On 2023/11/19 4:31, Aditya Garg wrote: >>> >>> >>>>> On 14-Nov-2023, at 3:14 PM, Hector Martin wrote: >>>> >>>> On 14/11/2023 18.03, Aditya Garg wrote: >>>>> >>>>> >>>>>> On 14-Nov-2023, at 1:28 PM, Hector Martin wrote: >>>>>> >>>>>> On 14/11/2023 15.59, Hector Martin wrote: >>>>>>> On 14/11/2023 15.23, Aditya Garg wrote: >>>>>>>> >>>>>>>> >>>>>>>>> On 14-Nov-2023, at 5:01 AM, Bagas Sanjaya wrote: >>>>>>>>> >>>>>>>>> On Mon, Nov 13, 2023 at 08:57:35PM +0000, Aditya Garg wrote: >>>>>>>>>> Starting from kernel 6.5, a regression in the kernel is causing Bluetooth to not work on T2 Macs with BCM4377 chip. >>>>>>>>>> >>>>>>>>>> Journalctl of kernel 6.4.8 which has Bluetooth working is given here: https://pastebin.com/u9U3kbFJ >>>>>>>>>> >>>>>>>>>> Journalctl of kernel 6.5.2, which has Bluetooth broken is given here: https://pastebin.com/aVHNFMRs >>>>>>>>>> >>>>>>>>>> Also, the bug hasn’t been fixed even in 6.6.1, as reported by users. >>>>>>>>> >>>>>>>>> Can you bisect this regression please? >>>>>>>> >>>>>>>> Since I don't have access to this hardware, it's not possible for me to bisect this regression. Let's hope someone is able to do so though. >>>>>>> >>>>>>> It's not a regression, it was always broken. I'm sending a patch. >>>>>>> >>>>>>> - Hector >>>>>> >>>>>> You are quite likely conflating two problems. The ubsan issue you quoted >>>>>> was always there and the patch I just sent fixes it, but it almost >>>>>> certainly always worked fine in practice without ubsan. >>>>>> >>>>>> The Bluetooth problem you are referring to is likely *specific to >>>>>> Bluetooth LE devices* and the regression was introduced by 288c90224e >>>>>> and fixed by 41e9cdea9c, which is also in 6.5.11 and 6.6.1. >>>>>> >>>>>> If Bluetooth is broken in *some other way* in 6.6.1 then we need a >>>>>> proper report or a bisect. Your logs don't show any issues other than >>>>>> the ubsan noise, which is not a regression. >>>>>> >>>>>> - Hector >>>>>> >>>>> >>>>> UBSAN noise seems to be fixed, Bluetooth not working though >>>>> >>>>> https://pastebin.com/HeVvMVk4 >>>>> >>>>> Ill try setting .broken_le_coded = true, >>>> >>>> Now you have a probe timeout, which you didn't have before. That's a >>>> different problem. >>>> >>>> Please try this commit and see if it helps: >>>> >>>> https://github.com/AsahiLinux/linux/commit/8ec770b4f78fc14629705206e2db54d9d6439686 >>>> >>>> If it's this then it's still not a regression, it's probably just random >>>> chance since I think the old timeout value was borderline for the older >>>> chips. >>>> >>>> - Hector >>>> >>> >>> >>> Hi >>> >>> I recently got a kernel tested with this patch as well as with .broken_le_coded = true, >>> Here are the logs: https://pastebin.com/BpfJuJKY >>> >>> Also, without .broken_le_coded = true, the bluetooth doesn't work, as specified in my previous email. >> >> So are you saying everything works now? If not, what doesn't work? >> "Bluetooth doesn't work" isn't useful information, especially in the >> absence of any useful error messages. You can't just dump dmesg logs at >> us, you have to *describe* what the problem is. >> > My bad for not specifying that. The user reports that the Bluetooth device is not recognised at all. > > Also, broken_le_coded = true did not "fix" it. > > Talking about dmesg, well not getting any logs regarding this message indeed is a frustrating thing for me, and bisecting seems to be the only option in my mind rn. > What does that mean? The controller or the device? Can you initiate a scan? Does it find any devices? Is pairing broken or just connecting? Was the device paired before or after the breaking change? *What* device are you trying to use/pair? What do these commands say? $ bluetoothctl show $ bluetoothctl devices Since the kernel isn't logging any errors, have you looked at syslog to see what the whole userspace side has to say? If an operation is failing *something* should be logging an error. *Please*, we need proper detailed bug reports if you want this to get fixed. I'm sure you're aware of what a reasonable bug report is. Please teach your user how to provide useful information. Otherwise yes, it's going to be on you to bisect it since there's nothing we can do with zero details and useful logs. - Hector