Skip to content

Commit 8023dd2

Browse files
NeerajSanjayKaleVudentz
authored andcommitted
Bluetooth: btnxpuart: Fix driver sending truncated data
This fixes the apparent controller hang issue seen during stress test where the host sends a truncated payload, followed by HCI commands. The controller treats these HCI commands as a part of previously truncated payload, leading to command timeouts. Adding a serdev_device_wait_until_sent() call after serdev_device_write_buf() fixed the issue. Fixes: 689ca16 ("Bluetooth: NXP: Add protocol support for NXP Bluetooth chipsets") Signed-off-by: Neeraj Sanjay Kale <[email protected]> Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent a182d9c commit 8023dd2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/bluetooth/btnxpuart.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1381,6 +1381,7 @@ static void btnxpuart_tx_work(struct work_struct *work)
13811381

13821382
while ((skb = nxp_dequeue(nxpdev))) {
13831383
len = serdev_device_write_buf(serdev, skb->data, skb->len);
1384+
serdev_device_wait_until_sent(serdev, 0);
13841385
hdev->stat.byte_tx += len;
13851386

13861387
skb_pull(skb, len);

0 commit comments

Comments
 (0)