Skip to contentSkip to conversation

Bluetooth: hci_qca: disable power control for WCN7850 when bt_en is not defined

PATCH Applied Shuai Zhang 6 participants 7 messages Mar 24 – Oct 16

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 Bluetooth: hci_qca: disable power control for WCN7850 when bt_en is not defined

On platforms using an M.2 slot with both UART and USB support, bt_en is pulled high by hardware. In this case, software-based power control should be disabled. The current platforms are Lemans-EVK and Monaco-EVK.

Add QCA_WCN7850 to the existing condition so that power_ctrl_enabled is cleared when bt_en is not software-controlled (or absent), aligning its behavior with WCN6750 and WCN6855

---
Changes for v3
- Add change history.
- Link to v2: https://lore.kernel.org/all/[email protected]/

Changes for v2
- Expand the commit description to include the affected platforms.
- Link to v1: https://lore.kernel.org/all/[email protected]/

---
 drivers/bluetooth/hci_qca.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/bluetooth/hci_qca.c +2 -1
index c17a462aef55..4512ff7cd0c0 100644
@@ -2484,7 +2484,8 @@ static int qca_serdev_probe(struct serdev_device *serdev)
 
 		if (!qcadev->bt_en &&
 		    (data->soc_type == QCA_WCN6750 ||
-		     data->soc_type == QCA_WCN6855))
+		     data->soc_type == QCA_WCN6855 ||
+		     data->soc_type == QCA_WCN7850))
 			power_ctrl_enabled = false;
 
 		qcadev->sw_ctrl = devm_gpiod_get_optional(&serdev->dev, "swctrl",
Signature · 1 line
2.34.1
#1 lore raw

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=1071339

---Test result---

Test Summary:

CheckPatch                    PENDING   0.33 seconds
GitLint                       PENDING   0.26 seconds
SubjectPrefix                 PASS      0.09 seconds
BuildKernel                   PASS      26.79 seconds
CheckAllWarning               PASS      31.96 seconds
CheckSparse                   PASS      28.09 seconds
BuildKernel32                 PASS      25.93 seconds
TestRunnerSetup               PASS      577.67 seconds
TestRunner_l2cap-tester       FAIL      32.97 seconds
TestRunner_iso-tester         FAIL      35.05 seconds
TestRunner_bnep-tester        PASS      6.59 seconds
TestRunner_mgmt-tester        FAIL      120.45 seconds
TestRunner_rfcomm-tester      PASS      9.56 seconds
TestRunner_sco-tester         FAIL      14.54 seconds
TestRunner_ioctl-tester       PASS      10.50 seconds
TestRunner_mesh-tester        FAIL      12.55 seconds
TestRunner_smp-tester         PASS      8.72 seconds
TestRunner_userchan-tester    PASS      6.85 seconds
IncrementalBuild              PENDING   0.75 seconds

Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:

##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:

##############################
Test: TestRunner_l2cap-tester - FAIL
Desc: Run l2cap-tester with test-runner Output:
Total: 96, Passed: 95 (99.0%), Failed: 1, Not Run: 0

Failed Test Cases
L2CAP BR/EDR Server - Set PHY 2M Failed 0.122 seconds
##############################
Test: TestRunner_iso-tester - FAIL
Desc: Run iso-tester with test-runner
Output:

BUG: KASAN: slab-use-after-free in le_read_features_complete+0x7e/0x2b0

Total: 141, Passed: 141 (100.0%), Failed: 0, Not Run: 0
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner
Output:
Total: 494, Passed: 489 (99.0%), Failed: 1, Not Run: 4

Failed Test Cases
Read Exp Feature - Success Failed 0.110 seconds
##############################
Test: TestRunner_sco-tester - FAIL
Desc: Run sco-tester with test-runner
Output:
WARNING: possible circular locking dependency detected

BUG: sleeping function called from invalid context at net/core/sock.c:3782

Total: 30, Passed: 30 (100.0%), Failed: 0, Not Run: 0
##############################
Test: TestRunner_mesh-tester - FAIL
Desc: Run mesh-tester with test-runner Output:
Total: 10, Passed: 8 (80.0%), Failed: 2, Not Run: 0

Failed Test Cases

Mesh - Send cancel - 1                               Timed out    2.757 seconds
Mesh - Send cancel - 2                               Timed out    1.995 seconds

##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series Output:

---
Regards,
Linux Bluetooth

maintainer Reviewed-by on v3 1/1
#2 lore raw
In reply to Shuai Zhang
Quoted 11 lines · Shuai Zhang

On platforms using an M.2 slot with both UART and USB support, bt_en is pulled high by hardware. In this case, software-based power control should be disabled. The current platforms are Lemans-EVK and Monaco-EVK.

Add QCA_WCN7850 to the existing condition so that power_ctrl_enabled is cleared when bt_en is not software-controlled (or absent), aligning its behavior with WCN6750 and WCN6855

---

#3 lore raw

Hi Shuai,

Quoted 8 lines · Bartosz Golaszewski
Quoted 5 lines · Shuai Zhang

On platforms using an M.2 slot with both UART and USB support, bt_en is pulled high by hardware. In this case, software-based power control should be disabled. The current platforms are Lemans-EVK and Monaco-EVK.

Quoted 8 lines
Quoted 6 lines

Add QCA_WCN7850 to the existing condition so that power_ctrl_enabled is cleared when bt_en is not software-controlled (or absent), aligning its behavior with WCN6750 and WCN6855

---

Let's check if the following is true before I push it:

https://sashiko.dev/#/patchset/20260324023016.3889062-1-shuai.zhang%40oss.qualcomm.com

Signature · 1 line
Luiz Augusto von Dentz
#4 lore raw

Hi Luiz

Quoted 13 lines · Luiz Augusto von Dentz

Hi Shuai,

Quoted 10 lines · Bartosz Golaszewski
Quoted 8 lines · Shuai Zhang

On platforms using an M.2 slot with both UART and USB support, bt_en is pulled high by hardware. In this case, software-based power control should be disabled. The current platforms are Lemans-EVK and Monaco-EVK.

Add QCA_WCN7850 to the existing condition so that power_ctrl_enabled is cleared when bt_en is not software-controlled (or absent), aligning its behavior with WCN6750 and WCN6855

Quoted 6 lines
Quoted 3 lines
Quoted 2 lines

---

Let's check if the following is true before I push it:

https://sashiko.dev/#/patchset/20260324023016.3889062-1-shuai.zhang%40oss.qualcomm.com

The question raised by this check is whether |qca_power_shutdown()| properly considers WCN7850. WCN7850 does not need any special handling and is intentionally covered by the default case in |qca_power_shutdown()|.

Thanks,

Shuai

#5 lore raw
In reply to Shuai Zhang
This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz <[email protected]>:

Hello:

This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz <[email protected]>:

Quoted 9 lines · On Tue, 24 Mar 2026 10:30:16 +0800 you wrote:

On platforms using an M.2 slot with both UART and USB support, bt_en is pulled high by hardware. In this case, software-based power control should be disabled. The current platforms are Lemans-EVK and Monaco-EVK.

Add QCA_WCN7850 to the existing condition so that power_ctrl_enabled is cleared when bt_en is not software-controlled (or absent), aligning its behavior with WCN6750 and WCN6855

[...]

Here is the summary with links:
- [v3] Bluetooth: hci_qca: disable power control for WCN7850 when bt_en is not defined

    https://git.kernel.org/bluetooth/bluetooth-next/c/a94b3460712c

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
#6 lore raw
In reply to Shuai Zhang
Quoted 26 lines · Shuai Zhang

On platforms using an M.2 slot with both UART and USB support, bt_en is pulled high by hardware. In this case, software-based power control should be disabled. The current platforms are Lemans-EVK and Monaco-EVK.

Add QCA_WCN7850 to the existing condition so that power_ctrl_enabled is cleared when bt_en is not software-controlled (or absent), aligning its behavior with WCN6750 and WCN6855

---
Changes for v3
- Add change history.
- Link to v2: https://lore.kernel.org/all/[email protected]/

Changes for v2
- Expand the commit description to include the affected platforms.
- Link to v1: https://lore.kernel.org/all/[email protected]/

---
  drivers/bluetooth/hci_qca.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)
