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.
(cherry picked from commit 5ca535df5874d1f9ab931265a2b1f691b76df9ce)
Signed-off-by: Alex Sergeev <asergeev@carbonrobotics.com>
GitOrigin-RevId: 5ca535df5874d1f9ab931265a2b1f691b76df9ce
Change-Id: Ifa8efcb855119503ab497a331d96a5775cf454cf
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/hal_stm32/+/3321810
Tested-by: CopyBot Service Account <copybot.service@gmail.com>
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
2 files changed