[PATCH v4 0/2] Bluetooth: hci_qca: Reopen the UART after enabling QCA2066

From: Shuai Zhang

Date: Tue Nov 10 2026 - 05:03:16 EST


QCA2066 does not reopen the UART after the controller is enabled, which
causes RX/TX out-of-sync errors. The UART has to be reopened once the
controller is powered on.

qca_regulator_init() already enables the controller and then reopens the
UART, but QCA2066 does not go through it. QCA2066 was added with its own
SoC type and handled in the default case.

Let QCA2066 go through qca_regulator_init() as well, and handle it in the
other places that check the SoC type in the same way.

Patch 1 reopens the UART after enabling QCA2066.

Patch 2 keeps HCI_UART_PROTO_READY in sync with the port state, so that a
port which failed to reopen is not closed or flushed again.

Changes in v4:
- Let QCA2066 go through qca_regulator_init() instead of adding a QCA2066
specific case.
- Link to v3
https://lore.kernel.org/all/20261028111839.2148515-1-shuai.zhang@xxxxxxxxxxxxxxxx/

Changes in v3:
- Patch 1 is unchanged from v2.
- Add patch 2. If serdev_device_open() fails during the reopen, the
port stays closed but HCI_UART_PROTO_READY stays set, so the later
serdev_device_close() and hci_uart_flush() use a closed port. Keep
the flag in sync with the port state and skip the port flush when
the port is not open.
- Link to v2:
https://lore.kernel.org/all/20261016022302.4003647-1-shuai.zhang@xxxxxxxxxxxxxxxx/

Changes in v2:
- Use a separate case for clearer logic.
- Link to v1:
https://lore.kernel.org/all/20261015092224.262158-1-shuai.zhang@xxxxxxxxxxxxxxxx/

Shuai Zhang (2):
Bluetooth: hci_qca: Reopen the UART after enabling QCA2066
Bluetooth: hci_qca: Don't use the serdev port after a failed reopen

drivers/bluetooth/btqca.c | 1 +
drivers/bluetooth/hci_qca.c | 46 +++++++++++++++++++++++++++++-----
drivers/bluetooth/hci_serdev.c | 6 +++--
3 files changed, 45 insertions(+), 8 deletions(-)

--
2.34.1