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 0bc1fadce65d5c98ba1aee7865f4f87980a46bbf
Author: Bowen Wang <[email protected]>
AuthorDate: Fri Jan 16 22:54:58 2026 +0800

    drivers/rptun: log the reset reason
    
    Log the reason when the peer asks this core to reset, and the reason
    and result when ops->reset() resets the peer.
    
    Signed-off-by: Bowen Wang <[email protected]>
---
 drivers/rptun/rptun.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/rptun/rptun.c b/drivers/rptun/rptun.c
index ffc8dccbd67..4869b24c621 100644
--- a/drivers/rptun/rptun.c
+++ b/drivers/rptun/rptun.c
@@ -935,13 +935,14 @@ static void rptun_check_peer_status(FAR struct 
rptun_priv_s *priv)
 
   if (RPTUN_STATUS_CHECK(status, BOARDIOC_SOFTRESETCAUSE_PANIC))
     {
-      syslog(LOG_EMERG,
-             "FATAL: Panic by remote core: %s\n",
+      syslog(LOG_EMERG, "FATAL: Panic by remote core: %s\n",
              RPTUN_GET_CPUNAME(priv->dev));
       PANIC();
     }
   else if(status != 0u)
     {
+      syslog(LOG_EMERG, "FATAL: Reset by remote core: %s reason: %u\n",
+             RPTUN_GET_CPUNAME(priv->dev), RPTUN_REASON_GET(status));
       if (RPTUN_STATUS_CHECK(status, BOARDIOC_SOFTRESETCAUSE_POWEROFF))
         {
 #ifdef CONFIG_BOARDCTL_POWEROFF
@@ -1142,7 +1143,11 @@ static int rptun_dev_reset(FAR struct rptun_priv_s 
*priv, unsigned long val)
 
   if (priv->dev->ops->reset)
     {
+      syslog(LOG_EMERG, "Rptun driver reset remote %s reason: %lu\n",
+             RPTUN_GET_CPUNAME(priv->dev), val);
       ret = priv->dev->ops->reset(priv->dev, val);
+      syslog(LOG_EMERG, "Rptun driver reset remote %s ret %d\n",
+             RPTUN_GET_CPUNAME(priv->dev), ret);
     }
 
   if (ret == -ENOTSUP)

Reply via email to