drivers/bluetooth/hci_qca.c +0 -0
index c17a462aef55..4512ff7cd0c0 100644

drivers/bluetooth/hci_qca.c static int qca_serdev_probe(struct serdev_device *serdev) · line 2489

Quoted 7 lines
drivers/bluetooth/hci_qca.c +2 -1
@@ -2484,7 +2484,8 @@ static int qca_serdev_probe(struct serdev_device *serdev)
 
  		if (!qcadev->bt_en &&
  		    (data->soc_type == QCA_WCN6750 ||
-		     data->soc_type == QCA_WCN6855))
+		     data->soc_type == QCA_WCN6855 ||
+		     data->soc_type == QCA_WCN7850))
  			power_ctrl_enabled = false;

This disables power_ctrl for WCN7850 soldered down on the main board and handled by pwrseq, which is a regression.

When pwrseq handles the QCA_WCN7850 qcadev->bt_en is obviously NULL, but qcadev->bt_power->pwrseq is not.

The test should be if (!qcadev->bt_en && !qcadev->bt_power && !qcadev->bt_power->pwrseq

Neil

Quoted 2 lines
drivers/bluetooth/hci_qca.c +0 -0
  		qcadev->sw_ctrl = devm_gpiod_get_optional(&serdev->dev, "swctrl",