Skip to content

Commit 3d61cb5

Browse files
author
Cruz Monrreal
authored
Merge pull request #6948 from jeromecoutant/PR_ETHER
STM32 ETH : remove TX RX locking interrupt perforation
2 parents 23bc4e0 + c31554f commit 3d61cb5

File tree

4 files changed

+0
-99
lines changed

4 files changed

+0
-99
lines changed

targets/TARGET_STM/TARGET_STM32F1/device/stm32f1xx_hal_eth.c

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -657,9 +657,6 @@ HAL_StatusTypeDef HAL_ETH_TransmitFrame(ETH_HandleTypeDef *heth, uint32_t FrameL
657657
{
658658
uint32_t bufcount = 0U, size = 0U, i = 0U;
659659

660-
/* Process Locked */
661-
__HAL_LOCK(heth);
662-
663660
/* Set the ETH peripheral state to BUSY */
664661
heth->State = HAL_ETH_STATE_BUSY;
665662

@@ -668,9 +665,6 @@ HAL_StatusTypeDef HAL_ETH_TransmitFrame(ETH_HandleTypeDef *heth, uint32_t FrameL
668665
/* Set ETH HAL state to READY */
669666
heth->State = HAL_ETH_STATE_READY;
670667

671-
/* Process Unlocked */
672-
__HAL_UNLOCK(heth);
673-
674668
return HAL_ERROR;
675669
}
676670

@@ -680,9 +674,6 @@ HAL_StatusTypeDef HAL_ETH_TransmitFrame(ETH_HandleTypeDef *heth, uint32_t FrameL
680674
/* OWN bit set */
681675
heth->State = HAL_ETH_STATE_BUSY_TX;
682676

683-
/* Process Unlocked */
684-
__HAL_UNLOCK(heth);
685-
686677
return HAL_ERROR;
687678
}
688679

@@ -753,9 +744,6 @@ HAL_StatusTypeDef HAL_ETH_TransmitFrame(ETH_HandleTypeDef *heth, uint32_t FrameL
753744
/* Set ETH HAL State to Ready */
754745
heth->State = HAL_ETH_STATE_READY;
755746

756-
/* Process Unlocked */
757-
__HAL_UNLOCK(heth);
758-
759747
/* Return function status */
760748
return HAL_OK;
761749
}
@@ -770,9 +758,6 @@ HAL_StatusTypeDef HAL_ETH_GetReceivedFrame(ETH_HandleTypeDef *heth)
770758
{
771759
uint32_t framelength = 0U;
772760

773-
/* Process Locked */
774-
__HAL_LOCK(heth);
775-
776761
/* Check the ETH state to BUSY */
777762
heth->State = HAL_ETH_STATE_BUSY;
778763

@@ -806,9 +791,6 @@ HAL_StatusTypeDef HAL_ETH_GetReceivedFrame(ETH_HandleTypeDef *heth)
806791
/* Set HAL State to Ready */
807792
heth->State = HAL_ETH_STATE_READY;
808793

809-
/* Process Unlocked */
810-
__HAL_UNLOCK(heth);
811-
812794
/* Return function status */
813795
return HAL_OK;
814796
}
@@ -833,9 +815,6 @@ HAL_StatusTypeDef HAL_ETH_GetReceivedFrame(ETH_HandleTypeDef *heth)
833815
/* Set ETH HAL State to Ready */
834816
heth->State = HAL_ETH_STATE_READY;
835817

836-
/* Process Unlocked */
837-
__HAL_UNLOCK(heth);
838-
839818
/* Return function status */
840819
return HAL_ERROR;
841820
}
@@ -850,9 +829,6 @@ HAL_StatusTypeDef HAL_ETH_GetReceivedFrame_IT(ETH_HandleTypeDef *heth)
850829
{
851830
uint32_t descriptorscancounter = 0U;
852831

853-
/* Process Locked */
854-
__HAL_LOCK(heth);
855-
856832
/* Set ETH HAL State to BUSY */
857833
heth->State = HAL_ETH_STATE_BUSY;
858834

@@ -907,9 +883,6 @@ HAL_StatusTypeDef HAL_ETH_GetReceivedFrame_IT(ETH_HandleTypeDef *heth)
907883
/* Set HAL State to Ready */
908884
heth->State = HAL_ETH_STATE_READY;
909885

910-
/* Process Unlocked */
911-
__HAL_UNLOCK(heth);
912-
913886
/* Return function status */
914887
return HAL_OK;
915888
}
@@ -918,9 +891,6 @@ HAL_StatusTypeDef HAL_ETH_GetReceivedFrame_IT(ETH_HandleTypeDef *heth)
918891
/* Set HAL State to Ready */
919892
heth->State = HAL_ETH_STATE_READY;
920893

921-
/* Process Unlocked */
922-
__HAL_UNLOCK(heth);
923-
924894
/* Return function status */
925895
return HAL_ERROR;
926896
}

