Fix for the PRU Tx lock up issue. LCPD-19899
authorVineet Roy <a0131726@ti.com>
Thu, 17 Dec 2020 07:41:59 +0000 (13:11 +0530)
committerSujith Shivalingappa <sujith.s@ti.com>
Fri, 18 Dec 2020 15:31:15 +0000 (09:31 -0600)
1. During high traffic when links are taken down, Tx PRU locks up
2. Fix is to check Tx FIFO fill level and then issue a reset

packages/ti/drv/icss_emac/firmware/icss_dualemac/src/emac_MII_Xmt.asm

index e7070bc2dc382a3b3cc9c6cc03bc49bf520b5927..0d3bd0941116329aa8d9b6ce5a48f11dffea1a32 100644 (file)
@@ -909,6 +909,17 @@ XMT_LB_1OOMbps_MODE:
     ; Don't allow insertion of next packet in TX Fifo unless it is empty
     CLR        R22 , R22 , PACKET_TX_ALLOWED 
     CLR        R22 , R22 , Entire_Tx_Data_Not_Pushed 
+
+    ;fix for issue where Tx FIFO goes into overflow and locks up
+    ;when cable is removed during high traffic scenario
+
+    ;Detect FIFO overflow and reset
+    .if $defined("ICSS_REV1")  
+        M_XMT_FILL_LEVEL_CALC_ICSS_REV1         ;calculates Fill level and resets in case of underflow/overflow
+    .endif
+    .if $defined("ICSS_REV2")  
+        M_XMT_FILL_LEVEL_CALC_ICSS_REV2        ;calculates Fill level and resets in case of underflow/overflow
+    .endif
     
 xmt_save_context: