zephyr/subsys
Joakim Andersson 8a32c2d967 Bluetooth: host: Fix disconnect priority event handling
Fix issue is host handling of connected and disconnected event.
Since the host wants the disconnected event to be processed as a
priority event as well as in reguler event context while the connected
event is always in reguler event context we can end up in a situation
where the disconnected priority event is processed before the connected
event.

Since the disconnected priority event is there to release unack'ed TX
pending on the connection in case the RX thread is blocked waiting
for TX resources, we need to keep this behavior. Otherwise this would
be a potential deadlock of the RX thread waiting for resources that can
only be released by the RX thread.
When this situation happens we know that there cannot be any pending TX
on this connection so we can safely skip releasing of unack'ed TX.

The second thing the disconnected priority event does is marking the TX
path on the connection as disconnected. We need to do the same in this
situation, so we make sure that the TX path is already marked
disconnected when providing the connected callback to the application.

This fixes a regression from 4be66bd33d.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2021-05-25 20:30:48 +03:00
..
bluetooth Bluetooth: host: Fix disconnect priority event handling 2021-05-25 20:30:48 +03:00
canbus canbus: isotp: remove unused work queue 2021-05-22 08:14:35 -05:00
console
cpp
debug Kconfig: Increase default thread analyzer stack size 2021-05-13 12:36:57 -04:00
demand_paging
dfu
disk
emul
fb
fs fs: logstr_dup causes error in LOG_ERROR messages 2021-05-11 07:14:24 -05:00
ipc ipc: rpmsg_service: Add missing log_strdup 2021-05-25 16:38:28 +02:00
jwt
logging tracing: fix conflict with RTT locking 2021-05-25 07:36:38 -05:00
lorawan
mgmt smp: shell: consume all pending buffers in smp_shell_process() 2021-05-06 19:13:20 +02:00
modbus
net net: tcp2: Ack any data received in FIN_WAIT_1 state 2021-05-24 23:30:36 -04:00
pm pm: trace pm_device_enable/disable 2021-05-17 18:45:57 -04:00
portability
random
settings
shell shell: kernel: fix reset command echo abrupt termination 2021-05-18 11:28:07 -05:00
stats
storage storage/stream: Move fill value handling to flash_sync 2021-05-08 07:10:31 +02:00
task_wdt task_wdt: Pause hardware wdt during debugging 2021-05-21 05:00:07 -05:00
testsuite ztest: set thread name to test name 2021-05-17 18:45:57 -04:00
timing
tracing tracing: fix conflict with RTT locking 2021-05-25 07:36:38 -05:00
usb usb: hid: remove get_protocol/set_protocol from USB HID class API 2021-05-07 13:14:47 +02:00
CMakeLists.txt
Kconfig