targets/TARGET_STM/TARGET_STM32F2/device/stm32f2xx_hal_eth.c

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -663,9 +663,6 @@ HAL_StatusTypeDef HAL_ETH_TransmitFrame(ETH_HandleTypeDef *heth, uint32_t FrameL
663663
{
664664
uint32_t bufcount = 0U, size = 0U, i = 0U;
665665

666-
/* Process Locked */
667-
__HAL_LOCK(heth);
668-
669666
/* Set the ETH peripheral state to BUSY */
670667
heth->State = HAL_ETH_STATE_BUSY;
671668

@@ -674,9 +671,6 @@ HAL_StatusTypeDef HAL_ETH_TransmitFrame(ETH_HandleTypeDef *heth, uint32_t FrameL
674671
/* Set ETH HAL state to READY */
675672
heth->State = HAL_ETH_STATE_READY;
676673

677-
/* Process Unlocked */
678-
__HAL_UNLOCK(heth);
679-
680674
return HAL_ERROR;
681675
}
682676

@@ -686,9 +680,6 @@ HAL_StatusTypeDef HAL_ETH_TransmitFrame(ETH_HandleTypeDef *heth, uint32_t FrameL
686680
/* OWN bit set */
687681
heth->State = HAL_ETH_STATE_BUSY_TX;
688682

689-
/* Process Unlocked */
690-
__HAL_UNLOCK(heth);
691-
692683
return HAL_ERROR;
693684
}
694685

@@ -759,9 +750,6 @@ HAL_StatusTypeDef HAL_ETH_TransmitFrame(ETH_HandleTypeDef *heth, uint32_t FrameL
759750
/* Set ETH HAL State to Ready */
760751
heth->State = HAL_ETH_STATE_READY;
761752

762-
/* Process Unlocked */
763-
__HAL_UNLOCK(heth);
764-
765753
/* Return function status */
766754
return HAL_OK;
767755
}
@@ -776,9 +764,6 @@ HAL_StatusTypeDef HAL_ETH_GetReceivedFrame(ETH_HandleTypeDef *heth)
776764
{
777765
uint32_t framelength = 0U;
778766

779-
/* Process Locked */
780-
__HAL_LOCK(heth);
781-
782767
/* Check the ETH state to BUSY */
783768
heth->State = HAL_ETH_STATE_BUSY;
784769

@@ -812,9 +797,6 @@ HAL_StatusTypeDef HAL_ETH_GetReceivedFrame(ETH_HandleTypeDef *heth)
812797
/* Set HAL State to Ready */
813798
heth->State = HAL_ETH_STATE_READY;
814799

815-
/* Process Unlocked */
816-
__HAL_UNLOCK(heth);
817-
818800
/* Return function status */
819801
return HAL_OK;
820802
}
@@ -839,9 +821,6 @@ HAL_StatusTypeDef HAL_ETH_GetReceivedFrame(ETH_HandleTypeDef *heth)
839821
/* Set ETH HAL State to Ready */
840822
heth->State = HAL_ETH_STATE_READY;
841823

842-
/* Process Unlocked */
843-
__HAL_UNLOCK(heth);
844-
845824
/* Return function status */
846825
return HAL_ERROR;
847826
}
@@ -856,9 +835,6 @@ HAL_StatusTypeDef HAL_ETH_GetReceivedFrame_IT(ETH_HandleTypeDef *heth)
856835
{
857836
uint32_t descriptorscancounter = 0U;
858837

859-
/* Process Locked */
860-
__HAL_LOCK(heth);
861-
862838
/* Set ETH HAL State to BUSY */
863839
heth->State = HAL_ETH_STATE_BUSY;
864840

@@ -913,9 +889,6 @@ HAL_StatusTypeDef HAL_ETH_GetReceivedFrame_IT(ETH_HandleTypeDef *heth)
913889
/* Set HAL State to Ready */
914890
heth->State = HAL_ETH_STATE_READY;
915891

916-
/* Process Unlocked */
917-
__HAL_UNLOCK(heth);
918-
919892
/* Return function status */
920893
return HAL_OK;
921894
}
@@ -924,9 +897,6 @@ HAL_StatusTypeDef HAL_ETH_GetReceivedFrame_IT(ETH_HandleTypeDef *heth)
924897
/* Set HAL State to Ready */
925898
heth->State = HAL_ETH_STATE_READY;
926899

927-
/* Process Unlocked */
928-
__HAL_UNLOCK(heth);
929-
930900
/* Return function status */
931901
return HAL_ERROR;
932902
}

