This is an automated email from the ASF dual-hosted git repository. GUIDINGLI pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit bed0376fd8e30cfe2a3ddab0b3387b595dd9ba95 Author: chenzihan1 <[email protected]> AuthorDate: Thu Apr 30 14:42:59 2026 +0800 drivers/serial/uart_rpmsg: end the dma transfer when the send fails When rpmsg_send_nocopy() fails, the tx buffer is released but dmatx.length stays set, and uart_rpmsg_dmatxavail() only starts a new transfer when it is zero, so the channel never sends again. Clear it; the unsent data stays in the xmit buffer for the next attempt. Signed-off-by: chenzihan1 <[email protected]> Signed-off-by: Bowen Wang <[email protected]> --- drivers/serial/uart_rpmsg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/serial/uart_rpmsg.c b/drivers/serial/uart_rpmsg.c index 65db1ff54a7..e62ad7a4be3 100644 --- a/drivers/serial/uart_rpmsg.c +++ b/drivers/serial/uart_rpmsg.c @@ -240,6 +240,7 @@ static void uart_rpmsg_dmasend(FAR struct uart_dev_s *dev) if (rpmsg_send_nocopy(&priv->ept, msg, sizeof(*msg) + len) < 0) { rpmsg_release_tx_buffer(&priv->ept, msg); + dev->dmatx.length = 0; } }
