Donny9 commented on issue #15787: URL: https://github.com/apache/nuttx/issues/15787#issuecomment-2644429889
@linguini1 Hello: > I observed this issue while writing a self-test function for the LSM6DSO32 IMU. When the selftest fails everything is fine, but when it passes the function hangs forever. I was able to confirm this by adding a log statement at the exit point and changing the return code to -EACCESS before the function returns. The log statement gets executed and the function does not hang. It does hang if I remove the error code change code and allow the function to return 0. 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? > On a side note, orb_ioctl(fd, SNIOC_RESET, 0) returning -1 regardless of the error returned by the lowerhalf function is not documented anywhere I could find. I feel it should return a positive error code indicating the error that occurred, like ioctl does. "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. -- 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