targets/TARGET_STM/TARGET_STM32F4/device/stm32f4xx_hal_eth.c

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -670,9 +670,6 @@ HAL_StatusTypeDef HAL_ETH_TransmitFrame(ETH_HandleTypeDef *heth, uint32_t FrameL
670670
{
671671
uint32_t bufcount = 0U, size = 0U, i = 0U;
672672

673-
/* Process Locked */
674-
__HAL_LOCK(heth);
675-
676673
/* Set the ETH peripheral state to BUSY */
677674
heth->State = HAL_ETH_STATE_BUSY;
678675

@@ -681,9 +678,6 @@ HAL_StatusTypeDef HAL_ETH_TransmitFrame(ETH_HandleTypeDef *heth, uint32_t FrameL
681678
/* Set ETH HAL state to READY */
682679
heth->State = HAL_ETH_STATE_READY;
683680

684-
/* Process Unlocked */
685-
__HAL_UNLOCK(heth);
686-
687681
return HAL_ERROR;
688682
}
689683

@@ -693,9 +687,6 @@ HAL_StatusTypeDef HAL_ETH_TransmitFrame(ETH_HandleTypeDef *heth, uint32_t FrameL
693687
/* OWN bit set */
694688
heth->State = HAL_ETH_STATE_BUSY_TX;
695689

696-
/* Process Unlocked */
697-
__HAL_UNLOCK(heth);
698-
699690
return HAL_ERROR;
700691
}
701692

@@ -766,9 +757,6 @@ HAL_StatusTypeDef HAL_ETH_TransmitFrame(ETH_HandleTypeDef *heth, uint32_t FrameL
766757
/* Set ETH HAL State to Ready */
767758
heth->State = HAL_ETH_STATE_READY;
768759

769-
/* Process Unlocked */
770-
__HAL_UNLOCK(heth);
771-
772760
/* Return function status */
773761
return HAL_OK;
774762
}
@@ -783,9 +771,6 @@ HAL_StatusTypeDef HAL_ETH_GetReceivedFrame(ETH_HandleTypeDef *heth)
783771
{
784772
uint32_t framelength = 0U;
785773

786-
/* Process Locked */
787-
__HAL_LOCK(heth);
788-
789774
/* Check the ETH state to BUSY */
790775
heth->State = HAL_ETH_STATE_BUSY;
791776

@@ -819,9 +804,6 @@ HAL_StatusTypeDef HAL_ETH_GetReceivedFrame(ETH_HandleTypeDef *heth)
819804
/* Set HAL State to Ready */
820805
heth->State = HAL_ETH_STATE_READY;
821806

822-
/* Process Unlocked */
823-
__HAL_UNLOCK(heth);
824-
825807
/* Return function status */
826808
return HAL_OK;
827809
}
@@ -846,9 +828,6 @@ HAL_StatusTypeDef HAL_ETH_GetReceivedFrame(ETH_HandleTypeDef *heth)
846828
/* Set ETH HAL State to Ready */
847829
heth->State = HAL_ETH_STATE_READY;
848830

849-
/* Process Unlocked */
850-
__HAL_UNLOCK(heth);
851-
852831
/* Return function status */
853832
return HAL_ERROR;
854833
}
@@ -863,9 +842,6 @@ HAL_StatusTypeDef HAL_ETH_GetReceivedFrame_IT(ETH_HandleTypeDef *heth)
863842
{
864843
uint32_t descriptorscancounter = 0U;
865844

866-
/* Process Locked */
867-
__HAL_LOCK(heth);
868-
869845
/* Set ETH HAL State to BUSY */
870846
heth->State = HAL_ETH_STATE_BUSY;
871847

@@ -920,9 +896,6 @@ HAL_StatusTypeDef HAL_ETH_GetReceivedFrame_IT(ETH_HandleTypeDef *heth)
920896
/* Set HAL State to Ready */
921897
heth->State = HAL_ETH_STATE_READY;
922898

923-
/* Process Unlocked */
924-
__HAL_UNLOCK(heth);
925-
926899
/* Return function status */
927900
return HAL_OK;
928901
}
@@ -931,9 +904,6 @@ HAL_StatusTypeDef HAL_ETH_GetReceivedFrame_IT(ETH_HandleTypeDef *heth)
931904
/* Set HAL State to Ready */
932905
heth->State = HAL_ETH_STATE_READY;
933906

934-
/* Process Unlocked */
935-
__HAL_UNLOCK(heth);
936-
937907
/* Return function status */
938908
return HAL_ERROR;
939909
}

targets/TARGET_STM/TARGET_STM32F7/device/stm32f7xx_hal_eth.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -814,9 +814,6 @@ HAL_StatusTypeDef HAL_ETH_GetReceivedFrame(ETH_HandleTypeDef *heth)
814814
/* Set HAL State to Ready */
815815
heth->State = HAL_ETH_STATE_READY;
816816

817-
/* Process Unlocked */
818-
__HAL_UNLOCK(heth);
819-
820817
/* Return function status */
821818
return HAL_OK;
822819
}
@@ -841,9 +838,6 @@ HAL_StatusTypeDef HAL_ETH_GetReceivedFrame(ETH_HandleTypeDef *heth)
841838
/* Set ETH HAL State to Ready */
842839
heth->State = HAL_ETH_STATE_READY;
843840

844-
/* Process Unlocked */
845-
__HAL_UNLOCK(heth);
846-
847841
/* Return function status */
848842
return HAL_ERROR;
849843
}
@@ -858,9 +852,6 @@ HAL_StatusTypeDef HAL_ETH_GetReceivedFrame_IT(ETH_HandleTypeDef *heth)
858852
{
859853
uint32_t descriptorscancounter = 0;
860854

861-
/* Process Locked */
862-
__HAL_LOCK(heth);
863-
864855
/* Set ETH HAL State to BUSY */
865856
heth->State = HAL_ETH_STATE_BUSY;
866857

0 commit comments

Comments
 (0)