This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TMS570LC4357: HalCoGen ethernet driver - possible race condition

Part Number: TMS570LC4357
Other Parts Discussed in Thread: HALCOGEN

Here is piece from HalCoGen generated EMAC driver (TMS570LC4357):

void EMACReceive(hdkif_t *hdkif)
{
...
      curr_tail->next = (emac_rx_bd_t *)EMACSwizzleData((uint32)rxch_int->free_head);

... last_bd->next = NULL;

But it have possible race condition. It add new pieces into end of RX buffer descriptor chain. Problem is that it add UNTERMINATED chain part and terminate if AFTER. This contain possible race condition when MAC controller is faster than SW (SW can be interrupted by something more significant)