From: sashiko-bot@kernel.org
To: "Loic Poulain" <loic.poulain@oss.qualcomm.com>
Cc: devicetree@vger.kernel.org, linux-pci@vger.kernel.org,
robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v7 3/8] Bluetooth: hci_qca: Set 'bt_en_available' based on pwrseq power controllability
Date: Mon, 05 Oct 2026 12:33:35 +0000 [thread overview]
Message-ID: <20261005123335.CDAE01F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20261005-monza-wireless-v7-3-5a6de7662dcb@oss.qualcomm.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] bluetooth: hci_qca: missing error check for pwrseq_enable() in probe
--
commit 842e42b3b693b54c6eab8132c98045df38fc5343
Author: Loic Poulain <loic.poulain@oss.qualcomm.com>
Bluetooth: hci_qca: Set 'bt_en_available' based on pwrseq power controllability
This commit updates the driver to query pwrseq_is_controllable() when Bluetooth
power comes from a sequencer. If the power is not controllable, it clears
bt_en_available so that the non-persistent setup quirk is not set and treats
the device as always-on.
> diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
> index f53f95601693d..20d8c5e890a89 100644
> --- a/drivers/bluetooth/hci_qca.c
> +++ b/drivers/bluetooth/hci_qca.c
> @@ -2557,7 +2557,20 @@ static int qca_serdev_probe(struct serdev_device *serdev)
> return PTR_ERR(qcadev->susclk);
> }
> }
> -
> +
> + if (qcadev->bt_power->pwrseq) {
> + bt_en_available = pwrseq_is_controllable(qcadev->bt_power->pwrseq);
> + if (!bt_en_available) {
> + /* The host cannot gate the BT power individually.
> + * Treat it as always-on and drop the pwrseq handle.
> + * The descriptor itself is still released by devres,
> + * so dropping the handle here is not a leak.
> + */
> + pwrseq_power_on(qcadev->bt_power->pwrseq);
[Severity: High]
Does this code need to check the return value of pwrseq_power_on()?
If powering on the Bluetooth hardware fails, the driver incorrectly continues
probing and returns success. This leads to silent hardware initialization
failures and downstream communication timeouts when the host attempts to
interact with the unpowered controller.
Note: The undefined function typo (pwrseq_power_on) present in this patch
is fixed in a subsequent patch in this series (commit 'Bluetooth: hci_qca:
Flatten struct qca_power into struct qca_serdev'), but the missing error
check for the corrected pwrseq_enable() call remains unfixed in the final
state of the series.
> + qcadev->bt_power->pwrseq = NULL;
> + }
> + }
> +
> err = hci_uart_register_device(&qcadev->serdev_hu, &qca_proto);
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261005-monza-wireless-v7-0-5a6de7662dcb@oss.qualcomm.com?part=3
next prev parent reply other threads:[~2026-10-05 12:33 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-05 12:21 [PATCH v7 0/8] arm64: dts: monaco-arduino-monza: Add support for LGA WiFi/BT module Loic Poulain
2026-10-05 12:21 ` [PATCH v7 1/8] Bluetooth: hci_qca: Add M.2 Bluetooth device support using pwrseq Loic Poulain
2026-10-05 12:29 ` sashiko-bot
2026-10-05 13:01 ` arm64: dts: monaco-arduino-monza: Add support for LGA WiFi/BT module bluez.test.bot
2026-10-05 12:21 ` [PATCH v7 2/8] Bluetooth: hci_qca: Rename 'power_ctrl_enabled' to 'bt_en_available' Loic Poulain
2026-10-05 12:28 ` sashiko-bot
2026-10-05 12:21 ` [PATCH v7 3/8] Bluetooth: hci_qca: Set 'bt_en_available' based on pwrseq power controllability Loic Poulain
2026-10-05 12:33 ` sashiko-bot [this message]
2026-10-05 12:21 ` [PATCH v7 4/8] Bluetooth: hci_qca: Embed bt_power in struct qca_serdev Loic Poulain
2026-10-05 12:29 ` sashiko-bot
2026-10-05 12:21 ` [PATCH v7 5/8] Bluetooth: hci_qca: Support QCA2066 on M.2 connector via pwrseq Loic Poulain
2026-10-05 12:33 ` sashiko-bot
2026-10-07 22:57 ` Val Packett
2026-10-05 12:21 ` [PATCH v7 6/8] Bluetooth: hci_qca: Flatten struct qca_power into struct qca_serdev Loic Poulain
2026-10-05 12:29 ` sashiko-bot
2026-10-05 12:21 ` [PATCH v7 7/8] dt-bindings: connector: pcie-m2-e: Add vendor LGA connector compatible Loic Poulain
2026-10-05 12:23 ` sashiko-bot
2026-10-05 12:21 ` [PATCH v7 8/8] arm64: dts: qcom: monaco-arduino-monza: Add QCA2066 M.2 WiFi/BT support Loic Poulain
2026-10-05 12:37 ` sashiko-bot
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=20261005123335.CDAE01F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-pci@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.