Skip to content

[PW_SID:1103706] Bluetooth: hci_sync: fix simultaneous discovery stuck in FINDING#262

Open
BluezTestBot wants to merge 1 commit into
workflowfrom
1103706
Open

[PW_SID:1103706] Bluetooth: hci_sync: fix simultaneous discovery stuck in FINDING#262
BluezTestBot wants to merge 1 commit into
workflowfrom
1103706

Conversation

@BluezTestBot
Copy link
Copy Markdown

When hci_inquiry_complete_evt is called between le_scan_disable and
le_set_scan_enable_complete and no remote name needs to be resolved,
the interleaved discovery with SIMULTANEOUS quirk gets stuck in
DISCOVERY_FINDING. le_set_scan_enable_complete does not check inquiry
state. No one sets DISCOVERY_STOPPED in this process.

< HCI Command: LE Set Extended Scan Enable #1764 [hci0] 608.610392
Extended scan: Disabled (0x00)
Filter duplicates: Disabled (0x00)
Duration: 0 msec (0x0000)
Period: 0.00 sec (0x0000)

HCI Event: Inquiry Complete (0x01) #1765 [hci0] 608.610548
Status: Success (0x00)
HCI Event: Command Complete (0x0e) #1766 [hci0] 608.611589
LE Set Extended Scan Enable (0x08|0x0042) ncmd 2
Status: Success (0x00)

Add scan_disable_complete to check state and stop discovery if stuck.
Tested with bluetooth AX201 (8087:0026) in Dell Vostro 13 laptop.

[4517.963204] hci0: state 0 -> 1
[4518.096858] hci0: state 1 -> 2
[4528.353765] hci0: state 2 -> 0
[4528.353776] hci0: state finding to stopped
[4533.966844] hci0: state 0 -> 1
[4534.097702] hci0: state 1 -> 2
[4544.478600] hci0: state 2 -> 0

Fixes: 8ffde2a ("Bluetooth: Convert le_scan_disable timeout to hci_sync")
Signed-off-by: Jiajia Liu liujiajia@kylinos.cn

net/bluetooth/hci_sync.c | 25 ++++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)

When hci_inquiry_complete_evt is called between le_scan_disable and
le_set_scan_enable_complete and no remote name needs to be resolved,
the interleaved discovery with SIMULTANEOUS quirk gets stuck in
DISCOVERY_FINDING. le_set_scan_enable_complete does not check inquiry
state. No one sets DISCOVERY_STOPPED in this process.

  < HCI Command: LE Set Extended Scan Enable  #1764 [hci0] 608.610392
          Extended scan: Disabled (0x00)
          Filter duplicates: Disabled (0x00)
          Duration: 0 msec (0x0000)
          Period: 0.00 sec (0x0000)
  > HCI Event: Inquiry Complete (0x01)        #1765 [hci0] 608.610548
          Status: Success (0x00)
  > HCI Event: Command Complete (0x0e)        #1766 [hci0] 608.611589
        LE Set Extended Scan Enable (0x08|0x0042) ncmd 2
          Status: Success (0x00)

Add scan_disable_complete to check state and stop discovery if stuck.
Tested with bluetooth AX201 (8087:0026) in Dell Vostro 13 laptop.

  [4517.963204] hci0: state 0 -> 1
  [4518.096858] hci0: state 1 -> 2
  [4528.353765] hci0: state 2 -> 0
  [4528.353776] hci0: state finding to stopped
  [4533.966844] hci0: state 0 -> 1
  [4534.097702] hci0: state 1 -> 2
  [4544.478600] hci0: state 2 -> 0

Fixes: 8ffde2a ("Bluetooth: Convert le_scan_disable timeout to hci_sync")
Signed-off-by: Jiajia Liu <liujiajia@kylinos.cn>
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

CheckPatch
Desc: Run checkpatch.pl script
Duration: 0.74 seconds
Result: PASS

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

VerifyFixes
Desc: Verify Fixes tag format and validity
Duration: 0.13 seconds
Result: PASS

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

VerifySignedoff
Desc: Verify Signed-off-by chain
Duration: 0.13 seconds
Result: PASS

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

GitLint
Desc: Run gitlint
Duration: 0.32 seconds
Result: PASS

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

SubjectPrefix
Desc: Check subject contains "Bluetooth" prefix
Duration: 0.12 seconds
Result: PASS

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

BuildKernel
Desc: Build Kernel for Bluetooth
Duration: 26.47 seconds
Result: PASS

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

CheckAllWarning
Desc: Run linux kernel with all warning enabled
Duration: 28.43 seconds
Result: PASS

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

CheckSparse
Desc: Run sparse tool with linux kernel
Duration: 28.92 seconds
Result: PASS

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

BuildKernel32
Desc: Build 32bit Kernel for Bluetooth
Duration: 24.87 seconds
Result: PASS

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

TestRunnerSetup
Desc: Setup kernel and bluez for test-runner
Duration: 535.30 seconds
Result: PASS

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

TestRunner_l2cap-tester
Desc: Run l2cap-tester with test-runner
Duration: 59.65 seconds
Result: PASS

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

TestRunner_iso-tester
Desc: Run iso-tester with test-runner
Duration: 77.77 seconds
Result: PASS

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

TestRunner_bnep-tester
Desc: Run bnep-tester with test-runner
Duration: 19.01 seconds
Result: PASS

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

TestRunner_mgmt-tester
Desc: Run mgmt-tester with test-runner
Duration: 210.17 seconds
Result: FAIL
Output:

Total: 494, Passed: 489 (99.0%), Failed: 1, Not Run: 4

Failed Test Cases
Read Exp Feature - Success                           Failed       0.247 seconds

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

TestRunner_rfcomm-tester
Desc: Run rfcomm-tester with test-runner
Duration: 25.71 seconds
Result: PASS

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

TestRunner_sco-tester
Desc: Run sco-tester with test-runner
Duration: 32.80 seconds
Result: PASS

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

TestRunner_ioctl-tester
Desc: Run ioctl-tester with test-runner
Duration: 26.19 seconds
Result: PASS

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

TestRunner_mesh-tester
Desc: Run mesh-tester with test-runner
Duration: 25.96 seconds
Result: FAIL
Output:

Total: 10, Passed: 8 (80.0%), Failed: 2, Not Run: 0

Failed Test Cases
Mesh - Send cancel - 1                               Timed out    2.344 seconds
Mesh - Send cancel - 2                               Timed out    1.992 seconds

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

TestRunner_smp-tester
Desc: Run smp-tester with test-runner
Duration: 23.25 seconds
Result: PASS

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

TestRunner_userchan-tester
Desc: Run userchan-tester with test-runner
Duration: 20.24 seconds
Result: PASS

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

TestRunner_6lowpan-tester
Desc: Run 6lowpan-tester with test-runner
Duration: 22.78 seconds
Result: PASS

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 1, 2026

IncrementalBuild
Desc: Incremental build with the patches in the series
Duration: 24.64 seconds
Result: PASS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant