Bluetooth: hci_qca: Fix WCN3950 missing regulator release
PATCH 1/1 Bluetooth: hci_qca: Fix WCN3950 missing regulator release
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.
--- drivers/bluetooth/hci_qca.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/bluetooth/hci_qca.c +3 -0
@@ -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 :
Signature · 1 line
2.53.0
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
Quoted 11 lines · Stanislavs Nilovs
hci_qcadriver 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 hasenable_count.The issue was found with the help of Claude Opus 5 (Anthropic), which was asked to review
drivers/bluetooth/hci_qca.cfor 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.
Quoted 7 lines
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 <[email protected]>---