prsdk-7487: icssg f/w: use the correct spinlocks to report EOF to RTU
authorVitaly Andrianov <vitalya@ti.com>
Tue, 26 Nov 2019 12:18:20 +0000 (07:18 -0500)
committerVitaly Andrianov <vitalya@ti.com>
Tue, 26 Nov 2019 12:18:20 +0000 (07:18 -0500)
In half duplex mode we cannot report EOF in TX_FIFO handler because packet
may be resent. Instead the report has to be done in the TX_EOF handler.
The current implementation by mistake uses the wrong spinlocks for the
report. Thus it uses spinlock E for the DMA0 and spinlock P for the DMA1,
which is wrong. This commit fixes this bug.

Signed-off-by: Vitaly Andrianov <vitalya@ti.com>
packages/ti/drv/emac/firmware/icss_dualmac/src/rxl2_txl2.asm

index ede1607610cb3763ba9aae2b1a1d19bc5e763cf4..6abf0708cfb03911f7a03d40d1a968ab26e002c0 100644 (file)
@@ -479,10 +479,10 @@ no_tx_ts:
 ;      if half duplex IPC to RTU
        qbbs    tx_eof_0, GRegs.speed_f, f_half_d
        qbbs    tx_eof_ipc1, GRegs.tx.b.flags, f_next_dma       
-       SPIN_TOG_LOCK_LOC PRU_RTU_EOD_P_FLAG
+       SPIN_TOG_LOCK_LOC PRU_RTU_EOD_E_FLAG
        qba     tx_eof_0
 tx_eof_ipc1:
-       SPIN_TOG_LOCK_LOC PRU_RTU_EOD_E_FLAG
+       SPIN_TOG_LOCK_LOC PRU_RTU_EOD_P_FLAG
 ; we don't check if the next packet scheduled for 10Mbps 
 tx_eof_0:
        qbbs    tx_eof_1, GRegs.speed_f, f_1gbps
@@ -533,10 +533,10 @@ tx_proc_col:
 txp_max_retry:
        m_inc_stat      r1.b0, TX_COL_DROPPED
        qbbs    txp_max_01, GRegs.tx.b.flags, f_next_dma        
-       SPIN_TOG_LOCK_LOC PRU_RTU_EOD_P_FLAG
+       SPIN_TOG_LOCK_LOC PRU_RTU_EOD_E_FLAG
        qba     txp_max_02
 txp_max_01:
-       SPIN_TOG_LOCK_LOC PRU_RTU_EOD_E_FLAG
+       SPIN_TOG_LOCK_LOC PRU_RTU_EOD_P_FLAG
 txp_max_02:
        start_ipg_timer
        ldi     GRegs.ret_cnt, 0