From: Sasha Levin <sashal@kernel.org>
To: patches@lists.linux.dev, stable@vger.kernel.org
Cc: Shuai Zhang <quic_shuaz@quicinc.com>,
Luiz Augusto von Dentz <luiz.von.dentz@intel.com>,
Sasha Levin <sashal@kernel.org>,
marcel@holtmann.org, luiz.dentz@gmail.com,
linux-bluetooth@vger.kernel.org
Subject: [PATCH AUTOSEL 6.12 12/21] driver: bluetooth: hci_qca:fix unable to load the BT driver
Date: Mon, 30 Jun 2025 16:45:27 -0400 [thread overview]
Message-ID: <20250630204536.1358327-12-sashal@kernel.org> (raw)
In-Reply-To: <20250630204536.1358327-1-sashal@kernel.org>
From: Shuai Zhang <quic_shuaz@quicinc.com>
[ Upstream commit db0ff7e15923ffa7067874604ca275e92343f1b1 ]
Some modules have BT_EN enabled via a hardware pull-up,
meaning it is not defined in the DTS and is not controlled
through the power sequence. In such cases, fall through
to follow the legacy flow.
Signed-off-by: Shuai Zhang <quic_shuaz@quicinc.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
**YES**
This commit should be backported to stable kernel trees. Here's my
extensive analysis:
**1. Nature of the Fix:**
This is a critical bug fix that addresses driver probe failure on
specific hardware configurations. The commit fixes an issue where the
Bluetooth driver would fail to load on modules that have BT_EN enabled
via hardware pull-up rather than through device tree configuration.
**2. Code Analysis:**
The key change is in the error handling path:
```c
- if (IS_ERR(qcadev->bt_power->pwrseq))
- return PTR_ERR(qcadev->bt_power->pwrseq);
- break;
+ if (IS_ERR(qcadev->bt_power->pwrseq))
+ qcadev->bt_power->pwrseq = NULL;
+ else
+ break;
```
Previously, when `devm_pwrseq_get()` failed, the driver would
immediately return an error, causing the entire probe to fail. The fix
changes this behavior to set `pwrseq` to NULL and fall through to the
legacy initialization flow, allowing the driver to continue loading.
**3. Impact on Users:**
- **Before the fix**: Complete failure to load Bluetooth driver on
affected hardware
- **After the fix**: Driver loads successfully using the legacy power
control flow
- This directly affects system functionality - without this fix,
Bluetooth is completely non-functional on affected devices
**4. Risk Assessment:**
- **Minimal risk**: The change is contained to error handling logic
- **No new features**: This purely fixes existing functionality
- **Well-defined scope**: Only affects specific SoC types (QCA_WCN6855,
QCA_WCN7850, QCA_WCN6750)
- **Graceful fallback**: Uses existing legacy flow rather than
introducing new code paths
**5. Stable Kernel Criteria:**
This commit meets all the criteria for stable backporting:
- ✓ Fixes a real bug that users are hitting
- ✓ Small and self-contained change (7 lines added, 3 removed)
- ✓ Already tested in mainline
- ✓ Doesn't add new functionality
- ✓ Low risk of regression
**6. Hardware Configuration Addressed:**
The commit specifically handles modules where:
- BT_EN is enabled via hardware pull-up
- No "enable-gpios" property in device tree
- Power sequencer is not available/applicable
This is a valid hardware configuration that was overlooked in the
original implementation, making this fix essential for proper hardware
support.
The commit follows the pattern of similar Bluetooth driver fixes that
have been backported (like the first reference commit) - small, targeted
fixes that restore functionality without architectural changes.
drivers/bluetooth/hci_qca.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index 025b9a07c0875..e6ad01d5e1d5d 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -2363,10 +2363,17 @@ static int qca_serdev_probe(struct serdev_device *serdev)
*/
qcadev->bt_power->pwrseq = devm_pwrseq_get(&serdev->dev,
"bluetooth");
- if (IS_ERR(qcadev->bt_power->pwrseq))
- return PTR_ERR(qcadev->bt_power->pwrseq);
- break;
+ /*
+ * Some modules have BT_EN enabled via a hardware pull-up,
+ * meaning it is not defined in the DTS and is not controlled
+ * through the power sequence. In such cases, fall through
+ * to follow the legacy flow.
+ */
+ if (IS_ERR(qcadev->bt_power->pwrseq))
+ qcadev->bt_power->pwrseq = NULL;
+ else
+ break;
}
fallthrough;
case QCA_WCN3988:
--
2.39.5
next prev parent reply other threads:[~2025-06-30 21:00 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-30 20:45 [PATCH AUTOSEL 6.12 01/21] ublk: sanity check add_dev input for underflow Sasha Levin
2025-06-30 20:45 ` [PATCH AUTOSEL 6.12 02/21] atm: idt77252: Add missing `dma_map_error()` Sasha Levin
2025-06-30 20:45 ` [PATCH AUTOSEL 6.12 03/21] um: vector: Reduce stack usage in vector_eth_configure() Sasha Levin
2025-06-30 20:45 ` [PATCH AUTOSEL 6.12 04/21] ASoC: SOF: Intel: hda: Use devm_kstrdup() to avoid memleak Sasha Levin
2025-06-30 20:45 ` [PATCH AUTOSEL 6.12 05/21] Revert "PCI/ACPI: Fix allocated memory release on error in pci_acpi_scan_root()" Sasha Levin
2025-06-30 20:45 ` [PATCH AUTOSEL 6.12 06/21] ALSA: hda/realtek: Add mic-mute LED setup for ASUS UM5606 Sasha Levin
2025-06-30 20:45 ` [PATCH AUTOSEL 6.12 07/21] io_uring: make fallocate be hashed work Sasha Levin
2025-06-30 20:45 ` [PATCH AUTOSEL 6.12 08/21] ASoC: amd: yc: add quirk for Acer Nitro ANV15-41 internal mic Sasha Levin
2025-06-30 20:45 ` [PATCH AUTOSEL 6.12 09/21] ALSA: hda/realtek - Enable mute LED on HP Pavilion Laptop 15-eg100 Sasha Levin
2025-06-30 20:45 ` [PATCH AUTOSEL 6.12 10/21] ALSA: hda/realtek: Add quirks for some Clevo laptops Sasha Levin
2025-06-30 20:45 ` [PATCH AUTOSEL 6.12 11/21] net: usb: qmi_wwan: add SIMCom 8230C composition Sasha Levin
2025-06-30 20:45 ` Sasha Levin [this message]
2025-06-30 20:45 ` [PATCH AUTOSEL 6.12 13/21] HID: lenovo: Add support for ThinkPad X1 Tablet Thin Keyboard Gen2 Sasha Levin
2025-06-30 20:45 ` [PATCH AUTOSEL 6.12 14/21] net: mana: Record doorbell physical address in PF mode Sasha Levin
2025-06-30 20:45 ` [PATCH AUTOSEL 6.12 15/21] btrfs: fix assertion when building free space tree Sasha Levin
2025-06-30 20:45 ` [PATCH AUTOSEL 6.12 16/21] vt: add missing notification when switching back to text mode Sasha Levin
2025-06-30 20:45 ` [PATCH AUTOSEL 6.12 17/21] bpf: Adjust free target to avoid global starvation of LRU map Sasha Levin
2025-06-30 20:45 ` [PATCH AUTOSEL 6.12 18/21] riscv: vdso: Exclude .rodata from the PT_DYNAMIC segment Sasha Levin
2025-06-30 20:45 ` [PATCH AUTOSEL 6.12 19/21] HID: Add IGNORE quirk for SMARTLINKTECHNOLOGY Sasha Levin
2025-06-30 20:45 ` [PATCH AUTOSEL 6.12 20/21] HID: quirks: Add quirk for 2 Chicony Electronics HP 5MP Cameras Sasha Levin
2025-06-30 20:45 ` [PATCH AUTOSEL 6.12 21/21] HID: nintendo: avoid bluetooth suspend/resume stalls Sasha Levin
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=20250630204536.1358327-12-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=luiz.von.dentz@intel.com \
--cc=marcel@holtmann.org \
--cc=patches@lists.linux.dev \
--cc=quic_shuaz@quicinc.com \
--cc=stable@vger.kernel.org \
/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