This is an automated email from the ASF dual-hosted git repository. xiaoxiang781216 pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 9690f4a15c91ef7422b2fa6d4a7f275540f1ac15 Author: zhangyuan29 <[email protected]> AuthorDate: Thu Aug 7 09:48:42 2025 +0800 noterpmsg: check rpmsg ept status before send message noterpmsg_transfer() runs with drv->lock held and interrupts disabled. Until the remote side binds the endpoint, rpmsg_send_nocopy() polls is_rpmsg_ept_ready() and sleeps between the polls (openamp patch 0004), which must not happen there. Check the endpoint first and return false while it is not ready: noterpmsg_work() retries after NOTE_RPMSG_WORK_DELAY and noterpmsg_add() makes room by overwriting the oldest notes. Assisted-by: Kiro:claude-opus-5-5 Signed-off-by: zhangyuan29 <[email protected]> --- drivers/note/noterpmsg_driver.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/note/noterpmsg_driver.c b/drivers/note/noterpmsg_driver.c index 5c29701160d..38f3b191078 100644 --- a/drivers/note/noterpmsg_driver.c +++ b/drivers/note/noterpmsg_driver.c @@ -134,6 +134,11 @@ static bool noterpmsg_transfer(FAR struct noterpmsg_driver_s *drv, uint32_t space; size_t len; + if (!is_rpmsg_ept_ready(&drv->ept)) + { + return false; + } + len = noterpmsg_length(drv); if (len == 0) {
