Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp1030876lqt; Tue, 19 Mar 2024 10:38:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUmpUhzpJGjQrUP9d1KIS3aUbsZcp/28e1uypBIex5G5GuikfHYTJ/VzhoaLMrDFvNw0v8oXayDIDUKjhgcTFlqDWXIZXWd56qySFc9fA== X-Google-Smtp-Source: AGHT+IFv5z0ReLrpdQl69X+sh9gysd+M9eUAwS5ja8Io4TNyqI4AKycH3djZg02VrHQUjVDkdqEj X-Received: by 2002:a05:6830:16cd:b0:6e6:9b65:fc58 with SMTP id l13-20020a05683016cd00b006e69b65fc58mr4445647otr.9.1710869930845; Tue, 19 Mar 2024 10:38:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710869930; cv=pass; d=google.com; s=arc-20160816; b=Y7EFAVDb3gO7mC33cKhp3atnwrjvamuRNa4l48IRq5UJwZc7nvylRvKbOdzNDQlXlZ MO5RV1c392+iZcBL9LAdKKKs2f+yEFrd361XY4mMbMWLzaht7mgSsjPxBfjQDSPn8533 HXWuIFv6Q2i7QVxzRWzYn1+FehWtvSH8wRwAmwnAPSqJrSFUKRs0g3WaZalwG5mnmnj+ GsSm7Sn/0hu4ACCuyGvGJzTK3iWOKD7/70iIa18sn4dx2wLnXx2TABZ8zDfgzl9s8CaF +5WIGSS0pjMq95tEl00/YyNLpEngwt+cNy85AlHavjALW3oUDMl9g5KjWb6XyWFonWtu ja2g== ARC-Message-Signature: i=2; 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=mLvjyGu6IIiMNdVXewBtGT8tP5OE6ObBr5EofriSILw=; fh=kBEj5jfZl2ADIJSg64eLjPHoR22s5+aAdVy8q0J+ACQ=; b=mz/zt8y3uF8hDmiL3wPDzem8ouHmXOlu3qD8qjDDXRgXyXr+gVcA/XySmqheWMuEKH MAbMBwXWrtxrUgtgP6weE1Za8YKlfLE3VwigL6u0fuskfU8bBPRcCjSicgeNH/myrMgx KXoSSp0aHx/e0pHwIo3xPg7zm3+Vztn7LyNUEBt7c7C5xip+kTKfN7iNaau+iMFypHsw BIs9OHOUP+bZl90BR/ELaaby9myBNziYu6Dh1a+Mk9FSAm3vesyImU4RHrVh6LPtXbX7 CtR1Ch5IY4ZctYoIXuk8wAL7Vz2yGktB3IEy8NSO1MWDy/Bg8WJMack+xvIDDWfWEljX fh3w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FhpGq69C; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-bluetooth+bounces-2638-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-2638-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 b1-20020a05620a04e100b00789e93007c8si8907676qkh.283.2024.03.19.10.38.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 10:38:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-2638-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=FhpGq69C; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-bluetooth+bounces-2638-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-2638-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 8EEE91C22A1A for ; Tue, 19 Mar 2024 17:38:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2EB6523776; Tue, 19 Mar 2024 17:38:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FhpGq69C" 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 73BFD19BDC; Tue, 19 Mar 2024 17:38:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710869916; cv=none; b=e7yO4h/L8fmWDxroIUM0qmid17v+XCPqlo1PQZvEAxCIg1+i2VTClznjEs7xFkY4XLICDkqYSmjW6szf6igixwLTJORGep/LecaOTWvzT6KqzjYtzB+h78yF+T8POcpp5ygOrblAsJ7kmW0TEXYCWKtFtABVU0rMDXiAM1OZbW8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710869916; c=relaxed/simple; bh=4vuAWBj1evs6v+OZMqxOpqf/OaE6RssOo2tlPJIKe2o=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=FBbHb3nfeM5Y/ZwZNvNJO52MK5dNvVsdAY6wmuHFZLsFg7Ua36MpynaYReQNJTxu6/85yVS07Ifwxh4IvH+MK5mQzUbSWyiF5CUkFl7DAEnN1EBJaBMLg8EqXJ+bI3KmJyFIfb5fLbLD5TMlLn95UnSjEaukTu0MgHKwBeKpv6w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FhpGq69C; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 00477C433F1; Tue, 19 Mar 2024 17:38:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1710869916; bh=4vuAWBj1evs6v+OZMqxOpqf/OaE6RssOo2tlPJIKe2o=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FhpGq69CjbpLw7gdlpfimviyUI9rG1eiCMCeg4oRTfRHYiaEvNeWnvg8fB629aLZW AZ81lwqhxnWfbJDM9iuNZ5Kl5VgSgWoIfbkIO/0TdZPrxNElSmJNv1D4NHBr1x3QQd d98gs93XJgtAocflD6uznvPw2sPCqqyu19aSUi6BLS8vDa9pSw7V22D7C0mag/CeXa J+Bwkwx3Dn4Rg02ptndnzDRowRBiznOdoFMON7/tYTQ3gGghhJIQFnLmaFVdaWM7K0 tRNrfqA5FYAFZjs861/KJiC57kUwu+d4A5Q5wuYc3cLP7a6wjL6pOW4W69YHBVCwGG HvG5QSe0kw+nQ== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1rmdQA-0000000016b-11LA; Tue, 19 Mar 2024 18:38:42 +0100 Date: Tue, 19 Mar 2024 18:38:42 +0100 From: Johan Hovold To: Dmitry Baryshkov Cc: Doug Anderson , Johan Hovold , Marcel Holtmann , Luiz Augusto von Dentz , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , cros-qcom-dts-watchers@chromium.org, Konrad Dybcio , Johan Hedberg , Balakrishna Godavarthi , Matthias Kaehlcke , Rocky Liao , linux-bluetooth@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH v3 2/5] Bluetooth: add quirk for broken address properties Message-ID: References: <20240319152926.1288-1-johan+linaro@kernel.org> <20240319152926.1288-3-johan+linaro@kernel.org> 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 Tue, Mar 19, 2024 at 07:01:57PM +0200, Dmitry Baryshkov wrote: > On Tue, 19 Mar 2024 at 18:26, Johan Hovold wrote: > > > > On Tue, Mar 19, 2024 at 09:10:23AM -0700, Doug Anderson wrote: > > > On Tue, Mar 19, 2024 at 8:29 AM Johan Hovold wrote: > > > > > > + /* When this quirk is set, the Bluetooth Device Address provided by > > > > + * the 'local-bd-address' fwnode property is incorrectly specified in > > > > + * big-endian order. > > > > + * > > > > + * This quirk can be set before hci_register_dev is called or > > > > + * during the hdev->setup vendor callback. > > > > + */ > > > > + HCI_QUIRK_BDADDR_PROPERTY_BROKEN, > > > > > > Like with the binding, I feel like > > > "HCI_QUIRK_BDADDR_PROPERTY_BACKWARDS" or > > > "HCI_QUIRK_BDADDR_PROPERTY_SWAPPED" would be more documenting but I > > > don't feel strongly. > > > > So, same reasoning here, this it not some quirk that people should go > > around setting without first considering to fix their boot firmware. > > The address can be considered broken in many different ways. The name > should still be descriptive enough. If you want to specify that it is > a broken behaviour, please consider something like BROKEN_BE. I doubt that Qualcomm will be able come up with another way to break the address property. They'd have to try real hard. And this is an internal define which can be changed at any time. There's also some worth in keeping it aligned with the DT property, which I'm more open to renaming (e.g. if the DT maintainers thinks dropping the vendor prefix makes sense). The alternative I considered but rejected was something like "local-bd-address-be" as that would be too neutral. Perhaps "local-bd-address-reversed" would at least signal that something is backwards, but I still fear that that may be too subtle. Johan