From: sashiko-bot@kernel.org
To: "Loic Poulain" <loic.poulain@oss.qualcomm.com>
Cc: conor+dt@kernel.org, robh@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v3 7/7] Bluetooth: qca: Set NVMEM BD address quirks when address is invalid
Date: Tue, 09 Jun 2026 10:51:18 +0000 [thread overview]
Message-ID: <20260609105118.94EA21F00898@smtp.kernel.org> (raw)
In-Reply-To: <20260608-block-as-nvmem-v3-7-82681f50aa35@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Silently ignoring -EPROBE_DEFER when fetching the NVMEM BD address leads to a boot-time race condition.
--
commit 11d2d539f650246c72131a488fa018ce70494c2f
Author: Loic Poulain <loic.poulain@oss.qualcomm.com>
Bluetooth: qca: Set NVMEM BD address quirks when address is invalid
This patch adds NVMEM cell descriptions for the BD address in the device
tree and updates the QCA Bluetooth driver to set NVMEM quirks when an
invalid default address is detected, allowing the core to fetch it.
[ ... ]
> diff --git a/drivers/bluetooth/btqca.c b/drivers/bluetooth/btqca.c
> index dda76365726f0..df33eacfd29fa 100644
> --- a/drivers/bluetooth/btqca.c
> +++ b/drivers/bluetooth/btqca.c
> @@ -721,8 +721,11 @@ static int qca_check_bdaddr(struct hci_dev *hdev, const struct qca_fw_config *co
> }
>
> bda = (struct hci_rp_read_bd_addr *)skb->data;
> - if (!bacmp(&bda->bdaddr, &config->bdaddr))
> + if (!bacmp(&bda->bdaddr, &config->bdaddr)) {
> hci_set_quirk(hdev, HCI_QUIRK_USE_BDADDR_PROPERTY);
> + hci_set_quirk(hdev, HCI_QUIRK_USE_BDADDR_NVMEM);
[Severity: High]
Does setting this quirk silently ignore deferred probes and leave the
device unconfigured?
By setting HCI_QUIRK_USE_BDADDR_NVMEM, the NVMEM lookup is deferred to
the asynchronous power-on workqueue.
If the NVMEM provider hasn't registered the cell yet,
hci_dev_get_bd_addr_from_nvmem() returns -EPROBE_DEFER. Looking at the
core code, the return value is entirely ignored:
net/bluetooth/hci_sync.c:hci_dev_setup_sync() {
...
if (hci_test_quirk(hdev, HCI_QUIRK_USE_BDADDR_NVMEM) &&
!bacmp(&hdev->public_addr, BDADDR_ANY))
hci_dev_get_bd_addr_from_nvmem(hdev);
...
}
Because this happens asynchronously instead of in qca_serdev_probe(),
the driver core cannot properly defer the probe.
While fw_devlink is present, partition scanning and NVMEM cell
registration for block partitions (like the mmc-card supplier
added in the dts changes) happen asynchronously after the block
driver binds.
Will this cause the Bluetooth driver to randomly fail initialization if
it probes before the NVMEM cell is fully registered?
> + hci_set_quirk(hdev, HCI_QUIRK_BDADDR_NVMEM_BE);
> + }
>
> kfree_skb(skb);
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260608-block-as-nvmem-v3-0-82681f50aa35@oss.qualcomm.com?part=7
prev parent reply other threads:[~2026-06-09 10:51 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-08 10:50 [PATCH v3 0/7] Support for block device NVMEM providers Loic Poulain
2026-06-08 10:50 ` [PATCH v3 1/7] dt-bindings: mmc: Document support for nvmem-layout Loic Poulain
2026-06-08 11:18 ` Bartosz Golaszewski
2026-06-09 10:51 ` sashiko-bot
2026-06-08 10:50 ` [PATCH v3 2/7] dt-bindings: net: wireless: qcom,ath10k: Document NVMEM cells Loic Poulain
2026-06-08 11:18 ` Bartosz Golaszewski
2026-06-08 10:50 ` [PATCH v3 3/7] dt-bindings: bluetooth: qcom: Add NVMEM BD address cell Loic Poulain
2026-06-08 11:17 ` Bartosz Golaszewski
2026-06-08 10:50 ` [PATCH v3 4/7] block: implement NVMEM provider Loic Poulain
2026-06-08 11:17 ` Bartosz Golaszewski
2026-06-08 13:00 ` Loic Poulain
2026-06-09 10:51 ` sashiko-bot
2026-06-08 10:50 ` [PATCH v3 5/7] net: of_net: Add of_get_nvmem_eui48() helper for EUI-48 lookup Loic Poulain
2026-06-09 10:51 ` sashiko-bot
2026-06-08 10:50 ` [PATCH v3 6/7] Bluetooth: hci_sync: Add NVMEM-backed BD address retrieval Loic Poulain
2026-06-08 11:19 ` Bartosz Golaszewski
2026-06-08 10:50 ` [PATCH v3 7/7] Bluetooth: qca: Set NVMEM BD address quirks when address is invalid Loic Poulain
2026-06-08 11:29 ` Konrad Dybcio
2026-06-08 11:44 ` Loic Poulain
2026-06-09 10:51 ` 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=20260609105118.94EA21F00898@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox