diff options
| author | Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com> | 2024-12-20 18:32:52 +0530 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-01-17 13:40:39 +0100 |
| commit | 49cd0ccacc7d76fb088ee40bb31d4b0f6af828c9 (patch) | |
| tree | 264b80fea5a8b7f483cbd0ee01d92266612d865a /drivers/bluetooth | |
| parent | 1f88b531356607db278d566fb0ff3ac13dae0fd2 (diff) | |
| download | linux-49cd0ccacc7d76fb088ee40bb31d4b0f6af828c9.tar.gz linux-49cd0ccacc7d76fb088ee40bb31d4b0f6af828c9.tar.bz2 linux-49cd0ccacc7d76fb088ee40bb31d4b0f6af828c9.zip | |
Bluetooth: btnxpuart: Fix driver sending truncated data
[ Upstream commit 8023dd2204254a70887f5ee58d914bf70a060b9d ]
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: 689ca16e5232 ("Bluetooth: NXP: Add protocol support for NXP Bluetooth chipsets")
Signed-off-by: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/bluetooth')
| -rw-r--r-- | drivers/bluetooth/btnxpuart.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/bluetooth/btnxpuart.c b/drivers/bluetooth/btnxpuart.c index 5ea0d23e88c0..a028984f2782 100644 --- a/drivers/bluetooth/btnxpuart.c +++ b/drivers/bluetooth/btnxpuart.c @@ -1336,6 +1336,7 @@ static void btnxpuart_tx_work(struct work_struct *work) while ((skb = nxp_dequeue(nxpdev))) { len = serdev_device_write_buf(serdev, skb->data, skb->len); + serdev_device_wait_until_sent(serdev, 0); hdev->stat.byte_tx += len; skb_pull(skb, len); |
