casaroli commented on code in PR #21114:
URL: https://github.com/apache/nuttx/pull/21114#discussion_r4440923248


##########
include/nuttx/rptun/rptun.h:
##########
@@ -370,6 +389,7 @@ struct rptun_ops_s
 
   CODE void (*reset)(FAR struct rptun_dev_s *dev, int value);
   CODE void (*panic)(FAR struct rptun_dev_s *dev);
+  CODE void (*kick_host)(FAR struct rptun_dev_s *dev);

Review Comment:
   Documentation/os/drivers/special/rptun/driver_porting.rst lists `struct 
rptun_ops_s` and describes each op, but it does not get the new op.
   
   Fix: add `kick_host` to the struct listing and add a `kick_host` section 
there, if the op stays.



##########
drivers/rptun/rptun.c:
##########
@@ -869,6 +869,13 @@ static int rptun_start_thread(int argc, FAR char *argv[])
   ret = rptun_do_start(&priv->rproc);
   if (ret >= 0)
     {
+      /* Tell the host that we are waiting for it to set up the devices */
+
+      if (!RPTUN_IS_MASTER(priv->dev))
+        {
+          RPTUN_KICK_HOST(priv->dev);

Review Comment:
   The new op is not needed for this: `rptun_do_start()` already calls 
`RPTUN_REGISTER_CALLBACK()` in both roles right after `remoteproc_start()` 
(rptun.c:846), the same point as this call. `imx9_rptun_start()` cannot do it, 
because `rptun_start()` calls `RPTUN_START()` only for the master (rptun.c:218) 
and `imx9_rptun_is_master()` returns false.
   
   Fix: ring GIR1 in `imx9_rptun_register_callback()` when `callback != NULL`, 
and drop `kick_host` from `struct rptun_ops_s`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to