Skip to content
Commit 5ca535df authored by Alex Sergeev's avatar Alex Sergeev Committed by Erwan Gouriou
Browse files

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: default avatarAlex Sergeev <asergeev@carbonrobotics.com>
parent f9fe0ccb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment