Commit ca6c8767 authored by Erwan Gouriou's avatar Erwan Gouriou Committed by Alberto Escolar
Browse files

stm32cube: stm32h7: eth: Fix calculation of the tail pointer

Cherry-picking commit ceda3ceeca2ee77a76d2de2ee6b560ad87c90a48
in STM32H7 Cube HAL
https://github.com/STMicroelectronics/stm32h7xx-hal-driver/

Fixed in hal_stm32 main branch following cube version update
from version v1.11.2 to version v1.12.0.

Signed-off-by: default avatarErwan Gouriou <erwan.gouriou@st.com>
parent f1317150
Loading
Loading
Loading
Loading
+1 −1
Changes for stm32cube/stm32h7xx/drivers/src/stm32h7xx_hal_eth.c: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -1218,7 +1218,7 @@ static void ETH_UpdateDescriptor(ETH_HandleTypeDef *heth)
  if (heth->RxDescList.RxBuildDescCnt != desccount)
  {
    /* Set the tail pointer index */
    tailidx = (descidx + 1U) % ETH_RX_DESC_CNT;
    tailidx = (ETH_RX_DESC_CNT + descidx - 1U) % ETH_RX_DESC_CNT;

    /* DMB instruction to avoid race condition */
    __DMB();