linguini1 commented on issue #15787:
URL: https://github.com/apache/nuttx/issues/15787#issuecomment-2644435504

   > The process of the selftest is quite straightforward: `orb_ioctl -> ioctl 
-> sensor_ioctl -> selftest.` Have you enabled SENSORS_RPMSG for multicore 
control? If not, when your upper layer calls orb_ioctl, is there a possibility 
that the file descriptor (fd) passed in is incorrect?
   
   I did take a look at this through the call graph and I'm unsure where this 
would cause an issue as well. I added some log statements to the `ioctl` 
implementation of `sensor.c` to see the value of `ret` once the lowerhalf 
`selftest` was called. The return value was what I expected. If I change the 
value of `ret` within the `sensor.c` `ioctl` implementation, the hang also 
stops. This is confusing me because I really don't see that value used anywhere 
else.
   
   I know the file descriptor is valid because other `ioctl` calls that 
pass-through to the lower-half `control` function work without issue. I also do 
not have `SENSORS_RPMSG` enabled, but I am working on a single core right now.
   
   > "orb_ioctl" is actually equivalent to "ioctl" in that it requires using 
errno to determine specific error codes. However, we have internally modified 
it to directly return errno. I will push this pull request (PR) shortly.
   
   Been a long day and it appears I forgot how `ioctl` works! I think setting 
errno is fine then, especially since it adheres to `ioctl` closer.


-- 
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: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to