You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Drivers: Bluetooth: H4: Use a semaphore to wake up HCI RX thread
There is an issue that the buffer cannot be allocated by the function
`read_payload()` in UART ISR context. Then the UART RX will be
disabled. The H4 driver hopes to get the receive buffer in the HCI RX
thread and then open the UART RX again. However, there is a situation
where the HCI RX thread is blocked in getting the received data
buffer. However, since the UARt RX has been disabled, the HCI RX
thread cannot get the received data buffer. Therefore, the RX thread
is always blocked here, causing the Bluetooth host to not work
properly.
Add a semaphore `rx.ready` to notify new received data buffer has
been added to H4 RX queue.
Wait for the semaphore `rx.ready` instead of H4 RX queue in HCI RX
thread.
Wake up the HCI RX thread when failing to allocate the RX buffer.
Fixes#89879.
Signed-off-by: Lyle Zhu <[email protected]>
0 commit comments