Re: [PATCH] Bluetooth: hci_h5: Avoid clearing the escape bit for ordinary bytes

From: patchwork-bot+bluetooth

Date: Tue Sep 08 2026 - 12:47:25 EST


Hello:

This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx>:

On Mon, 7 Sep 2026 23:08:08 +0800 you wrote:
> h5_unslip_one_byte() calls test_and_clear_bit() for every byte other than
> an initial SLIP escape byte, even when H5_RX_ESC is already clear. This
> performs an unnecessary atomic read-modify-write on the ordinary-byte
> receive path. On x86, it emits a locked btr instruction for each such
> byte.
>
> Test H5_RX_ESC first and clear it only when consuming an escaped byte.
> Handle an initial SLIP escape byte in the alternative branch. The HCI
> UART receive callbacks are serialized by the TTY layer, and H5_RX_ESC
> is only changed by receive processing and initialization, so there is
> no need to atomically test and clear it in one operation.
>
> [...]

Here is the summary with links:
- Bluetooth: hci_h5: Avoid clearing the escape bit for ordinary bytes
https://git.kernel.org/bluetooth/bluetooth-next/c/676cc47454c4

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html