Received: by 2002:a05:7412:b130:b0:e2:908c:2ebd with SMTP id az48csp2135939rdb; Mon, 20 Nov 2023 03:07:51 -0800 (PST) X-Google-Smtp-Source: AGHT+IEiSPzeElTz677RievneMjmPkDvXoVMM2+EjdZWS7q0d8a8iIFyouXztTH2vJIEXmotd6xN X-Received: by 2002:a05:622a:1790:b0:417:9c63:391c with SMTP id s16-20020a05622a179000b004179c63391cmr8819943qtk.52.1700478471465; Mon, 20 Nov 2023 03:07:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700478471; cv=none; d=google.com; s=arc-20160816; b=bqJy2g+LY+P+/uoWKvihgn9GBNysYa7X6sHK9adduU+EgSboPuYzcL+zrhdYW5Zqiu JPXah0LY+TcyV6oA2iNivkfZbjuxJMzXCjxstdGz/TcwQqJD7CJqHhMVl52Fhhi8XROb kcDt7n1X4abX1o3HzW9FcJNO4w//rpuW+fGIGM4unu/Ep98ETp81z50KzkdUZZ/O5s7e U6yoiCaUD1x/sBpW3n91ITjOnWbmssyM+HSyieY3BMdyPjZ7gDZzQqru1SAI/LO/K5bv QxIJrNAaOx3ryE6N/NVU0dOdUwkZZscg+y6c3kNcxQxdlUfQObnu7MtKX6IZ8uSNQI8f DaFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=qyfoPIeRur2N8JH90SrnAjjMznAlfupQUgl1vXzpGn0=; fh=3QOKGXxfBB7h7PGttQjFyMO8pZeC9UwdD/ORhgTNRDo=; b=ZRclgEplDP6HnYnpG7cVMOSencZ9QFBTPhJrMwGm6BhWaHSdYHjvZ+K+ltVyFrV1Bq r/ijesi9XT8qRnOubqvykJC28SnnWgn9SmBOfClWLWli6NJHHn4iJwSuw5YBwIRXBymM RN5hqCVXgE5SYPk15HeYn3DydWhmPhPyXW1jYkCLvd4G6EK2JrxFCQvYxKk0XEsYKnbj 4ujYQgXRHn9MPCmDXoAbFp+pylsIcAJeayjex9zUtQtWuFFCaZBH9KRWC1T//w/7hiir Eu6/aQRnkJMbLKr4MoY3RIfnS/1P/jmpLDudllmv8sHzrS2SIHA6c4pCat0hZoyNjvd+ ixhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@marcan.st header.s=default header.b="BZKXe/i2"; spf=pass (google.com: domain of linux-bluetooth+bounces-128-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-128-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=marcan.st Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id y12-20020a05622a004c00b00419856ea1casi7426073qtw.123.2023.11.20.03.07.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Nov 2023 03:07:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-128-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@marcan.st header.s=default header.b="BZKXe/i2"; spf=pass (google.com: domain of linux-bluetooth+bounces-128-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-128-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=marcan.st Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 3D2D01C20EE2 for ; Mon, 20 Nov 2023 11:07:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4E174134B3; Mon, 20 Nov 2023 11:07:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=marcan.st header.i=@marcan.st header.b="BZKXe/i2" X-Original-To: linux-bluetooth@vger.kernel.org Received: from mail.marcansoft.com (marcansoft.com [212.63.210.85]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9A1AD4D; Mon, 20 Nov 2023 03:07:40 -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) server-digest SHA256) (No client certificate requested) (Authenticated sender: marcan@marcan.st) by mail.marcansoft.com (Postfix) with ESMTPSA id 766F34195A; Mon, 20 Nov 2023 11:07:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=marcan.st; s=default; t=1700478458; bh=StbzyAS5+LLhtN73q/gFPznopbGCKLhwnROcQMkw3Hw=; h=Date:Subject:To:Cc:References:From:In-Reply-To; b=BZKXe/i2Iu9fxFblxAq/aMYbruLvqE/BYFshIMAmLgr1icRClZBpLOmCVRcVZt+g5 JTC2ZsCZGPCBOiJKKMQX7WeGvbRhWgKY7Qv2rxJHTNcUL2Gc357hnq38wwdU0bNqph suSgy0SSE/YK5UWxiz1rH7nwfxy64lAj/Zc/hjkWJYLId0UeE4vfmBRdeGtkgYZwIP IMvqBxg1s9vqRTUGTkxbgEHDZCxV+6vEqoJ5BDuGKQKu/NRWK7Sjp8nJi/P2/gLRdJ 1u07INrpu/vgeDgPdF5UBq8J+s/AeeEF7lZvqRWONGtHBLJ9u40eiptteIxz5Rch3X hyC0kJlGOjSbQ== Message-ID: <3b5aedb4-da00-4ae2-a60f-685dba949223@marcan.st> Date: Mon, 20 Nov 2023 20:07:32 +0900 Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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> From: Hector Martin In-Reply-To: <0900292C-5E74-471A-B789-A1D35D1BBBF7@live.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. If broken_le_coded = true "fixed" it then "bluetooth doesn't work" was a terrible bug report. What that quirk does is make *connecting/pairing to Bluetooth LE devices* work. Non-BLE devices already worked, the controller worked, scanning worked, etc. All that is useful information if you want to get support for issues. We can't magically divine what's wrong if you just send us a dmesg and say "it's broken". We need detailed information about exactly what works and what doesn't (e.g. the controller not showing up at all is VERY different from it showing up but not finding your device). The only reason we guessed this here is that this was a known issue that affected other chips. If we ever run into a 4377-specific issue that only you can reproduce, "bluetooth doesn't work" and no error logs really isn't going to get it fixed. - Hector