Skip to content
Commit 44ed0c60 authored by Gudipudi Ramana Kumar's avatar Gudipudi Ramana Kumar Committed by Benjamin Cabé
Browse files

samples: bluetooth: Increase number of buffers for avoiding deadlocks



The central_multilink sample issues various API calls
(in particular because it does some from the bt_workq("BT RX WQ"))
this results in a deadlock since there are not enough
HCI command buffers available, this is causing deadlocks on hardware
that do not support BT_HCI_ACL_FLOW_CONTROL.

Below is the flow where assert is observed:
bt_hci_le_enh_conn_complete() -> bt_conn_connected()
-> connected() callback -> start_scan() -> bt_le_scan_start()
-> set_random_address() -> bt_hci_cmd_send_sync: opcode 0x2005
-> Controller unresponsive, command opcode 0x2005 timeout with err -11

Since the start_scan is called from the callback and BT RX WQ thread,
the command buffers are still not available for the system work queue
to process the hci commands it has to send out for starting the scan.

By adding additional buffers this deadlock can be avoided.

Signed-off-by: default avatarGudipudi Ramana Kumar <ragudipu@silabs.com>
parent f7280fac
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment