[PW_SID:1103706] Bluetooth: hci_sync: fix simultaneous discovery stuck in FINDING#262
[PW_SID:1103706] Bluetooth: hci_sync: fix simultaneous discovery stuck in FINDING#262BluezTestBot wants to merge 1 commit into
Conversation
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>
|
CheckPatch |
|
VerifyFixes |
|
VerifySignedoff |
|
GitLint |
|
SubjectPrefix |
|
BuildKernel |
|
CheckAllWarning |
|
CheckSparse |
|
BuildKernel32 |
|
TestRunnerSetup |
|
TestRunner_l2cap-tester |
|
TestRunner_iso-tester |
|
TestRunner_bnep-tester |
|
TestRunner_mgmt-tester |
|
TestRunner_rfcomm-tester |
|
TestRunner_sco-tester |
|
TestRunner_ioctl-tester |
|
TestRunner_mesh-tester |
|
TestRunner_smp-tester |
|
TestRunner_userchan-tester |
|
TestRunner_6lowpan-tester |
|
IncrementalBuild |
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)
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(-)