All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: hci_qca: Fix WCN3950 missing regulator release
@ 2026-10-27 19:36 Stanislavs Nilovs
  2026-10-27 21:28 ` bluez.test.bot
  2026-10-28 10:08 ` [PATCH] " Bartosz Golaszewski
  0 siblings, 2 replies; 3+ messages in thread
From: Stanislavs Nilovs @ 2026-10-27 19:36 UTC (permalink / raw)
  To: brgl, marcel, luiz.dentz, lumag
  Cc: linux-bluetooth, linux-arm-msm, linux-kernel

hci_qca driver is missing release of power regulators when module is
powered off or serial device is removed. This issue is most noticeable
during system shutdown, since the regulator core is firing a warning
backtrace that regulator to be freed still has enable_count.

The issue was found with the help of Claude Opus 5 (Anthropic), which
was asked to review drivers/bluetooth/hci_qca.c for the appearing
regulator warning backtrace during system shutdown. The fix itself was
generated by the tool and reviewed by me by applying it, building the
code and verifying issue is not reproduced anymore.

Tested on real hardware, but not on Linux's master branch. Driver was
backported to Linux 5.15 for internal testing and this is when the issue
was noticed.

Fixes: d5712c511cb3 ("Bluetooth: qca: add WCN3950 support")
Signed-off-by: Stanislavs Nilovs <valorcool@gmail.com>
---
 drivers/bluetooth/hci_qca.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index 7089e9b639b2..e22e2269efd7 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -2247,6 +2247,7 @@ static void qca_power_off(struct hci_uart *hu)
 	power = qcadev->bt_power;
 
 	switch (soc_type) {
+	case QCA_WCN3950:
 	case QCA_WCN3988:
 	case QCA_WCN3990:
 	case QCA_WCN3991:
@@ -2271,6 +2272,7 @@ static void qca_power_off(struct hci_uart *hu)
         }
 
 	switch (soc_type) {
+	case QCA_WCN3950:
 	case QCA_WCN3988:
 	case QCA_WCN3990:
 	case QCA_WCN3991:
@@ -2582,6 +2584,7 @@ static void qca_serdev_remove(struct serdev_device *serdev)
 	struct qca_power *power = qcadev->bt_power;
 
 	switch (qcadev->btsoc_type) {
+	case QCA_WCN3950:
 	case QCA_WCN3988:
 	case QCA_WCN3990:
 	case QCA_WCN3991:
-- 
2.53.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: Bluetooth: hci_qca: Fix WCN3950 missing regulator release
  2026-10-27 19:36 [PATCH] Bluetooth: hci_qca: Fix WCN3950 missing regulator release Stanislavs Nilovs
@ 2026-10-27 21:28 ` bluez.test.bot
  2026-10-28 10:08 ` [PATCH] " Bartosz Golaszewski
  1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2026-10-27 21:28 UTC (permalink / raw)
  To: linux-bluetooth, valorcool

[-- Attachment #1: Type: text/plain, Size: 1020 bytes --]

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/series/1194889/

---Test result---

Test Summary:
CheckPatch                    PASS      0.64 seconds
VerifyFixes                   PASS      0.09 seconds
VerifySignedoff               PASS      0.10 seconds
GitLint                       PASS      0.27 seconds
SubjectPrefix                 PASS      0.09 seconds
BuildKernel                   PASS      27.86 seconds
CheckAllWarning               PASS      31.78 seconds
CheckSparse                   PASS      34.58 seconds
BuildKernel32                 PASS      28.11 seconds
CheckKernelLLVM               PASS      39.30 seconds
TestRunnerSetup               PASS      655.40 seconds
IncrementalBuild              PASS      26.65 seconds



https://github.com/bluez/bluetooth-next/pull/1011

---
Regards,
Linux Bluetooth


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Bluetooth: hci_qca: Fix WCN3950 missing regulator release
  2026-10-27 19:36 [PATCH] Bluetooth: hci_qca: Fix WCN3950 missing regulator release Stanislavs Nilovs
  2026-10-27 21:28 ` bluez.test.bot
@ 2026-10-28 10:08 ` Bartosz Golaszewski
  1 sibling, 0 replies; 3+ messages in thread
From: Bartosz Golaszewski @ 2026-10-28 10:08 UTC (permalink / raw)
  To: Stanislavs Nilovs
  Cc: linux-bluetooth, linux-arm-msm, linux-kernel, brgl, marcel,
	luiz.dentz, lumag

On Tue, 27 Oct 2026 20:36:15 +0100, Stanislavs Nilovs
<valorcool@gmail.com> said:
> hci_qca driver is missing release of power regulators when module is
> powered off or serial device is removed. This issue is most noticeable
> during system shutdown, since the regulator core is firing a warning
> backtrace that regulator to be freed still has enable_count.
>
> The issue was found with the help of Claude Opus 5 (Anthropic), which
> was asked to review drivers/bluetooth/hci_qca.c for the appearing
> regulator warning backtrace during system shutdown. The fix itself was
> generated by the tool and reviewed by me by applying it, building the
> code and verifying issue is not reproduced anymore.
>
> Tested on real hardware, but not on Linux's master branch. Driver was
> backported to Linux 5.15 for internal testing and this is when the issue
> was noticed.
>
> Fixes: d5712c511cb3 ("Bluetooth: qca: add WCN3950 support")
> Signed-off-by: Stanislavs Nilovs <valorcool@gmail.com>
> ---

Acked-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-10-28 10:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-27 19:36 [PATCH] Bluetooth: hci_qca: Fix WCN3950 missing regulator release Stanislavs Nilovs
2026-10-27 21:28 ` bluez.test.bot
2026-10-28 10:08 ` [PATCH] " Bartosz Golaszewski

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.