Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp3906121rdb; Thu, 28 Dec 2023 04:11:07 -0800 (PST) X-Google-Smtp-Source: AGHT+IFY/IKRhCm/JQDef7gBHQu76Y2s7LseOIeKwsRNSF6cMBIzTBMZR3bhL6dGtDg6QDwktdAD X-Received: by 2002:a05:6808:3615:b0:3ba:1042:aee2 with SMTP id ct21-20020a056808361500b003ba1042aee2mr7503229oib.72.1703765467293; Thu, 28 Dec 2023 04:11:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703765467; cv=none; d=google.com; s=arc-20160816; b=BcCQba9ZzR9k6mEQ52Mji68AUk1YznGnqj/gkx4v9uStHJDLv393+FQinCbqEiiiy9 MEQQoG5E/6e8cGlWPu9TrMf00QcIHJN32sJEB+c22s0OkpaqgEEPfvLaAS+XHP9a6Gft 2ODVyy8S6hoZvhKeCeMSysIkXqSu9RqjBnYJ4R73c8jtCtrx71Y+QU2m+sLYTkAKbk+/ EszTIMySa7/vxSTdTee4scgtVHf3aWkC3DwIwIYgEPZKmBjDpm+1oNEsj2cHU/6ijvwh XHoehX70tORQhaPhkp9qREHmsW5rLsuymAU7x65HObGrZYMv7fK/nF3Q0ipReeGRGRvA ktmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=nnxTLtjGYbMc+vRKJBlsTCusONucxwSHF+4sjjtDQE4=; fh=4NIq2AHWKOe1KdijZQkdmbwXgo7jawexbu07gl26Ceo=; b=YSCJy5qhdkzALsstjRxGtQ8+H9AgcrAv93Thu6OV9EsMlXzCFZM/5Dsxgy2rjMar9S 27oJfMQPP9PvC9f3gFuUnP7q68AYRKbYmdhWXCXjuYgUkOqSepdlZJytvYYzoZ5NRyTS p0Sx07DycEphIAB169xYX0NCvSzetsbJxs6eS1/8b8nqNq7JE3cSwtbNGn74suIuOdUn O3o0NhSqWNRm1BaiMB9D4/kIa2pruEiYInGIIDVB1g2LQw3Sob/93uCWYSTsevnnJHBr 9vjGNFIyc+zRIe9U3Clmka22rUltdaIutn/eus78pBmMtnPvwqwqNX6gRa7dArrxDQJg PsxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=WlnJ6fLM; spf=pass (google.com: domain of linux-bluetooth+bounces-785-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-785-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d6-20020a0cdb06000000b0067f234b2c59si16421780qvk.422.2023.12.28.04.11.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Dec 2023 04:11:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-785-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=@kernel.org header.s=k20201202 header.b=WlnJ6fLM; spf=pass (google.com: domain of linux-bluetooth+bounces-785-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-785-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 D9C7E1C23661 for ; Thu, 28 Dec 2023 12:11:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1F5C6748E; Thu, 28 Dec 2023 12:10:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="WlnJ6fLM" X-Original-To: linux-bluetooth@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 710057466; Thu, 28 Dec 2023 12:10:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D71F2C433C8; Thu, 28 Dec 2023 12:10:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1703765457; bh=gC2BNbPpsT8NBQuqVA/gwgYEvuw7NsOU5Nw1q+1sLtA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WlnJ6fLMKC+M7L6MuT6FYUKuSqH0fbr+u0SBvsa5rWauRKMtFMt+w3ATQHP5Hk0Cg 3SqcW5A33OeLeWbQ8hlH7oGJDwtIxne9C38wNjQmS3LkhAIty37+cuP20OsCnu3BcD yfSDBZOmOxHE88e39ei8kJpahk9eZSYM7uaHVLu8U8DDPfMhiwmCXS30sbyk/i8b3M yOtcGxoJIcGw+ozu4Pn/kItozA886UP1hosPmApYc3cgqDIVx0ZKEZaLFVI2go5A9e +8jL60BTu5EetftSMfXNg/KtyzxMdQXDZDvK6CrUujHyi2hMONioowCDYv6V0lK9SY +Qz6jVjvsvwkw== Received: from johan by xi.lan with local (Exim 4.96.2) (envelope-from ) id 1rIpDv-00046r-1D; Thu, 28 Dec 2023 13:10:52 +0100 Date: Thu, 28 Dec 2023 13:10:51 +0100 From: Johan Hovold To: Sven Peter Cc: Paul Menzel , Felix Zhang , linux-bluetooth@vger.kernel.org, stable@vger.kernel.org, Johan Hovold , Hector Martin , Bagas Sanjaya , Alyssa Rosenzweig , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , Orlando Chamberlain , kekrby@gmail.com, admin@kodeit.net, Janne Grunau , Aditya Garg , asahi@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3] Bluetooth: Fix Bluetooth for BCM4377 on T2 Intel MacBooks Message-ID: References: Precedence: bulk X-Mailing-List: linux-bluetooth@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Thu, Dec 28, 2023 at 10:46:57AM +0100, Sven Peter wrote: > > On Dec 27, 2023, at 11:30, Johan Hovold wrote: > > The commit you tracked this down to restored the original semantics for > > HCI_QUIRK_USE_BDADDR_PROPERTY, which means that it should only be set > > for devices with an invalid address. > > > > The Broadcom BCM4377 driver has so far been setting this flag > > unconditionally which now potentially results in also valid addresses > > being marked as invalid. > > > > I've just sent a patch that makes sure to only mark invalid addresses as > > invalid: > > > > https://lore.kernel.org/lkml/20231227101003.10534-1-johan+linaro@kernel.org/ > > > > Note however that the flag still needs to be set in case your device > > lacks storage for a unique device address so you cannot simply drop it > > for some device classes as you do below (unless you are certain that > > these devices will always have a valid address). > We do know that though. > > BCM4377 is present on Apple’s x86 Macs and always has internal storage > for the address. If the board comes up without an address there’s nothing > much we can do because the address isn’t provided by ACPI or anything > else and setting the invalid address quirk for that situation seems appropriate. > > BCM4378/4387 is present on Apple’s ARM Macs and never has internal storage. > The address is always provided by our bootloader in the device tree. > These should always unconditionally set HCI_QUIRK_USE_BDADDR_PROPERTY > just like this patch does. Ok, good, then this patch and the one I posted are mostly equivalent assuming that the BCM4378/4387 return an invalid address during setup. This patch may be preferred as it does not need to rely on such assumptions, though. Johan