Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp198223rdb; Thu, 18 Jan 2024 00:18:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IHni8pFK5rgMfd6JwOCZe64zJLsOUKMFg0J0Vj71OU8CGWLGATdn9PVewzWDYgUqqVqUMBR X-Received: by 2002:a05:620a:10ae:b0:783:3e1f:dc92 with SMTP id h14-20020a05620a10ae00b007833e1fdc92mr368792qkk.156.1705565880685; Thu, 18 Jan 2024 00:18:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705565880; cv=pass; d=google.com; s=arc-20160816; b=PgWk9b2Qnq29TXt7mYyudllN/HdWqeqp+Itc5Yn4cflny0Z0RV54DvmH41FAIDxzce BPaE3rqEiLeyk9q7BDP8ftcW5pIJPlo7KLcBlfcn8oM5BzRSLiIHd31xu4ahHhAgdOKx 6x99kigqKOICIkx/kbqGY1i1om5ulRa5Q6kGeNJsR8/KwWkhUmc0g7Kmuq/p5agCREcy 3MJBgdZm70ZViPI00UyK8pkPHDQcDO06ixWaju0pZvaMonXA8LR4Y7iv/Nr1go163cm5 NfMFCTOhShE1tp3/iv1Uy0/yzut4cOU8ZepU0fNOLyGg7VpB53LBY1hYHUb3yzobXIii pXgA== 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=WYbWiuWmD/TsxNv0ABPuVds48eP8sS6iUTDDxs/k/Pc=; fh=eNkvDRubZv/wpSVSI1ImOAJPmmeHeAXJOpy/1fMsUT4=; b=lWxar8GfDIuxKFsOXK0g/dOSAFvDsd2GVIWfCC09K6sQ8Aml5Np29IT/N9iFZsYoNt e7qizcyf1vv9wmh/0VZLeZTRYz7Rd2dTyr2lP44msLV8UYDhif07O9+ILFjwuIyc2O+O ksRa5ol6L+4t6Z/csjr3eEUbhk+SM6x1zn60krImWqFR2y73Wx+S7xIqYG0ltx08Cvh+ hCrHvAwTpbWA2aVGBnkbNLi21H3/C7QCR4+Wmg0siWhmfKTws8nQ7XaWy5MWUVUQvg/x NW2UF6eLL4EH8n8j+dFPPRq43YleGZPNL4fabAIoN/SgzBVN2bZ3qs+jc1FBSb6g2fr4 29Yw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CQGJ+MAV; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-bluetooth+bounces-1180-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-1180-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. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id f14-20020a05620a408e00b007834a6c9a47si12120578qko.332.2024.01.18.00.18.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 00:18:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-bluetooth+bounces-1180-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CQGJ+MAV; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-bluetooth+bounces-1180-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-bluetooth+bounces-1180-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 631801C20ECC for ; Thu, 18 Jan 2024 08:18:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5A20511CAD; Thu, 18 Jan 2024 08:17:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="CQGJ+MAV" 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 A60631170A; Thu, 18 Jan 2024 08:17:49 +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=1705565869; cv=none; b=ezTLZHHAznBmyTborYO+N55PkasmKqbTuDtESJZJGN3zKcnYL4pV8RiRtz5Ksdc5aZS2aVbaSnY4YrQTXXWc3bBl7W6g3pVsGyC/Od6tZhEVaKcdqUmfRuTKNz7xL4VLPF/NAQ8iHoM5wTQKECdX54A5t2TiJxQq65Lh6WdoesA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705565869; c=relaxed/simple; bh=/Frwy4cBveeSxvMgx3OjZscR3f48byOksWLqeCmuCRw=; h=Received:DKIM-Signature:Received:Date:From:To:Cc:Subject: Message-ID:References:MIME-Version:Content-Type: Content-Disposition:Content-Transfer-Encoding:In-Reply-To; b=LyQLZT5pQL63LYN7ZLMxXfWRVYatJRl8UmTjj0s+GwIbpL+R+Ou9a+BoXo2XI19W01jqGoFL57sLRsxnNakDh6qs5MEMC6c+4YtorLZur/FQ2dOCEWUSGu8eGthw7XvUzH+A0aA35nqJDL6RUG83L76rOaNpuOaRGOZwhA3rxPs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CQGJ+MAV; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 197C3C433C7; Thu, 18 Jan 2024 08:17:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1705565869; bh=/Frwy4cBveeSxvMgx3OjZscR3f48byOksWLqeCmuCRw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CQGJ+MAVvemjTDRtxWOquEkXyP9FZ9rDWI3WpkFGVvZzW0wHPmCyhAgNx4Y8RRbje eqS8j2rIEFvwUd1FWZWN30IhP4bmHdOAOhFzMYnuAI7BJmyhFlxSDkYZKrPyw8D5CM Aq3k3D+mNPPpJ/h41/FyvqT9TlDyeYqEa1X6SVTAPGAV0S5yYB6r0VISNO4I73Aycl dt2KI7SroyN7E8awCf2HbjzT/qipOgoMSkrctWbCtrQzjjP0rMY4Hu1uVd93wSlvy7 ifLMM/bIWqO0fVaRHwpWHzaFhAyQstFrFUG9+fnvQ1O4YeZ49V2oD0fn5/j33+bdd9 Zo3afNDv2SU8w== Received: from johan by xi.lan with local (Exim 4.96.2) (envelope-from ) id 1rQNb1-0001nu-0b; Thu, 18 Jan 2024 09:17:55 +0100 Date: Thu, 18 Jan 2024 09:17:55 +0100 From: Johan Hovold To: Doug Anderson Cc: Matthias Kaehlcke , Johan Hovold , Marcel Holtmann , Johan Hedberg , Luiz Augusto von Dentz , 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 , Stephen Boyd 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-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 Wed, Jan 17, 2024 at 01:52:08PM -0800, Doug Anderson wrote: > Hi, > > On Wed, Jan 10, 2024 at 12:12 AM Johan Hovold wrote: > > > > > > So the first question is whether there actually is any boot firmware out > > > > there which passes the BD_ADDR in reverse order? > > > > > > Yes, (at least) the boot firmware for sc7180-trogdor devices. > > > > > > hexdump -C /proc/device-tree/soc\@0/geniqup\@8c0000/serial\@88c000/bluetooth/local-bd-address > > > 00000000 8c fd f0 40 15 dc > > > > Indeed, this should have been LE order. > > In case it adds any extra data points, we also do similar with the > WiFi MAC address and it also seems to be big endian. > > lazor-rev9 /proc/device-tree/soc@0/wifi@18800000 # hexdump -C local-mac-address > 00000000 8c fd f0 3e 3e 86 |...>>.| > 00000006 > > lazor-rev9 /proc/device-tree/soc@0/wifi@18800000 # ifconfig wlan0 | grep ether > ether 8c:fd:f0:3e:3e:86 txqueuelen 1000 (Ethernet) Yes, wifi and ethernet MAC addresses are always big endian (i.e. on the wire as well as in UIs). When the corresponding devicetree property for Bluetooth device addresses was added, Marcel explicitly requested that the address be provided in little-endian order: "I would prefer the boot loader actually providing the BD Address in the correct byte order as the protocol expects and not yet another form. The string representation is just for reference since that is what most people have seen so far." https://lore.kernel.org/all/41A0C162-4AC5-4969-813D-9E2C7F5D5031@holtmann.org/ and this is also what made it into the binding: 28517c02e1dd ("dt-bindings: net: document Bluetooth bindings in one place") Perhaps someone should have pushed back at the time to avoid this (apparent) inconsistency, but this is what we have since 2017. Johan