From c67f535fb3db26f7d9c2ee7af66ae05e659db038 Mon Sep 17 00:00:00 2001 From: Paul Thompson Date: Wed, 11 Apr 2018 14:33:51 -0700 Subject: [PATCH] Drop locking around TX and RX. The DMA channels are independent of each other --- .../TARGET_STM32F7/device/stm32f7xx_hal_eth.c | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_eth.c b/targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_eth.c index a112e39673..0a6848e69e 100644 --- a/targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_eth.c +++ b/targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_eth.c @@ -667,9 +667,6 @@ HAL_StatusTypeDef HAL_ETH_TransmitFrame(ETH_HandleTypeDef *heth, uint32_t FrameL { uint32_t bufcount = 0, size = 0, i = 0; - /* Process Locked */ - __HAL_LOCK(heth); - /* Set the ETH peripheral state to BUSY */ heth->State = HAL_ETH_STATE_BUSY; @@ -678,9 +675,6 @@ HAL_StatusTypeDef HAL_ETH_TransmitFrame(ETH_HandleTypeDef *heth, uint32_t FrameL /* Set ETH HAL state to READY */ heth->State = HAL_ETH_STATE_READY; - /* Process Unlocked */ - __HAL_UNLOCK(heth); - return HAL_ERROR; } @@ -690,9 +684,6 @@ HAL_StatusTypeDef HAL_ETH_TransmitFrame(ETH_HandleTypeDef *heth, uint32_t FrameL /* OWN bit set */ heth->State = HAL_ETH_STATE_BUSY_TX; - /* Process Unlocked */ - __HAL_UNLOCK(heth); - return HAL_ERROR; } @@ -776,9 +767,6 @@ HAL_StatusTypeDef HAL_ETH_TransmitFrame(ETH_HandleTypeDef *heth, uint32_t FrameL /* Set ETH HAL State to Ready */ heth->State = HAL_ETH_STATE_READY; - /* Process Unlocked */ - __HAL_UNLOCK(heth); - /* Return function status */ return HAL_OK; } @@ -793,9 +781,6 @@ HAL_StatusTypeDef HAL_ETH_GetReceivedFrame(ETH_HandleTypeDef *heth) { uint32_t framelength = 0; - /* Process Locked */ - __HAL_LOCK(heth); - /* Check the ETH state to BUSY */ heth->State = HAL_ETH_STATE_BUSY; @@ -930,9 +915,6 @@ HAL_StatusTypeDef HAL_ETH_GetReceivedFrame_IT(ETH_HandleTypeDef *heth) /* Set HAL State to Ready */ heth->State = HAL_ETH_STATE_READY; - /* Process Unlocked */ - __HAL_UNLOCK(heth); - /* Return function status */ return HAL_OK; } @@ -941,9 +923,6 @@ HAL_StatusTypeDef HAL_ETH_GetReceivedFrame_IT(ETH_HandleTypeDef *heth) /* Set HAL State to Ready */ heth->State = HAL_ETH_STATE_READY; - /* Process Unlocked */ - __HAL_UNLOCK(heth); - /* Return function status */ return HAL_ERROR; }