* [PATCH v1] FROMLIST: driver: bluetooth: hci_qca: Always perform cleanup on every setup failure
@ 2025-12-22 12:38 jinwli
2025-12-22 13:52 ` [v1] " bluez.test.bot
2025-12-29 13:02 ` [PATCH v1] " Konrad Dybcio
0 siblings, 2 replies; 3+ messages in thread
From: jinwli @ 2025-12-22 12:38 UTC (permalink / raw)
To: Marcel Holtmann, Johan Hedberg, Luiz Augusto von Dentz
Cc: linux-bluetooth, linux-kernel, linux-arm-msm, cheng.jiang,
quic_chezhou, wei.deng, shuai.zhang, mengshi.wu, jinwang.li
The retry logic in qca_setup combined error handling and
retry gating under a single condition. This caused the final failed
attempt (when retries reached MAX_INIT_RETRIES) to return without
performing cleanup.
So only jumping to retry when there is a error and retries have not
reached MAX_INIT_RETRIES.
Signed-off-by: jinwli <jinwang.li@oss.qualcomm.com>
---
drivers/bluetooth/hci_qca.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/bluetooth/hci_qca.c b/drivers/bluetooth/hci_qca.c
index 1d3b62579..b695577f8 100644
--- a/drivers/bluetooth/hci_qca.c
+++ b/drivers/bluetooth/hci_qca.c
@@ -2026,7 +2026,7 @@ static int qca_setup(struct hci_uart *hu)
}
out:
- if (ret && retries < MAX_INIT_RETRIES) {
+ if (ret) {
bt_dev_warn(hdev, "Retry BT power ON:%d", retries);
qca_power_shutdown(hu);
if (hu->serdev) {
@@ -2037,8 +2037,10 @@ static int qca_setup(struct hci_uart *hu)
return ret;
}
}
- retries++;
- goto retry;
+ if (retries < MAX_INIT_RETRIES) {
+ retries++;
+ goto retry;
+ }
}
/* Setup bdaddr */
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [v1] FROMLIST: driver: bluetooth: hci_qca: Always perform cleanup on every setup failure
2025-12-22 12:38 [PATCH v1] FROMLIST: driver: bluetooth: hci_qca: Always perform cleanup on every setup failure jinwli
@ 2025-12-22 13:52 ` bluez.test.bot
2025-12-29 13:02 ` [PATCH v1] " Konrad Dybcio
1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2025-12-22 13:52 UTC (permalink / raw)
To: linux-bluetooth, jinwang.li
[-- Attachment #1: Type: text/plain, Size: 2920 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/project/bluetooth/list/?series=1035706
---Test result---
Test Summary:
CheckPatch PENDING 0.41 seconds
GitLint PENDING 0.38 seconds
SubjectPrefix FAIL 0.42 seconds
BuildKernel PASS 23.79 seconds
CheckAllWarning PASS 26.01 seconds
CheckSparse PASS 28.72 seconds
BuildKernel32 PASS 23.42 seconds
TestRunnerSetup PASS 512.69 seconds
TestRunner_l2cap-tester PASS 28.69 seconds
TestRunner_iso-tester PASS 68.25 seconds
TestRunner_bnep-tester PASS 6.29 seconds
TestRunner_mgmt-tester FAIL 122.41 seconds
TestRunner_rfcomm-tester PASS 9.45 seconds
TestRunner_sco-tester FAIL 14.59 seconds
TestRunner_ioctl-tester PASS 10.08 seconds
TestRunner_mesh-tester FAIL 11.51 seconds
TestRunner_smp-tester PASS 8.58 seconds
TestRunner_userchan-tester PASS 6.70 seconds
IncrementalBuild PENDING 0.80 seconds
Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:
##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:
##############################
Test: SubjectPrefix - FAIL
Desc: Check subject contains "Bluetooth" prefix
Output:
"Bluetooth: " prefix is not specified in the subject
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner
Output:
Total: 494, Passed: 487 (98.6%), Failed: 3, Not Run: 4
Failed Test Cases
Read Exp Feature - Success Failed 0.110 seconds
LL Privacy - Add Device 2 (2 Devices to AL) Failed 0.174 seconds
LL Privacy - Set Flags 3 (2 Devices to RL) Failed 0.175 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 1.851 seconds
Mesh - Send cancel - 2 Timed out 1.996 seconds
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v1] FROMLIST: driver: bluetooth: hci_qca: Always perform cleanup on every setup failure
2025-12-22 12:38 [PATCH v1] FROMLIST: driver: bluetooth: hci_qca: Always perform cleanup on every setup failure jinwli
2025-12-22 13:52 ` [v1] " bluez.test.bot
@ 2025-12-29 13:02 ` Konrad Dybcio
1 sibling, 0 replies; 3+ messages in thread
From: Konrad Dybcio @ 2025-12-29 13:02 UTC (permalink / raw)
To: jinwli, Marcel Holtmann, Johan Hedberg, Luiz Augusto von Dentz
Cc: linux-bluetooth, linux-kernel, linux-arm-msm, cheng.jiang,
quic_chezhou, wei.deng, shuai.zhang, mengshi.wu
On 12/22/25 1:38 PM, jinwli wrote:
> The retry logic in qca_setup combined error handling and
> retry gating under a single condition. This caused the final failed
> attempt (when retries reached MAX_INIT_RETRIES) to return without
> performing cleanup.
>
> So only jumping to retry when there is a error and retries have not
> reached MAX_INIT_RETRIES.
>
> Signed-off-by: jinwli <jinwang.li@oss.qualcomm.com>
Please fix your git name (unless that is how you actually write your name)
Why the 'FROMLIST:' in the title? It seems like you're the first submitter:
https://lore.kernel.org/all/?q=Always+perform+cleanup+on+every+setup+failure
Konrad
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-12-29 13:02 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-22 12:38 [PATCH v1] FROMLIST: driver: bluetooth: hci_qca: Always perform cleanup on every setup failure jinwli
2025-12-22 13:52 ` [v1] " bluez.test.bot
2025-12-29 13:02 ` [PATCH v1] " Konrad Dybcio
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.