Received: by 2002:ab2:620c:0:b0:1ef:ffd0:ce49 with SMTP id o12csp985400lqt; Tue, 19 Mar 2024 09:24:07 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU88K1qJZAuyDaRwQCPoqdgF6uIO/k9DWj3HbczQmS962cg07I6NLt7uJdQqZH8NsR/YeSKDQGbunbmjggxkaraq2pAg/2/dcgHL1YOgQ== X-Google-Smtp-Source: AGHT+IGtztt2yQHoPH3CmjxaZYgnRJiAhFVy6pNCVj4w9CQ+2ihY3zPP/yYHzmJWeD1VMckMyMuB X-Received: by 2002:a17:906:c298:b0:a46:e9fb:e3db with SMTP id r24-20020a170906c29800b00a46e9fbe3dbmr664434ejz.65.1710865447422; Tue, 19 Mar 2024 09:24:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710865447; cv=pass; d=google.com; s=arc-20160816; b=cFOAfbTag2SsZdC1HIklZ0XhjJ3N3kEbx9FlsPi62u2di8A/74oHQ8rJY4K9TWwZy2 3b+aqZvgSw325mH5kag7yAeVbRDyL1itMxqwFtcDvoeQZjyRP455xffoZ8MFtHLioMkI +f0fviunDUZslSiOWoZhs9ztlxuCfQdFDD/NMVPoFIb7N0YEMpKnqZ1J7yo6TMdB/nK4 CEIPrU9T4SCbzS5XmOm3gJHciXHrGFn/jmquOOrGIe/sOwo6iUS6bI+c1WAUszhyQv7T WUefoX7ZQhHinTrLs0AE3B/415GPwb9g0NAc4B8vBiymIPNHiQ69ab3aH+S/+hkvW2HB pBqQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=zkkIJgJaurA9K8QokEebR7bixjWgXEoceQbAEPubtN8=; fh=9Q1lcsuJIfGgdxLK6zX1kRL70RB+qMhRuR4r14RzSLg=; b=XsuXX0HnVin+VKo3BBXmlsL6QsSiCMpf9CGbMj5S0T5pBcLrhH5WQesPNApZvQa+vK KpMGYOLxdBsklu4eObDfYP/Rateu8h5ikA52Fahg4H78PpAv/sLKwfZNWQOflFr4ZqxP bJcGcbr4lH1Vq8W27iVwm9D1YSe0038BPKeN6YIIjexlZ/pgurkwyPbkD4OcfXRZds4H 4Ve0vkCkPnQv27wPn/Fzm/lVsqn/MwQkMThOI7CZ7kKi+3U1rPHUEIlTIoqg92OhbAAX bdOxb2FfO8MKQcwiRYVeG+HDwjlMXsrKj5OCguJlN3yCysXZmDdoy7gWsVikd83Z2pxE lSmw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="DneJ/nvX"; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-107818-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-107818-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id v9-20020a170906b00900b00a46d5914a62si1059355ejy.781.2024.03.19.09.24.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Mar 2024 09:24:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-107818-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="DneJ/nvX"; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-107818-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-107818-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 am.mirrors.kernel.org (Postfix) with ESMTPS id EA7911F213E5 for ; Tue, 19 Mar 2024 16:24:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9AD1182D8F; Tue, 19 Mar 2024 16:16:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="DneJ/nvX" Received: from mail-lj1-f173.google.com (mail-lj1-f173.google.com [209.85.208.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 36522823A2 for ; Tue, 19 Mar 2024 16:16:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710865011; cv=none; b=ajZswNHy9LrIo/T1jBh2rqtP0NIOVSc0/njXw1sOsv0Zj1kCGl45QXO65s8ag20Z4No4outhjwiae/LL6WawznN1drMuUwt7nSyTWAQx3WfDu3Z6wT/VkUkGpW22bsNY6+/BPxeLCnzEx/yIwchFrBwgG2jTiLh+R6yoaVaslz8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710865011; c=relaxed/simple; bh=jt/z4E2fl/MmVcNLQbE3dr/YDP5CaljyhC9bWYkStRQ=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ch3h3Cvg4dRb+eNUMdz2xs6y+G+9KkQRp3GdIhKCzS1eBdQlkoQ4wZ2xJittZc0bHBip3tUtz3mAdTDHbTaI8u5o3+hOI+9q9G2BwOVNa5vSoAq179KzJjeBiN8wU4Rgwl7Xm4qQdOp+aLH8VgbpLvZvOFgRZt5DDjuxRdl5GsQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=DneJ/nvX; arc=none smtp.client-ip=209.85.208.173 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lj1-f173.google.com with SMTP id 38308e7fff4ca-2d68c6a4630so1709941fa.3 for ; Tue, 19 Mar 2024 09:16:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710865007; x=1711469807; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=zkkIJgJaurA9K8QokEebR7bixjWgXEoceQbAEPubtN8=; b=DneJ/nvXqnQFc2si0xLZ9xQjeTkceqMzK+AK0eDYIQeKIcSxftaRneC5MR4Ge4lu03 5F/SzhI5o3DyJmD/hDLEoFb++nghh13uNtL4NEUakGzOd6ynKrUsJ7MGO4dtrbbVAyEY gu+oHZJexLnEDTY9Jk+lggYKDReIw7bJuWo+E01vI9ynlWQ29R6AEJKQqEtid3SKLlyM BZn+WbGLCDpalK/HnykEg3sGkAT+zYkbBeiAkIG2UYlKdea8QKnbUpjlYJyFP9NA9MrY l8stUThCfjgx1wfETJ0dux9EJlAupLkHQxmUkLolGrVKsb5r6JL6CiyUfE0f59XxzwoS tmEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710865007; x=1711469807; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=zkkIJgJaurA9K8QokEebR7bixjWgXEoceQbAEPubtN8=; b=Fgsl+qCSNNNCptmDTD8ePRVLfFX7JD6iB45SiO8u4vf9fC/ZeiT+LzcJlJrMYySQX+ kjIaOmyNhZkNCLpfwdlZFn2d+uQirQ+rYWp5cnQU5h2xtLy9g4fw/eMk9TMAHr72muzW fr2KsloedsF8t651MYGEJmGfeDmHT1QQHNMZBWYAKDCRnCkNCgF2W1rwb2EjcrvZ7j9k i68t3NO5PdJmrb2OvmsOigcygJPkbQThedcZCw0CGtlfKmEbXqzxddZtyGDd+48bS7xU W76SlznrN38yw+2do8og8tc2iT4oDAS82wqOYKbgCHBJPOT9jDZHxyulwkdDUdKTnkI7 a3sQ== X-Forwarded-Encrypted: i=1; AJvYcCVjtJcPlim165754XIx9RCCZ3GIgKOHxIEmdpUsssnUnKckv7WQTkI2pDbGMnUXH7PtddkQ7jl40uVCYtPpAmpzZ57HVSx32qQMBK53 X-Gm-Message-State: AOJu0YzS+RYNtuYdpLI/tWlf9K7pULameUsc78zJ769gNagLkCLYKbzZ sxOZxLu63TuFwv/3VaYIklPyudUNav4nVWzJSYBTsgHf5EI5CbX0ePasebJpxAY= X-Received: by 2002:a2e:a794:0:b0:2d3:1043:749a with SMTP id c20-20020a2ea794000000b002d31043749amr2801599ljf.21.1710865006770; Tue, 19 Mar 2024 09:16:46 -0700 (PDT) Received: from [87.246.222.29] (netpanel-87-246-222-29.pol.akademiki.lublin.pl. [87.246.222.29]) by smtp.gmail.com with ESMTPSA id a32-20020a2ebea0000000b002d42c91249dsm1895250ljr.16.2024.03.19.09.16.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 19 Mar 2024 09:16:46 -0700 (PDT) Message-ID: Date: Tue, 19 Mar 2024 17:16:43 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 2/5] Bluetooth: add quirk for broken address properties To: Doug Anderson , Johan Hovold Cc: Marcel Holtmann , Luiz Augusto von Dentz , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski , Conor Dooley , cros-qcom-dts-watchers@chromium.org, Johan Hedberg , Balakrishna Godavarthi , Matthias Kaehlcke , Rocky Liao , Dmitry Baryshkov , 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 References: <20240319152926.1288-1-johan+linaro@kernel.org> <20240319152926.1288-3-johan+linaro@kernel.org> Content-Language: en-US From: Konrad Dybcio In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 3/19/24 17:10, Doug Anderson wrote: > Hi, > > On Tue, Mar 19, 2024 at 8:29 AM Johan Hovold wrote: >> >> Some Bluetooth controllers lack persistent storage for the device >> address and instead one can be provided by the boot firmware using the >> 'local-bd-address' devicetree property. >> >> The Bluetooth devicetree bindings clearly states that the address should >> be specified in little-endian order, but due to a long-standing bug in >> the Qualcomm driver which reversed the address some boot firmware has >> been providing the address in big-endian order instead. >> >> Add a new quirk that can be set on platforms with broken firmware and >> use it to reverse the address when parsing the property so that the >> underlying driver bug can be fixed. >> >> Fixes: 5c0a1001c8be ("Bluetooth: hci_qca: Add helper to set device address") >> Cc: stable@vger.kernel.org # 5.1 >> Signed-off-by: Johan Hovold >> --- >> include/net/bluetooth/hci.h | 9 +++++++++ >> net/bluetooth/hci_sync.c | 5 ++++- >> 2 files changed, 13 insertions(+), 1 deletion(-) >> >> diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h >> index bdee5d649cc6..191077d8d578 100644 >> --- a/include/net/bluetooth/hci.h >> +++ b/include/net/bluetooth/hci.h >> @@ -176,6 +176,15 @@ enum { >> */ >> HCI_QUIRK_USE_BDADDR_PROPERTY, >> >> + /* 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. Yeah, I thought the same.. and the binding, perhaps could be generic, as I have a strong suspicion Qualcomm is not the only vendor who made such oopsies.. Konrad