From: Elad Kanfi <eladkan@xxxxxxxxxxxx>
Below is a description of a possible problematic
sequence. CPU-A is sending a frame and CPU-B handles
the interrupt that indicates the frame was sent. CPU-B
reads an invalid value of tx_packet_sent.
CPU-A CPU-B
----- -----
nps_enet_send_frame
.
.
tx_packet_sent = true
order HW to start tx
.
.
HW complete tx
------> get tx complete interrupt
.
.
if(tx_packet_sent == true)
end memory transaction
(tx_packet_sent actually
written)
Problem solution:
Add a memory barrier after setting tx_packet_sent,
in order to make sure that it is written before
the packet is sent.