Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp3089813rdb; Tue, 13 Feb 2024 06:41:53 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU578K+1aTBbBFJ+sJZomXO4vKw1U7u16oDQDSfnGaKXxfp54SFEBpQcbzqZaDJYMMc6Q0ebLLvh2wU3v4W5/SAf4dXE20Og4wQyw1atA== X-Google-Smtp-Source: AGHT+IEDiNqjglbDNougg5SPlNmsxrBS24wH0vykoVUCav7mmVaN1H3VqzZNcDc1pEYlinUUfFle X-Received: by 2002:ac8:7fc4:0:b0:42c:769f:e870 with SMTP id b4-20020ac87fc4000000b0042c769fe870mr7715375qtk.12.1707835313090; Tue, 13 Feb 2024 06:41:53 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707835313; cv=pass; d=google.com; s=arc-20160816; b=TlLF8Yzt1PdpcRMO7xRd5MKMJXZP966sKp3GKyQXVAesmptEHYAjorHYKppi+89kQO KV8zCf9T/ttUz36Kz53Frbne0472X2GvYjcxNzX3MtUjcJPtetjsHgD2qjNyBGdSdR/x cvEBqj1Yudv/HEPaWWCl/nXEZsDqpEhe6/YctWWawEusDVnLEmhBhl8V066OfaCDpuPl at787PMqTzxbyOEl/nkEsBDpN3DgGlHYTB7oFf99W/k2Erhswe+ncR1qw62OT85Yia80 fxOCe0VaqxXQA8hyH18SbWjqZVxGYZ3KSxiaVHCXwK+DkFfGsHmP+vObzSquPb4OKYFX OHbQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=ogEoi9V0NJkUZVf6wfMb/no4AxEwhsMSEvkJAtzXcME=; fh=GY/px+cI7quwFP2PV1CFgMRkOVPlYqIpuWdUWINy3bo=; b=qXe5+RjwocX6R4KI4IrS3jX9KnHrmaYut/GrnGzS5td3/qJ/+W2vJde8dElvKdWRcD YdK0ujKncjwTvDP9i8WgUdkqYOsLHVs/dV851sYxbAZE9KUXobOj8I+VJq4UtMGELhfQ bKxcryToqEopel7XIutJMTZu8+kD1Er1+czPTMOF61qxCgpJqouXulCykk5yd2nkBbqL HjXMtzH1sx/RQMF74BxMlGmxuyF9N6LY+0K2DDyYJi/l9G2UZbetpurbmsqSVA6EBc74 iWBTSLpZBRnR/Jpz+gn+bvg+fP7r9QMsIIBO/lFCvC23t8dOWGBYBUKxqVIoQyVXkfI8 sSUg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KTbqkkuS; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-63695-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63695-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCUg+7gfLfyej8TzaU7xLIYE93ks5K5ej7WFmEkE55nE8dh2xQf4rOWvQsgGvQOzLG8+MgducVxTTGvYpPLPQUOgp3UIjzFcyJ+ZuWwOJw== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id c26-20020ac8661a000000b0042c7e60b946si2822826qtp.171.2024.02.13.06.41.52 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Feb 2024 06:41:53 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-63695-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=KTbqkkuS; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-63695-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-63695-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 CFFE81C210DF for ; Tue, 13 Feb 2024 14:41:52 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9469C57898; Tue, 13 Feb 2024 14:41:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="KTbqkkuS" 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 B19041E529; Tue, 13 Feb 2024 14:41:40 +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=1707835300; cv=none; b=NVkuh6KrWJwBE9CWApg/BmeAkZ/4ZSJ904gmDNfOI8ReVF83DkgAvFcwGbqpgAXwiUf1hVLiOHV7LAavkVfGJXgGJfcHGquVTPHYHnBBs/O6SfCi93egNBS3gMQWzs5cof8XZ03M6k5l4nDzkaWUQAkGXnwoIJbB8Kefs7XkdG0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707835300; c=relaxed/simple; bh=3FaIpb2tO3xwMxqfhDPf3xKwredvzh+qclLg9QTU2Aw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=uf017AHrt1/O4mNGHLDK/bp6Xq1jQiMGbvRvusciXrmi1m6o/jlA0XOf/eEqjNxEv4cjjGur2XsdKW737kdvstJo8cTeMI4Q4ZnIYIRhJf82Lx0CqgRd/jKE0YAcTqSeCZGObA6edCIBKoHzW9O/9EVI0SmGs72VqFaw/9qOz9g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=KTbqkkuS; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2CF6BC433C7; Tue, 13 Feb 2024 14:41:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707835300; bh=3FaIpb2tO3xwMxqfhDPf3xKwredvzh+qclLg9QTU2Aw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=KTbqkkuSVWxD8Cd4KI8EMEQ6uSh8NP9kXnjOSwweuPSp7MvKyEujKabSjlCt89RrA +Xrg7orBllVYqODtOxgj81S14b4FSJiQ9tNl/uezVYeRGk1m1Fyg1j0bI41KW669TX rCtaJ3mSQSNP+JTg8T3Jt5cjxpUji0CjtusWsctr0TU1RaeTkgkAlCb8Uc21qrMKtO QBCZWUCiEsaphO3Cg9sCrQ2MDtpDLlfuaWlsYWlQG/6PuEpaSeLB8bWM6lpfuc6H+Y 5ZNWxqMUH4DQaSOVoZFroExonN6SRn1SlcgvmkcaZvuL2JLO3uUC6NKUX8Oj9sP1kF UNoVtem33Ot5g== Received: from johan by xi.lan with local (Exim 4.97.1) (envelope-from ) id 1rZtyu-000000000KV-05UP; Tue, 13 Feb 2024 15:41:56 +0100 Date: Tue, 13 Feb 2024 15:41:56 +0100 From: Johan Hovold To: Luiz Augusto von Dentz Cc: Marcel Holtmann , Johan Hedberg , Bjorn Andersson , Konrad Dybcio , linux-bluetooth@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Balakrishna Godavarthi , Matthias Kaehlcke , Johan Hovold Subject: Re: [PATCH] Bluetooth: qca: fix device-address endianness Message-ID: References: <20231227180306.6319-1-johan+linaro@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20231227180306.6319-1-johan+linaro@kernel.org> Hi Luiz, On Wed, Dec 27, 2023 at 07:03:06PM +0100, Johan Hovold wrote: > The WCN6855 firmware on the Lenovo ThinkPad X13s expects the Bluetooth > device address in MSB order when setting it using the > EDL_WRITE_BD_ADDR_OPCODE command. > > Presumably, this is the case for all non-ROME devices which all use the > EDL_WRITE_BD_ADDR_OPCODE command for this (unlike the ROME devices which > use a different command and expect the address in LSB order). > > Reverse the little-endian address before setting it to make sure that > the address can be configured using tools like btmgmt or using the > 'local-bd-address' devicetree property. > > Note that this can potentially break systems with boot firmware which > has started relying on the broken behaviour and is incorrectly passing > the address via devicetree in MSB order. > > Fixes: 5c0a1001c8be ("Bluetooth: hci_qca: Add helper to set device address") > Cc: stable@vger.kernel.org # 5.1 > Cc: Balakrishna Godavarthi > Cc: Matthias Kaehlcke > Signed-off-by: Johan Hovold Can we go ahead and merge this one to get this fixed in 6.8? I've spoken to Bjorn Andersson at Qualcomm about this and he is in favour of doing so. The only people actually using the devicetree property should be the Chromium team and they control their own boot firmware and should be able to update it in lockstep (and Android uses some custom hacks to set the address that are not in mainline). Johan