RTEMS | bsps/xqspipsu: Add timeouts to NOR transfers (!90)
Kinsey Moore (@opticron)
gitlab at rtems.org
Mon Jun 24 17:20:04 UTC 2024
Kinsey Moore commented on a discussion on bsps/shared/dev/spi/xqspipsu-flash-helper.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/90#note_107963
> * Indicate the transfer on the QSPIPSU bus is no longer in progress
> * regardless of the status event
> */
> - TransferInProgress = FALSE;
> + rtems_status_code sc = rtems_event_transient_send(TransferTask);
> + if (sc != RTEMS_SUCCESSFUL) {
> + Error++;
This particular file was originally sourced from the Xilinx repo, but is not in its original form as its original form was not suitable for purpose.
This file is now owned by RTEMS as an adapter of sorts. Unfortunately, this Error variable is not part of the QSPI driver, but part of the flash wrapper code that was brought in. It's technically possible to remove the Error variable here by resetting the status handler prior to each call which would allow replacing the void* argument that's passed in, but that runs the risk of leaving a stale pointer into the stack since you can't pass NULL for that field to clear it out (there's an assertion in the underlying code preventing it). This could be rectified by a global struct that houses the XQspiPsu pointer (currently unused) and additional NOR-layer attributes such as the error counter.
Realistically, nothing consumes the error count and it can just be removed until it's actually needed. I'll add another commit that removes it.
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/90#note_107963
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20240624/40cdfe2e/attachment-0001.htm>
More information about the bugs
mailing list