summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAravind Batni2016-05-23 10:07:27 -0500
committerAravind Batni2016-05-23 10:14:41 -0500
commit2431f266b9efb291d990f5ea11064ad44203ce3a (patch)
tree0037658a12552f5203bbe57f67724c50fd1a66c8
parentbfcd72d9fe8600848b197c8bb93b3800d4e7b326 (diff)
downloadpa-lld-2431f266b9efb291d990f5ea11064ad44203ce3a.tar.gz
pa-lld-2431f266b9efb291d990f5ea11064ad44203ce3a.tar.xz
pa-lld-2431f266b9efb291d990f5ea11064ad44203ce3a.zip
fixed firmware invalid state issue for v0(k2hk/c6678)
-rw-r--r--fw/v0/classify1.p28
1 files changed, 16 insertions, 12 deletions
diff --git a/fw/v0/classify1.p b/fw/v0/classify1.p
index 0cd8e2a..e6d0e2f 100644
--- a/fw/v0/classify1.p
+++ b/fw/v0/classify1.p
@@ -238,7 +238,7 @@ l_mainLoop00_ipReassem_4:
238 238
239 // clear command flag 239 // clear command flag
240 mov r1, 0 240 mov r1, 0
241 sbco r1, FIRMWARE_MBOX, FIRMWARE_CMD_IP_REASSEM_CFG_OFFSET, 4 241 sbco r1, FIRMWARE_MBOX, FIRMWARE_CMD_IP_REASSEM_CFG_OFFSET, 4
242 242
243#endif 243#endif
244 // pass through 244 // pass through
@@ -248,7 +248,7 @@ l_mainLoop001:
248 // Look for command (FIRMWARE_CMD_PKT_CTRL_CFG only) 248 // Look for command (FIRMWARE_CMD_PKT_CTRL_CFG only)
249 qbbc l_mainLoop002, s_flags.info.tStatus_Command3 249 qbbc l_mainLoop002, s_flags.info.tStatus_Command3
250 // Process Packet Verification Configuration Update 250 // Process Packet Verification Configuration Update
251 lbco r1, FIRMWARE_MBOX, FIRMWARE_CMD_PKT_CTRL_CFG_OFFSET, 4 251 lbco r1, FIRMWARE_MBOX, FIRMWARE_CMD_PKT_CTRL_CFG_OFFSET, 4
252 252
253 // Clear the valid bit fields 253 // Clear the valid bit fields
254 not r1.b2, r1.b1 254 not r1.b2, r1.b1
@@ -263,7 +263,7 @@ l_mainLoop001:
263 263
264 // clear the command flag 264 // clear the command flag
265 mov r1, 0 265 mov r1, 0
266 sbco r1, FIRMWARE_MBOX, FIRMWARE_CMD_PKT_CTRL_CFG_OFFSET, 4 266 sbco r1, FIRMWARE_MBOX, FIRMWARE_CMD_PKT_CTRL_CFG_OFFSET, 4
267 267
268 // pass through 268 // pass through
269 269
@@ -347,14 +347,16 @@ l_mainLoop3:
347l_mainLoop4: 347l_mainLoop4:
348 // write to the status register 348 // write to the status register
349 set s_statsFlags.event.t_nInvalidState 349 set s_statsFlags.event.t_nInvalidState
350 350 // Discard the packet held that caused invalid state
351 351 mov s_cdeCmdPkt.operation, CDE_CMD_HPKT_DISCARD
352 xout XID_CDECTRL, s_cdeCmdPkt, SIZE(s_cdeCmdPkt)
352 353
353 // if ( (pendingConfig == FALSE) && (newPacket == TRUE) ) then parse 354 // if ( (pendingConfig == FALSE) && (newPacket == TRUE) ) then parse
354l_mainLoop5: 355l_mainLoop5:
355 qbbs fci_mainLoop6, s_runCxt.flags.t_pendingConfig 356 qbbs fci_mainLoop6, s_runCxt.flags.t_pendingConfig
357 qbbs fci_mainLoop6, s_runCxt.flags.t_fakeLookup
356 qbbs f_c1Parse, s_flags.info.tStatus_CDENewPacket 358 qbbs f_c1Parse, s_flags.info.tStatus_CDENewPacket
357 359
358 // if ( (pendingConfig == TRUE) && (Lut1Busy == FALSE) ) then complete modify 360 // if ( (pendingConfig == TRUE) && (Lut1Busy == FALSE) ) then complete modify
359fci_mainLoop6: 361fci_mainLoop6:
360 qbbc fci_mainLoop7, s_runCxt.flags.t_pendingConfig 362 qbbc fci_mainLoop7, s_runCxt.flags.t_pendingConfig
@@ -536,7 +538,7 @@ l_c1ForwardHeldPacketMatch0:
536 .using cdeScope 538 .using cdeScope
537 .using pktScope 539 .using pktScope
538 .using usrStatsFifoScope 540 .using usrStatsFifoScope
539 541
540f_stdHeldPktForward: 542f_stdHeldPktForward:
541 // Record the effective packet size for user statistics update 543 // Record the effective packet size for user statistics update
542 // It will casue 3 cycles for all forwarding packets regardless of statistics update or not 544 // It will casue 3 cycles for all forwarding packets regardless of statistics update or not
@@ -755,7 +757,7 @@ l_stdHeldPktForward1_no_priority:
755 qbeq l_stdHeldPktForward9, s_matchRxCmdHdr.cmd, PA_RX_CMD_CMDSET_USR_STATS 757 qbeq l_stdHeldPktForward9, s_matchRxCmdHdr.cmd, PA_RX_CMD_CMDSET_USR_STATS
756 qbbs l_stdHeldPktForward2, s_matchForward_host.ctrlBitMap.t_pa_multiroute 758 qbbs l_stdHeldPktForward2, s_matchForward_host.ctrlBitMap.t_pa_multiroute
757l_stdHeldPktForward_normal_host_route: 759l_stdHeldPktForward_normal_host_route:
758 // Normal host route: no special operation is required 760 // Normal host route: no special operation is required
759 // Send the packet on its way 761 // Send the packet on its way
760 ldi r4, CDE_CMD_HPKT_RELEASE | ((CDE_FLG_SET_THREADID | CDE_FLG_SET_FLOWID | CDE_FLG_SET_DESTQUEUE | CDE_FLG_SET_PSINFO) << 8) 762 ldi r4, CDE_CMD_HPKT_RELEASE | ((CDE_FLG_SET_THREADID | CDE_FLG_SET_FLOWID | CDE_FLG_SET_DESTQUEUE | CDE_FLG_SET_PSINFO) << 8)
761 mov s_cdeCmdPkt.threadId, PA_DEST_CDMA 763 mov s_cdeCmdPkt.threadId, PA_DEST_CDMA
@@ -1536,9 +1538,9 @@ f_c1Parse:
1536 1538
1537 set s_statsFlags.event.t_nPackets 1539 set s_statsFlags.event.t_nPackets
1538 1540
1539 lbco r1, FIRMWARE_MBOX, 0, 4 1541 lbco r1, FIRMWARE_MBOX, 0, 4
1540 add r1, r1, 1 1542 add r1, r1, 1
1541 sbco r1, FIRMWARE_MBOX, 0, 4 1543 sbco r1, FIRMWARE_MBOX, 0, 4
1542 1544
1543 // Read the descriptor 1545 // Read the descriptor
1544 xin XID_CDEDATA, s_pktDescr, SIZE(s_pktDescr) 1546 xin XID_CDEDATA, s_pktDescr, SIZE(s_pktDescr)
@@ -1978,6 +1980,8 @@ l_c1Parse19:
1978 mov s_cdeCmdPkt.operation, CDE_CMD_PACKET_ADVANCE 1980 mov s_cdeCmdPkt.operation, CDE_CMD_PACKET_ADVANCE
1979 mov s_cdeCmdPkt.optionsFlag, CDE_FLG_HOLD_PACKET 1981 mov s_cdeCmdPkt.optionsFlag, CDE_FLG_HOLD_PACKET
1980 xout XID_CDECTRL, s_cdeCmdPkt, SIZE(s_cdeCmdPkt) 1982 xout XID_CDECTRL, s_cdeCmdPkt, SIZE(s_cdeCmdPkt)
1983 // Wait for the held packet to appear in the CDE
1984 wbs s_flags.info.tStatus_CDEHeldPacket
1981 qbbs l_c1Parse15, s_runCxt.flags.t_activeLookup 1985 qbbs l_c1Parse15, s_runCxt.flags.t_activeLookup
1982 jmp fci_mainLoop6 1986 jmp fci_mainLoop6
1983 1987
@@ -1992,7 +1996,7 @@ l_c1Parse19:
1992f_c1LocalInit: 1996f_c1LocalInit:
1993 1997
1994 // Clear the LUT table of all 64 entries 1998 // Clear the LUT table of all 64 entries
1995 .using lut1Scope 1999 .using lut1Scope
1996 2000
1997 mov r3, 0 2001 mov r3, 0
1998l_c1LocalInitD: 2002l_c1LocalInitD: