We are having a race condition when appending to the EMAC descriptor queue. We are following the instruction described in the TRM.
SPRUGR0C–October 2009–Revised November 2013
22.2.5.2 Transmit and Receive Descriptor Queues
There is a potential race condition where the EMAC may read the “next” pointer of a descriptor as NULL in the instant before an application appends additional descriptors to the list by patching the pointer. This case is handled by the software application always examining the buffer descriptor flags of all EOP packets, looking for a special flag called end of queue (EOQ). The EOQ flag is set by the EMAC on the last descriptor of a packet when the descriptor’s “next” pointer is NULL. This is the way the EMAC indicates to the software application that it believes it has reached the end of the list. When the software application sees the EOQ flag set, the application may at that time submit the new list, or the portion of the appended list that was missed by writing the new list pointer to the same HDP that started the process.
I believe we are seeing the same problem described in this forum post, except it is a different SoC.
https://e2e.ti.com/support/microcontrollers/hercules/f/312/t/526697
The descriptor memory block is mapped as strongly ordered so CPU cache is not an issue.
If this a problem with the hardware or is there something we are missing?
Thanks.