stm32cube: stm32h7: eth: avoid descriptor leak with enabled timestamping
Ethernet HAL configures interrupts to be received upon filling every
RX descriptor. When timestamping is enabled, application needs to
process both normal and context descriptors, but there is a race
condition in HAL_ETH_IsRxDataAvailable() that might miss context
descriptor, effectively leaking it.
This change introduces spinlock to wait for context descriptor if
normal context indicates it will be available.
Signed-off-by:
Alex Sergeev <asergeev@carbonrobotics.com>
Loading
Please sign in to comment