All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Loic Poulain" <loic.poulain@oss.qualcomm.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v9 10/10] arm64: dts: qcom: arduino-imola: Describe NVMEM layout for WiFi/BT addresses
Date: Fri, 31 Jul 2026 16:01:26 +0000	[thread overview]
Message-ID: <20260731160126.BEF881F00AC4@smtp.kernel.org> (raw)
In-Reply-To: <20260730-block-as-nvmem-v9-10-f72935817dbf@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:

Pre-existing issues:
- [High] Unhandled -EPROBE_DEFER during async NVMEM lookup causes fallback to random MAC/BD addresses
--

--- Patch [10]: [PATCH v9 10/10] arm64: dts: qcom: arduino-imola: Describe NVMEM layout for WiFi/BT addresses ---
commit a5efed902165c2b53cfd4d1ec5c5c615cc4e9ffa
Author: Loic Poulain <loic.poulain@oss.qualcomm.com>
Date:   Thu Jul 30 16:00:40 2026 +0000

    arm64: dts: qcom: arduino-imola: Describe NVMEM layout for WiFi/BT addresses

This commit configures the Arduino Uno-Q device tree to expose factory-provisioned
WiFi and Bluetooth addresses from the eMMC boot1 partition. It updates the
bluetooth and wifi nodes to retrieve their addresses from these newly mapped
NVMEM cells.

> diff --git a/arch/arm64/boot/dts/qcom/qrb2210-arduino-imola.dts b/arch/arm64/boot/dts/qcom/qrb2210-arduino-imola.dts
> index bf088fa9807f0..38839b8a361e7 100644
> --- a/arch/arm64/boot/dts/qcom/qrb2210-arduino-imola.dts
> +++ b/arch/arm64/boot/dts/qcom/qrb2210-arduino-imola.dts

[ ... ]

> @@ -512,6 +538,9 @@ bluetooth {
>  		vddch0-supply = <&pm4125_l22>;
>  		enable-gpios = <&tlmm 87 GPIO_ACTIVE_HIGH>;
>  		max-speed = <3000000>;
> +
> +		nvmem-cells = <&bd_addr 0>;
> +		nvmem-cell-names = "local-bd-address";

[Severity: High]
This is a pre-existing issue, but could this cause the Bluetooth
controller to fall back to a random BD address?

The NVMEM provider here is an eMMC block device, which registers
asynchronously during mmc_rescan. This means the NVMEM provider might
not be ready when the Bluetooth driver looks it up, causing the lookup
to return -EPROBE_DEFER.

Because the Bluetooth HCI core performs this lookup asynchronously
during firmware initialization:

net/bluetooth/hci_sync.c:hci_dev_setup_sync() {
        ...
        hci_dev_get_bd_addr_from_nvmem(hdev);
        ...
}

the return value is ignored. Since the async context cannot bubble up
-EPROBE_DEFER to the driver core, will this silently fail and use
a default or random address instead of waiting for the eMMC provider?

>  	};
>  };
>  
> @@ -557,6 +586,9 @@ &wifi {
>  	qcom,ath10k-calibration-variant = "ArduinoImola";
>  	firmware-name = "qcm2290";
>  
> +	nvmem-cells = <&wifi_mac_addr 0>;
> +	nvmem-cell-names = "mac-address";

[Severity: High]
This isn't a bug introduced by this patch, but similar to the Bluetooth
node, will this cause ath10k to fall back to a random MAC address?

ath10k also performs the NVMEM lookup asynchronously during firmware
initialization:

drivers/net/wireless/ath/ath10k/core.c:ath10k_core_probe_fw() {
        ...
        device_get_mac_address(ar->dev, ar->mac_addr);
        ...
}

If the eMMC provider is not ready, this returns -EPROBE_DEFER which
is ignored in the async workqueue, preventing proper deferral.

> +
>  	status = "okay";
>  };

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260730-block-as-nvmem-v9-0-f72935817dbf@oss.qualcomm.com?part=10

      reply	other threads:[~2026-07-31 16:01 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-30 16:00 [PATCH v9 00/10] Support for block device NVMEM providers Loic Poulain
2026-07-30 16:00 ` [PATCH v9 01/10] dt-bindings: mmc: Document fixed-layout NVMEM provider support Loic Poulain
2026-07-30 17:30   ` Support for block device NVMEM providers bluez.test.bot
2026-07-31  8:39   ` [PATCH v9 01/10] dt-bindings: mmc: Document fixed-layout NVMEM provider support Bartosz Golaszewski
2026-07-31 16:01   ` sashiko-bot
2026-07-30 16:00 ` [PATCH v9 02/10] dt-bindings: net: wireless: qcom,ath10k: Document NVMEM cells Loic Poulain
2026-07-30 16:00 ` [PATCH v9 03/10] dt-bindings: bluetooth: qcom: Add NVMEM BD address cell Loic Poulain
2026-07-30 16:00 ` [PATCH v9 04/10] nvmem: layouts: Support fixed-layout as the nvmem device node itself Loic Poulain
2026-07-31 16:01   ` sashiko-bot
2026-07-30 16:00 ` [PATCH v9 05/10] block: partitions: of: Attach partition fwnode to the block device Loic Poulain
2026-07-31  8:40   ` Bartosz Golaszewski
2026-07-31 16:01   ` sashiko-bot
2026-07-30 16:00 ` [PATCH v9 06/10] block: implement NVMEM provider Loic Poulain
2026-07-31 16:01   ` sashiko-bot
2026-07-30 16:00 ` [PATCH v9 07/10] net: of_net: Add of_get_nvmem_eui48() helper for EUI-48 lookup Loic Poulain
2026-07-30 16:00 ` [PATCH v9 08/10] Bluetooth: hci_sync: Add NVMEM-backed BD address retrieval Loic Poulain
2026-07-31 16:01   ` sashiko-bot
2026-07-30 16:00 ` [PATCH v9 09/10] Bluetooth: qca: Set NVMEM BD address quirks when address is invalid Loic Poulain
2026-07-30 16:00 ` [PATCH v9 10/10] arm64: dts: qcom: arduino-imola: Describe NVMEM layout for WiFi/BT addresses Loic Poulain
2026-07-31 16:01   ` sashiko-bot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260731160126.BEF881F00AC4@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=loic.poulain@oss.qualcomm.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.