Lines Matching refs:pAC
292 SK_AC *pAC,
296 SK_AC *pAC,
300 SK_AC *pAC,
338 SK_AC *pAC, /* Adapter Context */ in SkRlmtInit() argument
350 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_INIT, in SkRlmtInit()
355 SK_MEMSET((char *)&pAC->Rlmt, 0, sizeof(SK_RLMT)); in SkRlmtInit()
358 pAC->Rlmt.Port[i].PortState = SK_RLMT_PS_INIT; in SkRlmtInit()
359 pAC->Rlmt.Port[i].LinkDown = SK_TRUE; in SkRlmtInit()
360 pAC->Rlmt.Port[i].PortDown = SK_TRUE; in SkRlmtInit()
361 pAC->Rlmt.Port[i].PortStarted = SK_FALSE; in SkRlmtInit()
362 pAC->Rlmt.Port[i].PortNoRx = SK_FALSE; in SkRlmtInit()
363 pAC->Rlmt.Port[i].RootIdSet = SK_FALSE; in SkRlmtInit()
364 pAC->Rlmt.Port[i].PortNumber = i; in SkRlmtInit()
365 pAC->Rlmt.Port[i].Net = &pAC->Rlmt.Net[0]; in SkRlmtInit()
366 pAC->Rlmt.Port[i].AddrPort = &pAC->Addr.Port[i]; in SkRlmtInit()
369 pAC->Rlmt.NumNets = 1; in SkRlmtInit()
371 pAC->Rlmt.Net[i].RlmtState = SK_RLMT_RS_INIT; in SkRlmtInit()
372 pAC->Rlmt.Net[i].RootIdSet = SK_FALSE; in SkRlmtInit()
373 pAC->Rlmt.Net[i].PrefPort = SK_RLMT_DEF_PREF_PORT; in SkRlmtInit()
374 pAC->Rlmt.Net[i].Preference = 0xFFFFFFFF; /* Automatic. */ in SkRlmtInit()
376 pAC->Rlmt.Net[i].ActivePort = pAC->Rlmt.Net[i].PrefPort; in SkRlmtInit()
377 pAC->Rlmt.Net[i].RlmtMode = SK_RLMT_DEF_MODE; in SkRlmtInit()
378 pAC->Rlmt.Net[i].TimeoutValue = SK_RLMT_DEF_TO_VAL; in SkRlmtInit()
379 pAC->Rlmt.Net[i].NetNumber = i; in SkRlmtInit()
382 pAC->Rlmt.Net[0].Port[0] = &pAC->Rlmt.Port[0]; in SkRlmtInit()
383 pAC->Rlmt.Net[0].Port[1] = &pAC->Rlmt.Port[1]; in SkRlmtInit()
385 pAC->Rlmt.Net[1].Port[0] = &pAC->Rlmt.Port[1]; in SkRlmtInit()
390 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_INIT, in SkRlmtInit()
391 ("RLMT: %d MACs were detected.\n", pAC->GIni.GIMacsFound)) in SkRlmtInit()
393 pAC->Rlmt.Net[0].NumPorts = pAC->GIni.GIMacsFound; in SkRlmtInit()
396 if (pAC->GIni.GIMacsFound == 1) { in SkRlmtInit()
399 (void)SkRlmtEvent(pAC, IoC, SK_RLMT_MODE_CHANGE, Para); in SkRlmtInit()
405 if (pAC->Rlmt.NumNets > 1) { in SkRlmtInit()
408 SkRlmtEvtSetNets(pAC, IoC, Para); in SkRlmtInit()
411 for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) { in SkRlmtInit()
412 Random = SkOsGetTime(pAC); in SkRlmtInit()
413 *(SK_U32*)&pAC->Rlmt.Port[i].Random = *(SK_U32*)&Random; in SkRlmtInit()
416 pAC->Rlmt.Port[i].Random[j] ^= pAC->Rlmt.Port[i].AddrPort-> in SkRlmtInit()
420 (void)SkAddrMcClear(pAC, IoC, i, SK_ADDR_PERMANENT | SK_MC_SW_ONLY); in SkRlmtInit()
423 (void)SkAddrMcAdd(pAC, IoC, i, &SkRlmtMcAddr, SK_ADDR_PERMANENT); in SkRlmtInit()
425 if (pAC->Rlmt.Net[0].RlmtMode & SK_RLMT_CHECK_SEG) { in SkRlmtInit()
427 (void)SkAddrMcAdd(pAC, IoC, i, &BridgeMcAddr, SK_ADDR_PERMANENT); in SkRlmtInit()
430 (void)SkAddrMcUpdate(pAC, IoC, i); in SkRlmtInit()
452 pAC->Rlmt.RlmtOff = SK_TRUE; in SkRlmtInit()
459 pAC->Rlmt.RlmtOff = SK_TRUE; in SkRlmtInit()
462 pAC->Rlmt.RlmtOff = SK_FALSE; in SkRlmtInit()
494 SK_AC *pAC, /* Adapter Context */ in SkRlmtBuildCheckChain() argument
505 if (!(pAC->Rlmt.Net[NetIdx].RlmtMode & SK_RLMT_CHECK_LOC_LINK)) { in SkRlmtBuildCheckChain()
506 for (i = 0; i < pAC->Rlmt.Net[i].NumPorts; i++) { in SkRlmtBuildCheckChain()
507 pAC->Rlmt.Net[NetIdx].Port[i]->PortsChecked = 0; in SkRlmtBuildCheckChain()
512 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtBuildCheckChain()
517 for (i = 0; i < pAC->Rlmt.Net[NetIdx].NumPorts; i++) { in SkRlmtBuildCheckChain()
518 pAC->Rlmt.Net[NetIdx].Port[i]->PortsChecked = 0; in SkRlmtBuildCheckChain()
519 pAC->Rlmt.Net[NetIdx].Port[i]->PortsSuspect = 0; in SkRlmtBuildCheckChain()
520 pAC->Rlmt.Net[NetIdx].Port[i]->CheckingState &= in SkRlmtBuildCheckChain()
529 if (!pAC->Rlmt.Net[NetIdx].Port[i]->LinkDown) { in SkRlmtBuildCheckChain()
531 FirstMacUp = pAC->Rlmt.Net[NetIdx].Port[i]; in SkRlmtBuildCheckChain()
535 pAC->Rlmt.Net[NetIdx].Port[i]->PortsChecked].CheckAddr = in SkRlmtBuildCheckChain()
536 pAC->Rlmt.Net[NetIdx].Port[i]->AddrPort->CurrentMacAddress; in SkRlmtBuildCheckChain()
541 PrevMacUp = pAC->Rlmt.Net[NetIdx].Port[i]; in SkRlmtBuildCheckChain()
555 for (i = 0; i < pAC->Rlmt.Net[NetIdx].NumPorts; i++) { in SkRlmtBuildCheckChain()
556 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtBuildCheckChain()
558 pAC->Rlmt.Net[NetIdx].Port[i]->PortsChecked, in SkRlmtBuildCheckChain()
559 pAC->Rlmt.Net[NetIdx].Port[i]->PortCheck[0].CheckAddr.a[5])) in SkRlmtBuildCheckChain()
581 SK_AC *pAC, /* Adapter Context */ in SkRlmtBuildPacket() argument
603 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_ERR, in SkRlmtBuildPacket()
609 if ((pMb = SkDrvAllocRlmtMbuf(pAC, IoC, SK_RLMT_MAX_PACKET_SIZE)) != NULL) { in SkRlmtBuildPacket()
629 pPacket->Random[i] = pAC->Rlmt.Port[PortNumber].Random[i]; in SkRlmtBuildPacket()
646 pAC->Rlmt.Port[PortNumber].TxHelloCts++; in SkRlmtBuildPacket()
668 SK_AC *pAC, /* Adapter Context */ in SkRlmtBuildSpanningTreePacket() argument
677 if ((pMb = SkDrvAllocRlmtMbuf(pAC, IoC, SK_RLMT_MAX_PACKET_SIZE)) != in SkRlmtBuildSpanningTreePacket()
683 pAC->Addr.Port[PortNumber].CurrentMacAddress.a[i]; in SkRlmtBuildSpanningTreePacket()
709 pAC->Addr.Net[pAC->Rlmt.Port[PortNumber].Net->NetNumber]. in SkRlmtBuildSpanningTreePacket()
729 pAC->Rlmt.Port[PortNumber].TxSpHelloReqCts++; in SkRlmtBuildSpanningTreePacket()
751 SK_AC *pAC, /* Adapter Context */ in SkRlmtSend() argument
759 pRPort = &pAC->Rlmt.Port[PortNumber]; in SkRlmtSend()
760 if (pAC->Rlmt.Port[PortNumber].Net->RlmtMode & SK_RLMT_CHECK_LOC_LINK) { in SkRlmtSend()
763 if ((Para.pParaPtr = SkRlmtBuildPacket(pAC, IoC, PortNumber, in SkRlmtSend()
764 SK_PACKET_ALIVE, &pAC->Addr.Port[PortNumber].CurrentMacAddress, in SkRlmtSend()
766 SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para); in SkRlmtSend()
775 if ((Para.pParaPtr = SkRlmtBuildPacket(pAC, IoC, PortNumber, in SkRlmtSend()
776 SK_PACKET_ALIVE, &pAC->Addr.Port[PortNumber].CurrentMacAddress, in SkRlmtSend()
778 SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para); in SkRlmtSend()
784 if ((pAC->Rlmt.Port[PortNumber].Net->RlmtMode & SK_RLMT_CHECK_SEG) && in SkRlmtSend()
785 (pAC->Rlmt.Port[PortNumber].Net->CheckingState & SK_RLMT_RCS_SEND_SEG)) { in SkRlmtSend()
791 SkRlmtBuildSpanningTreePacket(pAC, IoC, PortNumber)) != NULL) { in SkRlmtSend()
792 pAC->Rlmt.Port[PortNumber].Net->CheckingState &= ~SK_RLMT_RCS_SEND_SEG; in SkRlmtSend()
795 SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para); in SkRlmtSend()
796 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_TX, in SkRlmtSend()
819 SK_AC *pAC, /* Adapter Context */ in SkRlmtPortReceives() argument
826 pRPort = &pAC->Rlmt.Port[PortNumber]; in SkRlmtPortReceives()
835 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX, in SkRlmtPortReceives()
839 pRPort->GuTimeStamp = SkOsGetTime(pAC); in SkRlmtPortReceives()
842 SkTimerStart(pAC, IoC, &pRPort->UpTimer, SK_RLMT_PORTUP_TIM_VAL, in SkRlmtPortReceives()
846 SkRlmtCheckSwitch(pAC, IoC, pRPort->Net->NetNumber); in SkRlmtPortReceives()
849 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX, in SkRlmtPortReceives()
851 SkTimerStop(pAC, IoC, &pRPort->DownRxTimer); in SkRlmtPortReceives()
854 SkRlmtCheckSwitch(pAC, IoC, pRPort->Net->NetNumber); in SkRlmtPortReceives()
875 SK_AC *pAC, /* Adapter Context */ in SkRlmtPacketReceive() argument
893 pAPort = &pAC->Addr.Port[PortNumber]; in SkRlmtPacketReceive()
894 pRPort = &pAC->Rlmt.Port[PortNumber]; in SkRlmtPacketReceive()
896 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX, in SkRlmtPacketReceive()
907 SkRlmtPortReceives(pAC, IoC, PortNumber); in SkRlmtPacketReceive()
917 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX, in SkRlmtPacketReceive()
920 SkDrvFreeRlmtMbuf(pAC, IoC, pMb); in SkRlmtPacketReceive()
955 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX, in SkRlmtPacketReceive()
959 SK_ERR_LOG(pAC, SK_ERRCL_COMM, SKERR_RLMT_E006, SKERR_RLMT_E006_MSG); in SkRlmtPacketReceive()
963 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX, in SkRlmtPacketReceive()
967 SkDrvFreeRlmtMbuf(pAC, IoC, pMb); in SkRlmtPacketReceive()
1004 SkRlmtBuildCheckChain(pAC); in SkRlmtPacketReceive()
1007 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX, in SkRlmtPacketReceive()
1010 SkDrvFreeRlmtMbuf(pAC, IoC, pMb); in SkRlmtPacketReceive()
1015 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX, in SkRlmtPacketReceive()
1018 if (!(pAC->Addr.Port[PortNumber].PromMode & SK_PROM_MODE_LLC) || in SkRlmtPacketReceive()
1024 SkTimerStop(pAC, IoC, &pRPort->DownTxTimer); in SkRlmtPacketReceive()
1030 pRPort->GuTimeStamp = SkOsGetTime(pAC); in SkRlmtPacketReceive()
1032 SkTimerStop(pAC, IoC, &pRPort->DownTxTimer); in SkRlmtPacketReceive()
1036 SkTimerStart(pAC, IoC, &pRPort->UpTimer, in SkRlmtPacketReceive()
1043 SkDrvFreeRlmtMbuf(pAC, IoC, pMb); in SkRlmtPacketReceive()
1046 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX, in SkRlmtPacketReceive()
1055 pAC->Addr.Port[PortNumber].CurrentMacAddress.a[i]; in SkRlmtPacketReceive()
1060 SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para); in SkRlmtPacketReceive()
1065 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX, in SkRlmtPacketReceive()
1074 SkTimerStart(pAC, IoC, &pRPort->DownTxTimer, in SkRlmtPacketReceive()
1078 SkDrvFreeRlmtMbuf(pAC, IoC, pMb); in SkRlmtPacketReceive()
1080 if ((Para.pParaPtr = SkRlmtBuildPacket(pAC, IoC, PortNumber, in SkRlmtPacketReceive()
1081 SK_PACKET_ALIVE, &pAC->Addr.Port[PortNumber].CurrentMacAddress, in SkRlmtPacketReceive()
1083 SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para); in SkRlmtPacketReceive()
1088 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX, in SkRlmtPacketReceive()
1092 SkRlmtBuildCheckChain(pAC, pRPort->Net->NetNumber); in SkRlmtPacketReceive()
1093 SkDrvFreeRlmtMbuf(pAC, IoC, pMb); in SkRlmtPacketReceive()
1097 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX, in SkRlmtPacketReceive()
1101 SkDrvFreeRlmtMbuf(pAC, IoC, pMb); in SkRlmtPacketReceive()
1107 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX, in SkRlmtPacketReceive()
1113 if (!SK_ADDR_EQUAL(&pSPacket->RootId[2], &pAC->Addr.Net[pAC->Rlmt. in SkRlmtPacketReceive()
1120 (pAC->Rlmt.Port[PortNumber].Net->LinksUp > 1) && in SkRlmtPacketReceive()
1121 (pAC->Rlmt.Port[PortNumber].Net->RlmtMode & SK_RLMT_CHECK_SEG) in SkRlmtPacketReceive()
1122 != 0 && (pAC->Rlmt.Port[PortNumber].Net->CheckingState & in SkRlmtPacketReceive()
1124 pAC->Rlmt.Port[PortNumber].Net->CheckingState |= in SkRlmtPacketReceive()
1134 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_DUMP, in SkRlmtPacketReceive()
1143 SkDrvFreeRlmtMbuf(pAC, IoC, pMb); in SkRlmtPacketReceive()
1144 if ((pAC->Rlmt.Port[PortNumber].Net->CheckingState & in SkRlmtPacketReceive()
1146 SkRlmtCheckSeg(pAC, IoC, pAC->Rlmt.Port[PortNumber].Net->NetNumber); in SkRlmtPacketReceive()
1150 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_RX, in SkRlmtPacketReceive()
1154 SkDrvFreeRlmtMbuf(pAC, IoC, pMb); in SkRlmtPacketReceive()
1219 SK_AC *pAC, /* Adapter Context */ in SkRlmtCheckPort() argument
1228 pRPort = &pAC->Rlmt.Port[PortNumber]; in SkRlmtCheckPort()
1231 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtCheckPort()
1241 if (pRPort->PortNoRx && (pAC->Rlmt.Port[PortNumber].Net->LinksUp > 1) && in SkRlmtCheckPort()
1242 (pAC->Rlmt.Port[PortNumber].Net->RlmtMode & SK_RLMT_CHECK_SEG) && in SkRlmtCheckPort()
1243 !(pAC->Rlmt.Port[PortNumber].Net->CheckingState & SK_RLMT_RCS_SEG)) { in SkRlmtCheckPort()
1244 pAC->Rlmt.Port[PortNumber].Net->CheckingState |= in SkRlmtCheckPort()
1248 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtCheckPort()
1253 NewTimeout = TO_SHORTEN(pAC->Rlmt.Port[PortNumber].Net->TimeoutValue); in SkRlmtCheckPort()
1267 SkTimerStart(pAC, IoC, &pRPort->DownRxTimer, in SkRlmtCheckPort()
1278 SkRlmtBuildPacket(pAC, IoC, PortNumber, SK_PACKET_CHECK_TX, in SkRlmtCheckPort()
1279 &pAC->Addr.Port[PortNumber].CurrentMacAddress, in SkRlmtCheckPort()
1281 SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para); in SkRlmtCheckPort()
1292 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtCheckPort()
1298 SkRlmtPortReceives(pAC, IoC, PortNumber); in SkRlmtCheckPort()
1299 if (pAC->Rlmt.CheckSwitch) { in SkRlmtCheckPort()
1300 SkRlmtCheckSwitch(pAC, IoC, pRPort->Net->NetNumber); in SkRlmtCheckPort()
1325 SK_AC *pAC, /* Adapter Context */ in SkRlmtSelectBcRx() argument
1339 for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) { in SkRlmtSelectBcRx()
1341 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtSelectBcRx()
1344 pAC->Rlmt.Port[i].PortDown, pAC->Rlmt.Port[i].PortNoRx, in SkRlmtSelectBcRx()
1345 *((SK_U32*)(&pAC->Rlmt.Port[i].BcTimeStamp) + OFFS_HI32), in SkRlmtSelectBcRx()
1346 *((SK_U32*)(&pAC->Rlmt.Port[i].BcTimeStamp) + OFFS_LO32))) in SkRlmtSelectBcRx()
1348 if (!pAC->Rlmt.Port[i].PortDown && !pAC->Rlmt.Port[i].PortNoRx) { in SkRlmtSelectBcRx()
1349 if (!PortFound || pAC->Rlmt.Port[i].BcTimeStamp > BcTimeStamp) { in SkRlmtSelectBcRx()
1350 BcTimeStamp = pAC->Rlmt.Port[i].BcTimeStamp; in SkRlmtSelectBcRx()
1358 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtSelectBcRx()
1362 for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) { in SkRlmtSelectBcRx()
1366 if (!pAC->Rlmt.Port[i].PortDown && !pAC->Rlmt.Port[i].PortNoRx && in SkRlmtSelectBcRx()
1367 (pAC->Rlmt.Port[i].BcTimeStamp > in SkRlmtSelectBcRx()
1369 pAC->Rlmt.Port[i].BcTimeStamp + in SkRlmtSelectBcRx()
1373 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtSelectBcRx()
1382 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtSelectBcRx()
1386 BcTimeStamp - pAC->Rlmt.Port[1 - *pSelect].BcTimeStamp)) in SkRlmtSelectBcRx()
1408 SK_AC *pAC, /* Adapter Context */ in SkRlmtSelectNotSuspect() argument
1420 for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) { in SkRlmtSelectNotSuspect()
1421 if (!pAC->Rlmt.Port[i].PortDown && in SkRlmtSelectNotSuspect()
1422 !(pAC->Rlmt.Port[i].CheckingState & SK_RLMT_PCS_RX)) { in SkRlmtSelectNotSuspect()
1424 if (!pAC->Rlmt.Port[Active].PortDown && in SkRlmtSelectNotSuspect()
1425 !(pAC->Rlmt.Port[Active].CheckingState & SK_RLMT_PCS_RX)) { in SkRlmtSelectNotSuspect()
1428 if (!pAC->Rlmt.Port[PrefPort].PortDown && in SkRlmtSelectNotSuspect()
1429 !(pAC->Rlmt.Port[PrefPort].CheckingState & SK_RLMT_PCS_RX)) { in SkRlmtSelectNotSuspect()
1433 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtSelectNotSuspect()
1457 SK_AC *pAC, /* Adapter Context */ in SkRlmtSelectUp() argument
1470 for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) { in SkRlmtSelectUp()
1471 if (pAC->Rlmt.Port[i].PortState == SK_RLMT_PS_UP && in SkRlmtSelectUp()
1472 pAC->GIni.GP[i].PAutoNegFail != AutoNegDone) { in SkRlmtSelectUp()
1474 if (pAC->Rlmt.Port[Active].PortState == SK_RLMT_PS_UP && in SkRlmtSelectUp()
1475 pAC->GIni.GP[Active].PAutoNegFail != AutoNegDone) { in SkRlmtSelectUp()
1478 if (pAC->Rlmt.Port[PrefPort].PortState == SK_RLMT_PS_UP && in SkRlmtSelectUp()
1479 pAC->GIni.GP[PrefPort].PAutoNegFail != AutoNegDone) { in SkRlmtSelectUp()
1483 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtSelectUp()
1506 SK_AC *pAC, /* Adapter Context */ in SkRlmtSelectGoingUp() argument
1521 for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) { in SkRlmtSelectGoingUp()
1522 if (pAC->Rlmt.Port[i].PortState == SK_RLMT_PS_GOING_UP && in SkRlmtSelectGoingUp()
1523 pAC->GIni.GP[i].PAutoNegFail != AutoNegDone) { in SkRlmtSelectGoingUp()
1524 GuTimeStamp = pAC->Rlmt.Port[i].GuTimeStamp; in SkRlmtSelectGoingUp()
1535 for (i = *pSelect + 1; i < (SK_U32)pAC->GIni.GIMacsFound; i++) { in SkRlmtSelectGoingUp()
1536 if (pAC->Rlmt.Port[i].PortState == SK_RLMT_PS_GOING_UP && in SkRlmtSelectGoingUp()
1537 pAC->Rlmt.Port[i].GuTimeStamp < GuTimeStamp && in SkRlmtSelectGoingUp()
1538 pAC->GIni.GP[i].PAutoNegFail != AutoNegDone) { in SkRlmtSelectGoingUp()
1539 GuTimeStamp = pAC->Rlmt.Port[i].GuTimeStamp; in SkRlmtSelectGoingUp()
1544 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtSelectGoingUp()
1564 SK_AC *pAC, /* Adapter Context */ in SkRlmtSelectDown() argument
1577 for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) { in SkRlmtSelectDown()
1578 if (pAC->Rlmt.Port[i].PortState == SK_RLMT_PS_DOWN && in SkRlmtSelectDown()
1579 pAC->GIni.GP[i].PAutoNegFail != AutoNegDone) { in SkRlmtSelectDown()
1581 if (pAC->Rlmt.Port[Active].PortState == SK_RLMT_PS_DOWN && in SkRlmtSelectDown()
1582 pAC->GIni.GP[Active].PAutoNegFail != AutoNegDone) { in SkRlmtSelectDown()
1585 if (pAC->Rlmt.Port[PrefPort].PortState == SK_RLMT_PS_DOWN && in SkRlmtSelectDown()
1586 pAC->GIni.GP[PrefPort].PAutoNegFail != AutoNegDone) { in SkRlmtSelectDown()
1590 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtSelectDown()
1614 SK_AC *pAC, /* Adapter Context */ in SkRlmtCheckSwitch() argument
1624 Active = pAC->Rlmt.Net[NetIdx].ActivePort; /* Index of active port. */ in SkRlmtCheckSwitch()
1625 PrefPort = pAC->Rlmt.Net[NetIdx].PrefPort; /* Index of preferred port. */ in SkRlmtCheckSwitch()
1627 pAC->Rlmt.CheckSwitch = SK_FALSE; in SkRlmtCheckSwitch()
1630 if (pAC->Rlmt.Net[NetIdx].Preference == 0xFFFFFFFF) { /* Automatic */ in SkRlmtCheckSwitch()
1636 if (pAC->Rlmt.Net[NetIdx].LinksUp == 0) { in SkRlmtCheckSwitch()
1638 pAC->Rlmt.Net[NetIdx].RlmtState = SK_RLMT_RS_NET_DOWN; in SkRlmtCheckSwitch()
1641 SkEventQueue(pAC, SKGE_DRV, SK_DRV_NET_DOWN, Para); in SkRlmtCheckSwitch()
1643 Para.Para32[0] = pAC->Rlmt.Net[NetIdx]. in SkRlmtCheckSwitch()
1644 Port[pAC->Rlmt.Net[NetIdx].ActivePort]->PortNumber; in SkRlmtCheckSwitch()
1646 SkEventQueue(pAC, SKGE_PNMI, SK_PNMI_EVT_RLMT_ACTIVE_DOWN, Para); in SkRlmtCheckSwitch()
1649 else if (pAC->Rlmt.Net[NetIdx].LinksUp == 1 && in SkRlmtCheckSwitch()
1650 pAC->Rlmt.Net[NetIdx].RlmtState == SK_RLMT_RS_NET_DOWN) { in SkRlmtCheckSwitch()
1652 pAC->Rlmt.Net[NetIdx].RlmtState = SK_RLMT_RS_NET_UP; in SkRlmtCheckSwitch()
1658 for (i = 0; i < pAC->Rlmt.Net[NetIdx].NumPorts; i++) { in SkRlmtCheckSwitch()
1659 if (!pAC->Rlmt.Net[NetIdx].Port[i]->LinkDown) { in SkRlmtCheckSwitch()
1660 if (!pAC->Rlmt.Net[NetIdx].Port[Active]->LinkDown) { in SkRlmtCheckSwitch()
1663 if (!pAC->Rlmt.Net[NetIdx].Port[PrefPort]->LinkDown) { in SkRlmtCheckSwitch()
1672 Para.Para32[0] = pAC->Rlmt.Net[NetIdx].Port[i]->PortNumber; in SkRlmtCheckSwitch()
1674 SkEventQueue(pAC, SKGE_PNMI, SK_PNMI_EVT_RLMT_ACTIVE_UP, Para); in SkRlmtCheckSwitch()
1676 pAC->Rlmt.Net[NetIdx].ActivePort = i; in SkRlmtCheckSwitch()
1677 Para.Para32[0] = pAC->Rlmt.Net[NetIdx].Port[i]->PortNumber; in SkRlmtCheckSwitch()
1679 SkEventQueue(pAC, SKGE_DRV, SK_DRV_NET_UP, Para); in SkRlmtCheckSwitch()
1681 if ((pAC->Rlmt.Net[NetIdx].RlmtMode & SK_RLMT_TRANSPARENT) == 0 && in SkRlmtCheckSwitch()
1682 (Para.pParaPtr = SkRlmtBuildPacket(pAC, IoC, in SkRlmtCheckSwitch()
1683 pAC->Rlmt.Net[NetIdx].Port[i]->PortNumber, in SkRlmtCheckSwitch()
1684 SK_PACKET_ANNOUNCE, &pAC->Addr.Net[NetIdx]. in SkRlmtCheckSwitch()
1690 SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para); in SkRlmtCheckSwitch()
1694 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_RLMT_E007, SKERR_RLMT_E007_MSG); in SkRlmtCheckSwitch()
1725 if ((pAC->Rlmt.Net[0].RlmtMode != SK_RLMT_MODE_CLS) && in SkRlmtCheckSwitch()
1726 (!pAC->Rlmt.Net[0].ChgBcPrio)) { in SkRlmtCheckSwitch()
1730 pAC, IoC, Active, PrefPort, &Para.Para32[1]); in SkRlmtCheckSwitch()
1735 pAC, IoC, Active, PrefPort, &Para.Para32[1]); in SkRlmtCheckSwitch()
1740 if ((pAC->Rlmt.Net[0].RlmtMode != SK_RLMT_MODE_CLS) && in SkRlmtCheckSwitch()
1741 (pAC->Rlmt.Net[0].ChgBcPrio)) { in SkRlmtCheckSwitch()
1744 pAC, IoC, Active, PrefPort, &Para.Para32[1]); in SkRlmtCheckSwitch()
1749 pAC, IoC, Active, PrefPort, &Para.Para32[1]); in SkRlmtCheckSwitch()
1755 pAC, IoC, Active, PrefPort, &Para.Para32[1], AUTONEG_SUCCESS); in SkRlmtCheckSwitch()
1760 pAC, IoC, Active, PrefPort, &Para.Para32[1], AUTONEG_FAILED); in SkRlmtCheckSwitch()
1765 pAC, IoC, Active, PrefPort, &Para.Para32[1], AUTONEG_SUCCESS); in SkRlmtCheckSwitch()
1770 pAC, IoC, Active, PrefPort, &Para.Para32[1], AUTONEG_FAILED); in SkRlmtCheckSwitch()
1773 if (pAC->Rlmt.Net[0].RlmtMode != SK_RLMT_MODE_CLS) { in SkRlmtCheckSwitch()
1775 PortFound = SkRlmtSelectDown(pAC, IoC, in SkRlmtCheckSwitch()
1780 PortFound = SkRlmtSelectDown(pAC, IoC, in SkRlmtCheckSwitch()
1788 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtCheckSwitch()
1790 pAC->Rlmt.Net[NetIdx].ActivePort = Para.Para32[1]; in SkRlmtCheckSwitch()
1791 Para.Para32[0] = pAC->Rlmt.Net[NetIdx]. in SkRlmtCheckSwitch()
1793 Para.Para32[1] = pAC->Rlmt.Net[NetIdx]. in SkRlmtCheckSwitch()
1795 SK_HWAC_LINK_LED(pAC, IoC, Para.Para32[1], SK_LED_ACTIVE); in SkRlmtCheckSwitch()
1796 if (pAC->Rlmt.Port[Active].LinkDown) { in SkRlmtCheckSwitch()
1797 SkEventQueue(pAC, SKGE_DRV, SK_DRV_SWITCH_HARD, Para); in SkRlmtCheckSwitch()
1800 SK_HWAC_LINK_LED(pAC, IoC, Para.Para32[0], SK_LED_STANDBY); in SkRlmtCheckSwitch()
1801 SkEventQueue(pAC, SKGE_DRV, SK_DRV_SWITCH_SOFT, Para); in SkRlmtCheckSwitch()
1805 pAC->Rlmt.Net[NetIdx].Port[Para.Para32[0]]->PortNumber; in SkRlmtCheckSwitch()
1806 SkEventQueue(pAC, SKGE_PNMI, SK_PNMI_EVT_RLMT_ACTIVE_DOWN, Para); in SkRlmtCheckSwitch()
1807 Para.Para32[0] = pAC->Rlmt.Net[NetIdx]. in SkRlmtCheckSwitch()
1808 Port[pAC->Rlmt.Net[NetIdx].ActivePort]->PortNumber; in SkRlmtCheckSwitch()
1809 SkEventQueue(pAC, SKGE_PNMI, SK_PNMI_EVT_RLMT_ACTIVE_UP, Para); in SkRlmtCheckSwitch()
1810 if ((pAC->Rlmt.Net[NetIdx].RlmtMode & SK_RLMT_TRANSPARENT) == 0 && in SkRlmtCheckSwitch()
1811 (Para.pParaPtr = SkRlmtBuildPacket(pAC, IoC, Para.Para32[0], in SkRlmtCheckSwitch()
1812 SK_PACKET_ANNOUNCE, &pAC->Addr.Net[NetIdx].CurrentMacAddress, in SkRlmtCheckSwitch()
1819 SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para); in SkRlmtCheckSwitch()
1824 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_RLMT_E004, SKERR_RLMT_E004_MSG); in SkRlmtCheckSwitch()
1846 SK_AC *pAC, /* Adapter Context */ in SkRlmtCheckSeg() argument
1855 pNet = &pAC->Rlmt.Net[NetIdx]; in SkRlmtCheckSeg()
1864 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_DUMP, in SkRlmtCheckSeg()
1885 SK_ERR_LOG(pAC, SK_ERRCL_COMM, SKERR_RLMT_E005, SKERR_RLMT_E005_MSG); in SkRlmtCheckSeg()
1888 SkEventQueue(pAC, SKGE_PNMI, SK_PNMI_EVT_RLMT_SEGMENTATION, Para); in SkRlmtCheckSeg()
1895 SkTimerStart(pAC, IoC, &pNet->SegTimer, SK_RLMT_SEG_TO_VAL, in SkRlmtCheckSeg()
1924 SK_AC *pAC, /* Adapter Context */ in SkRlmtPortStart() argument
1930 pAC->Rlmt.Port[PortNumber].PortState = SK_RLMT_PS_LINK_DOWN; in SkRlmtPortStart()
1931 pAC->Rlmt.Port[PortNumber].PortStarted = SK_TRUE; in SkRlmtPortStart()
1932 pAC->Rlmt.Port[PortNumber].LinkDown = SK_TRUE; in SkRlmtPortStart()
1933 pAC->Rlmt.Port[PortNumber].PortDown = SK_TRUE; in SkRlmtPortStart()
1934 pAC->Rlmt.Port[PortNumber].CheckingState = 0; in SkRlmtPortStart()
1935 pAC->Rlmt.Port[PortNumber].RootIdSet = SK_FALSE; in SkRlmtPortStart()
1938 SkEventQueue(pAC, SKGE_HWAC, SK_HWEV_PORT_START, Para); in SkRlmtPortStart()
1957 SK_AC *pAC, /* Adapter Context */ in SkRlmtEvtPortStartTim() argument
1963 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtPortStartTim()
1967 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtPortStartTim()
1969 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtPortStartTim()
1980 if (pAC->Rlmt.Port[Para.Para32[0]].LinkDown) { in SkRlmtEvtPortStartTim()
1982 for (i = 0; i < pAC->Rlmt.Port[Para.Para32[0]].Net->NumPorts; i++) { in SkRlmtEvtPortStartTim()
1983 if (!pAC->Rlmt.Port[Para.Para32[0]].Net->Port[i]->PortStarted) { in SkRlmtEvtPortStartTim()
1984 SkRlmtPortStart(pAC, IoC, in SkRlmtEvtPortStartTim()
1985 pAC->Rlmt.Port[Para.Para32[0]].Net->Port[i]->PortNumber); in SkRlmtEvtPortStartTim()
1990 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtPortStartTim()
2010 SK_AC *pAC, /* Adapter Context */ in SkRlmtEvtLinkUp() argument
2018 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtLinkUp()
2021 pRPort = &pAC->Rlmt.Port[Para.Para32[0]]; in SkRlmtEvtLinkUp()
2023 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_RLMT_E008, SKERR_RLMT_E008_MSG); in SkRlmtEvtLinkUp()
2025 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtLinkUp()
2032 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtLinkUp()
2037 SkTimerStop(pAC, IoC, &pRPort->UpTimer); in SkRlmtEvtLinkUp()
2038 SkTimerStop(pAC, IoC, &pRPort->DownRxTimer); in SkRlmtEvtLinkUp()
2039 SkTimerStop(pAC, IoC, &pRPort->DownTxTimer); in SkRlmtEvtLinkUp()
2045 pRPort->GuTimeStamp = SkOsGetTime(pAC); in SkRlmtEvtLinkUp()
2049 SK_HWAC_LINK_LED(pAC, IoC, Para.Para32[0], SK_LED_ACTIVE); in SkRlmtEvtLinkUp()
2052 SK_HWAC_LINK_LED(pAC, IoC, Para.Para32[0], SK_LED_STANDBY); in SkRlmtEvtLinkUp()
2057 SkRlmtPortStart(pAC, IoC, pRPort->Net->Port[i]->PortNumber); in SkRlmtEvtLinkUp()
2061 SkRlmtCheckSwitch(pAC, IoC, pRPort->Net->NetNumber); in SkRlmtEvtLinkUp()
2066 SkRlmtBuildCheckChain(pAC, pRPort->Net->NetNumber); in SkRlmtEvtLinkUp()
2075 SkTimerStart(pAC, IoC, &pRPort->Net->LocTimer, in SkRlmtEvtLinkUp()
2081 SkTimerStart(pAC, IoC, &pRPort->UpTimer, SK_RLMT_PORTUP_TIM_VAL, in SkRlmtEvtLinkUp()
2088 SkRlmtBuildPacket(pAC, IoC, Para.Para32[0], SK_PACKET_ANNOUNCE, in SkRlmtEvtLinkUp()
2089 &pAC->Addr.Port[Para.Para32[0]].CurrentMacAddress, &SkRlmtMcAddr) in SkRlmtEvtLinkUp()
2092 SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para2); in SkRlmtEvtLinkUp()
2097 SkRlmtBuildSpanningTreePacket(pAC, IoC, Para.Para32[0])) != NULL) { in SkRlmtEvtLinkUp()
2098 pAC->Rlmt.Port[Para.Para32[0]].RootIdSet = SK_FALSE; in SkRlmtEvtLinkUp()
2102 SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para2); in SkRlmtEvtLinkUp()
2105 SkTimerStart(pAC, IoC, &pRPort->Net->SegTimer, in SkRlmtEvtLinkUp()
2110 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtLinkUp()
2130 SK_AC *pAC, /* Adapter Context */ in SkRlmtEvtPortUpTim() argument
2136 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtPortUpTim()
2140 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtPortUpTim()
2142 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtPortUpTim()
2147 pRPort = &pAC->Rlmt.Port[Para.Para32[0]]; in SkRlmtEvtPortUpTim()
2149 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtPortUpTim()
2158 if (pAC->Rlmt.NumNets <= 1) { in SkRlmtEvtPortUpTim()
2159 SkRlmtCheckSwitch(pAC, IoC, pRPort->Net->NetNumber); in SkRlmtEvtPortUpTim()
2161 SkEventQueue(pAC, SKGE_PNMI, SK_PNMI_EVT_RLMT_PORT_UP, Para); in SkRlmtEvtPortUpTim()
2164 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtPortUpTim()
2184 SK_AC *pAC, /* Adapter Context */ in SkRlmtEvtPortDownX() argument
2191 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtPortDownX()
2196 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtPortDownX()
2198 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtPortDownX()
2203 pRPort = &pAC->Rlmt.Port[Para.Para32[0]]; in SkRlmtEvtPortDownX()
2206 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtPortDownX()
2212 SkTimerStop(pAC, IoC, &pRPort->UpTimer); in SkRlmtEvtPortDownX()
2213 SkTimerStop(pAC, IoC, &pRPort->DownRxTimer); in SkRlmtEvtPortDownX()
2214 SkTimerStop(pAC, IoC, &pRPort->DownTxTimer); in SkRlmtEvtPortDownX()
2223 SkEventQueue(pAC, SKGE_PNMI, SK_PNMI_EVT_RLMT_PORT_DOWN, Para); in SkRlmtEvtPortDownX()
2239 SkRlmtCheckSwitch(pAC, IoC, pRPort->Net->NetNumber); in SkRlmtEvtPortDownX()
2243 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtPortDownX()
2263 SK_AC *pAC, /* Adapter Context */ in SkRlmtEvtLinkDown() argument
2269 pRPort = &pAC->Rlmt.Port[Para.Para32[0]]; in SkRlmtEvtLinkDown()
2270 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtLinkDown()
2273 if (!pAC->Rlmt.Port[Para.Para32[0]].LinkDown) { in SkRlmtEvtLinkDown()
2277 SK_HWAC_LINK_LED(pAC, IoC, Para.Para32[0], SK_LED_OFF); in SkRlmtEvtLinkDown()
2281 SkRlmtBuildCheckChain(pAC, pRPort->Net->NetNumber); in SkRlmtEvtLinkDown()
2286 (void)SkRlmtEvent(pAC, IoC, SK_RLMT_PORTDOWN, Para); in SkRlmtEvtLinkDown()
2289 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtLinkDown()
2309 SK_AC *pAC, /* Adapter Context */ in SkRlmtEvtPortAddr() argument
2318 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtPortAddr()
2322 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtPortAddr()
2324 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtPortAddr()
2330 pOldMacAddr = &pAC->Addr.Port[Para.Para32[0]].PreviousMacAddress; in SkRlmtEvtPortAddr()
2331 pNewMacAddr = &pAC->Addr.Port[Para.Para32[0]].CurrentMacAddress; in SkRlmtEvtPortAddr()
2338 for (i = 0; i < (SK_U32)pAC->GIni.GIMacsFound; i++) { in SkRlmtEvtPortAddr()
2339 pRPort = &pAC->Rlmt.Port[i]; in SkRlmtEvtPortAddr()
2348 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtPortAddr()
2368 SK_AC *pAC, /* Adapter Context */ in SkRlmtEvtStart() argument
2376 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtStart()
2380 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtStart()
2382 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtStart()
2387 if (Para.Para32[0] >= pAC->Rlmt.NumNets) { in SkRlmtEvtStart()
2388 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtStart()
2390 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtStart()
2395 if (pAC->Rlmt.Net[Para.Para32[0]].RlmtState != SK_RLMT_RS_INIT) { in SkRlmtEvtStart()
2396 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtStart()
2401 if (pAC->Rlmt.NetsStarted >= pAC->Rlmt.NumNets) { in SkRlmtEvtStart()
2402 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtStart()
2404 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtStart()
2409 if (pAC->Rlmt.Net[Para.Para32[0]].PrefPort >= in SkRlmtEvtStart()
2410 pAC->Rlmt.Net[Para.Para32[0]].NumPorts) { in SkRlmtEvtStart()
2411 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_RLMT_E009, SKERR_RLMT_E009_MSG); in SkRlmtEvtStart()
2416 (void)SkRlmtEvent(pAC, IoC, SK_RLMT_PREFPORT_CHANGE, Para2); in SkRlmtEvtStart()
2419 PortIdx = pAC->Rlmt.Net[Para.Para32[0]].PrefPort; in SkRlmtEvtStart()
2420 PortNumber = pAC->Rlmt.Net[Para.Para32[0]].Port[PortIdx]->PortNumber; in SkRlmtEvtStart()
2422 pAC->Rlmt.Net[Para.Para32[0]].LinksUp = 0; in SkRlmtEvtStart()
2423 pAC->Rlmt.Net[Para.Para32[0]].PortsUp = 0; in SkRlmtEvtStart()
2424 pAC->Rlmt.Net[Para.Para32[0]].CheckingState = 0; in SkRlmtEvtStart()
2425 pAC->Rlmt.Net[Para.Para32[0]].RlmtState = SK_RLMT_RS_NET_DOWN; in SkRlmtEvtStart()
2428 SkRlmtPortStart(pAC, IoC, PortNumber); in SkRlmtEvtStart()
2433 SkTimerStart(pAC, IoC, &pAC->Rlmt.Port[PortNumber].UpTimer, in SkRlmtEvtStart()
2436 pAC->Rlmt.NetsStarted++; in SkRlmtEvtStart()
2438 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtStart()
2458 SK_AC *pAC, /* Adapter Context */ in SkRlmtEvtStop() argument
2466 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtStop()
2470 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtStop()
2472 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtStop()
2477 if (Para.Para32[0] >= pAC->Rlmt.NumNets) { in SkRlmtEvtStop()
2478 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtStop()
2480 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtStop()
2485 if (pAC->Rlmt.Net[Para.Para32[0]].RlmtState == SK_RLMT_RS_INIT) { in SkRlmtEvtStop()
2486 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtStop()
2491 if (pAC->Rlmt.NetsStarted == 0) { in SkRlmtEvtStop()
2492 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtStop()
2494 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtStop()
2500 SkTimerStop(pAC, IoC, &pAC->Rlmt.Net[Para.Para32[0]].LocTimer); in SkRlmtEvtStop()
2501 SkTimerStop(pAC, IoC, &pAC->Rlmt.Net[Para.Para32[0]].SegTimer); in SkRlmtEvtStop()
2504 pAC->Rlmt.Net[Para.Para32[0]].RlmtState = SK_RLMT_RS_INIT; in SkRlmtEvtStop()
2505 pAC->Rlmt.Net[Para.Para32[0]].RootIdSet = SK_FALSE; in SkRlmtEvtStop()
2508 SkEventQueue(pAC, SKGE_DRV, SK_DRV_NET_DOWN, Para2); in SkRlmtEvtStop()
2511 for (i = 0; i < pAC->Rlmt.Net[Para.Para32[0]].NumPorts; i++) { in SkRlmtEvtStop()
2512 PortNumber = pAC->Rlmt.Net[Para.Para32[0]].Port[i]->PortNumber; in SkRlmtEvtStop()
2513 if (pAC->Rlmt.Port[PortNumber].PortState != SK_RLMT_PS_INIT) { in SkRlmtEvtStop()
2514 SkTimerStop(pAC, IoC, &pAC->Rlmt.Port[PortNumber].UpTimer); in SkRlmtEvtStop()
2515 SkTimerStop(pAC, IoC, &pAC->Rlmt.Port[PortNumber].DownRxTimer); in SkRlmtEvtStop()
2516 SkTimerStop(pAC, IoC, &pAC->Rlmt.Port[PortNumber].DownTxTimer); in SkRlmtEvtStop()
2518 pAC->Rlmt.Port[PortNumber].PortState = SK_RLMT_PS_INIT; in SkRlmtEvtStop()
2519 pAC->Rlmt.Port[PortNumber].RootIdSet = SK_FALSE; in SkRlmtEvtStop()
2520 pAC->Rlmt.Port[PortNumber].PortStarted = SK_FALSE; in SkRlmtEvtStop()
2523 SkEventQueue(pAC, SKGE_HWAC, SK_HWEV_PORT_STOP, Para2); in SkRlmtEvtStop()
2527 pAC->Rlmt.NetsStarted--; in SkRlmtEvtStop()
2529 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtStop()
2549 SK_AC *pAC, /* Adapter Context */ in SkRlmtEvtTim() argument
2559 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtTim()
2563 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtTim()
2565 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtTim()
2570 if ((pAC->Rlmt.Net[Para.Para32[0]].RlmtMode & SK_RLMT_CHECK_OTHERS) == 0 || in SkRlmtEvtTim()
2571 pAC->Rlmt.Net[Para.Para32[0]].LinksUp == 0) { in SkRlmtEvtTim()
2577 pAC->Rlmt.SwitchCheckCounter--; in SkRlmtEvtTim()
2578 if (pAC->Rlmt.SwitchCheckCounter == 0) { in SkRlmtEvtTim()
2579 pAC->Rlmt.SwitchCheckCounter; in SkRlmtEvtTim()
2584 for (i = 0; i < pAC->Rlmt.Net[Para.Para32[0]].NumPorts; i++) { in SkRlmtEvtTim()
2585 PortNumber = pAC->Rlmt.Net[Para.Para32[0]].Port[i]->PortNumber; in SkRlmtEvtTim()
2586 pRPort = &pAC->Rlmt.Port[PortNumber]; in SkRlmtEvtTim()
2588 Timeout = SkRlmtCheckPort(pAC, IoC, PortNumber); in SkRlmtEvtTim()
2602 pAC->Rlmt.Net[Para.Para32[0]].TimeoutValue = NewTimeout; in SkRlmtEvtTim()
2604 if (pAC->Rlmt.Net[Para.Para32[0]].LinksUp > 1) { in SkRlmtEvtTim()
2615 for (i = 0; i < pAC->Rlmt.Net[Para.Para32[0]].NumPorts; i++) { in SkRlmtEvtTim()
2616 if (!pAC->Rlmt.Net[Para.Para32[0]].Port[i]->LinkDown) { in SkRlmtEvtTim()
2617 SkRlmtSend(pAC, IoC, in SkRlmtEvtTim()
2618 pAC->Rlmt.Net[Para.Para32[0]].Port[i]->PortNumber); in SkRlmtEvtTim()
2623 SkTimerStart(pAC, IoC, &pAC->Rlmt.Net[Para.Para32[0]].LocTimer, in SkRlmtEvtTim()
2624 pAC->Rlmt.Net[Para.Para32[0]].TimeoutValue, SKGE_RLMT, SK_RLMT_TIM, in SkRlmtEvtTim()
2627 if (pAC->Rlmt.Net[Para.Para32[0]].LinksUp > 1 && in SkRlmtEvtTim()
2628 (pAC->Rlmt.Net[Para.Para32[0]].RlmtMode & SK_RLMT_CHECK_SEG) && in SkRlmtEvtTim()
2629 (pAC->Rlmt.Net[Para.Para32[0]].CheckingState & SK_RLMT_RCS_START_SEG)) { in SkRlmtEvtTim()
2630 SkTimerStart(pAC, IoC, &pAC->Rlmt.Net[Para.Para32[0]].SegTimer, in SkRlmtEvtTim()
2632 pAC->Rlmt.Net[Para.Para32[0]].CheckingState &= ~SK_RLMT_RCS_START_SEG; in SkRlmtEvtTim()
2633 pAC->Rlmt.Net[Para.Para32[0]].CheckingState |= in SkRlmtEvtTim()
2637 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtTim()
2657 SK_AC *pAC, /* Adapter Context */ in SkRlmtEvtSegTim() argument
2665 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtSegTim()
2669 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtSegTim()
2671 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtSegTim()
2677 for (j = 0; j < pAC->Rlmt.Net[Para.Para32[0]].NumPorts; j++) { in SkRlmtEvtSegTim()
2684 pAPort = pAC->Rlmt.Net[Para.Para32[0]].Port[j]->AddrPort; in SkRlmtEvtSegTim()
2687 XM_INADDR(IoC, pAC->Rlmt.Net[Para.Para32[0]].Port[j]->PortNumber, in SkRlmtEvtSegTim()
2689 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtSegTim()
2691 k, pAC->Rlmt.Net[Para.Para32[0]].Port[j]->PortNumber, in SkRlmtEvtSegTim()
2701 SkRlmtCheckSeg(pAC, IoC, Para.Para32[0]); in SkRlmtEvtSegTim()
2703 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtSegTim()
2723 SK_AC *pAC, /* Adapter Context */ in SkRlmtEvtPacketRx() argument
2732 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtPacketRx()
2740 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, ("No mbuf.\n")) in SkRlmtEvtPacketRx()
2743 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtPacketRx()
2752 NetNumber = pAC->Rlmt.Port[pMb->PortIdx].Net->NetNumber; in SkRlmtEvtPacketRx()
2753 if (pAC->Rlmt.Net[NetNumber].RlmtState == SK_RLMT_RS_INIT) { in SkRlmtEvtPacketRx()
2754 SkDrvFreeRlmtMbuf(pAC, IoC, pMb); in SkRlmtEvtPacketRx()
2757 SkRlmtPacketReceive(pAC, IoC, pMb); in SkRlmtEvtPacketRx()
2761 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtPacketRx()
2781 SK_AC *pAC, /* Adapter Context */ in SkRlmtEvtStatsClear() argument
2788 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtStatsClear()
2792 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtStatsClear()
2794 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtStatsClear()
2799 if (Para.Para32[0] >= pAC->Rlmt.NumNets) { in SkRlmtEvtStatsClear()
2800 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtStatsClear()
2802 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtStatsClear()
2808 for (i = 0; i < pAC->Rlmt.Net[Para.Para32[0]].NumPorts; i++) { in SkRlmtEvtStatsClear()
2810 &pAC->Rlmt.Port[pAC->Rlmt.Net[Para.Para32[0]].Port[i]->PortNumber]; in SkRlmtEvtStatsClear()
2817 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtStatsClear()
2837 SK_AC *pAC, /* Adapter Context */ in SkRlmtEvtStatsUpdate() argument
2841 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtStatsUpdate()
2845 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtStatsUpdate()
2847 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtStatsUpdate()
2852 if (Para.Para32[0] >= pAC->Rlmt.NumNets) { in SkRlmtEvtStatsUpdate()
2853 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtStatsUpdate()
2855 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtStatsUpdate()
2862 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtStatsUpdate()
2882 SK_AC *pAC, /* Adapter Context */ in SkRlmtEvtPrefportChange() argument
2886 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtPrefportChange()
2889 if (Para.Para32[1] >= pAC->Rlmt.NumNets) { in SkRlmtEvtPrefportChange()
2890 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtPrefportChange()
2892 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtPrefportChange()
2899 pAC->Rlmt.Net[Para.Para32[1]].PrefPort = SK_RLMT_DEF_PREF_PORT; in SkRlmtEvtPrefportChange()
2902 if (Para.Para32[0] >= pAC->Rlmt.Net[Para.Para32[1]].NumPorts) { in SkRlmtEvtPrefportChange()
2903 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_RLMT_E010, SKERR_RLMT_E010_MSG); in SkRlmtEvtPrefportChange()
2905 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtPrefportChange()
2910 pAC->Rlmt.Net[Para.Para32[1]].PrefPort = Para.Para32[0]; in SkRlmtEvtPrefportChange()
2913 pAC->Rlmt.Net[Para.Para32[1]].Preference = Para.Para32[0]; in SkRlmtEvtPrefportChange()
2915 if (pAC->Rlmt.Net[Para.Para32[1]].RlmtState != SK_RLMT_RS_INIT) { in SkRlmtEvtPrefportChange()
2916 SkRlmtCheckSwitch(pAC, IoC, Para.Para32[1]); in SkRlmtEvtPrefportChange()
2919 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtPrefportChange()
2939 SK_AC *pAC, /* Adapter Context */ in SkRlmtEvtSetNets() argument
2945 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtSetNets()
2949 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtSetNets()
2951 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtSetNets()
2957 Para.Para32[0] > (SK_U32)pAC->GIni.GIMacsFound) { in SkRlmtEvtSetNets()
2958 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtSetNets()
2960 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtSetNets()
2965 if (Para.Para32[0] == pAC->Rlmt.NumNets) { /* No change. */ in SkRlmtEvtSetNets()
2966 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtSetNets()
2972 if (pAC->Rlmt.NetsStarted > 0) { in SkRlmtEvtSetNets()
2973 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtSetNets()
2975 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtSetNets()
2981 if (pAC->Rlmt.NumNets > 1) { in SkRlmtEvtSetNets()
2983 (void)SkAddrOverride(pAC, IoC, pAC->Rlmt.Net[1].Port[pAC->Addr. in SkRlmtEvtSetNets()
2985 pAC->Rlmt.Net[1].NumPorts = 0; in SkRlmtEvtSetNets()
2988 pAC->Rlmt.NumNets = Para.Para32[0]; in SkRlmtEvtSetNets()
2989 for (i = 0; (SK_U32)i < pAC->Rlmt.NumNets; i++) { in SkRlmtEvtSetNets()
2990 pAC->Rlmt.Net[i].RlmtState = SK_RLMT_RS_INIT; in SkRlmtEvtSetNets()
2991 pAC->Rlmt.Net[i].RootIdSet = SK_FALSE; in SkRlmtEvtSetNets()
2992 pAC->Rlmt.Net[i].Preference = 0xFFFFFFFF; /* "Automatic" */ in SkRlmtEvtSetNets()
2993 pAC->Rlmt.Net[i].PrefPort = SK_RLMT_DEF_PREF_PORT; in SkRlmtEvtSetNets()
2995 pAC->Rlmt.Net[i].ActivePort = pAC->Rlmt.Net[i].PrefPort; in SkRlmtEvtSetNets()
2996 pAC->Rlmt.Net[i].RlmtMode = SK_RLMT_DEF_MODE; in SkRlmtEvtSetNets()
2997 pAC->Rlmt.Net[i].TimeoutValue = SK_RLMT_DEF_TO_VAL; in SkRlmtEvtSetNets()
2998 pAC->Rlmt.Net[i].NetNumber = i; in SkRlmtEvtSetNets()
3001 pAC->Rlmt.Port[1].Net= &pAC->Rlmt.Net[0]; in SkRlmtEvtSetNets()
3002 pAC->Rlmt.Net[0].NumPorts = pAC->GIni.GIMacsFound; in SkRlmtEvtSetNets()
3004 SkEventQueue(pAC, SKGE_PNMI, SK_PNMI_EVT_RLMT_SET_NETS, Para); in SkRlmtEvtSetNets()
3006 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtSetNets()
3010 pAC->Rlmt.Port[1].Net= &pAC->Rlmt.Net[1]; in SkRlmtEvtSetNets()
3011 pAC->Rlmt.Net[1].NumPorts = pAC->GIni.GIMacsFound - 1; in SkRlmtEvtSetNets()
3012 pAC->Rlmt.Net[0].NumPorts = in SkRlmtEvtSetNets()
3013 pAC->GIni.GIMacsFound - pAC->Rlmt.Net[1].NumPorts; in SkRlmtEvtSetNets()
3015 pAC->Rlmt.NumNets = Para.Para32[0]; in SkRlmtEvtSetNets()
3016 for (i = 0; (SK_U32)i < pAC->Rlmt.NumNets; i++) { in SkRlmtEvtSetNets()
3017 pAC->Rlmt.Net[i].RlmtState = SK_RLMT_RS_INIT; in SkRlmtEvtSetNets()
3018 pAC->Rlmt.Net[i].RootIdSet = SK_FALSE; in SkRlmtEvtSetNets()
3019 pAC->Rlmt.Net[i].Preference = 0xFFFFFFFF; /* "Automatic" */ in SkRlmtEvtSetNets()
3020 pAC->Rlmt.Net[i].PrefPort = SK_RLMT_DEF_PREF_PORT; in SkRlmtEvtSetNets()
3022 pAC->Rlmt.Net[i].ActivePort = pAC->Rlmt.Net[i].PrefPort; in SkRlmtEvtSetNets()
3023 pAC->Rlmt.Net[i].RlmtMode = SK_RLMT_DEF_MODE; in SkRlmtEvtSetNets()
3024 pAC->Rlmt.Net[i].TimeoutValue = SK_RLMT_DEF_TO_VAL; in SkRlmtEvtSetNets()
3026 pAC->Rlmt.Net[i].NetNumber = i; in SkRlmtEvtSetNets()
3030 (void)SkAddrOverride(pAC, IoC, pAC->Rlmt.Net[1].Port[pAC->Addr. in SkRlmtEvtSetNets()
3033 SkEventQueue(pAC, SKGE_PNMI, SK_PNMI_EVT_RLMT_SET_NETS, Para); in SkRlmtEvtSetNets()
3035 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtSetNets()
3040 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtSetNets()
3042 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtSetNets()
3047 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtSetNets()
3067 SK_AC *pAC, /* Adapter Context */ in SkRlmtEvtModeChange() argument
3075 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtModeChange()
3078 if (Para.Para32[1] >= pAC->Rlmt.NumNets) { in SkRlmtEvtModeChange()
3079 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtModeChange()
3081 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtModeChange()
3088 if ((pAC->Rlmt.Net[Para.Para32[1]].NumPorts == 1) && in SkRlmtEvtModeChange()
3090 pAC->Rlmt.Net[Para.Para32[1]].RlmtMode = SK_RLMT_MODE_CLS; in SkRlmtEvtModeChange()
3091 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtModeChange()
3093 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtModeChange()
3099 PrevRlmtMode = pAC->Rlmt.Net[Para.Para32[1]].RlmtMode; in SkRlmtEvtModeChange()
3100 pAC->Rlmt.Net[Para.Para32[1]].RlmtMode = Para.Para32[0]; in SkRlmtEvtModeChange()
3103 (pAC->Rlmt.Net[Para.Para32[1]].RlmtMode & SK_RLMT_CHECK_LOC_LINK)) { in SkRlmtEvtModeChange()
3106 pAC->Rlmt.Net[Para.Para32[1]].NumPorts > 1 && in SkRlmtEvtModeChange()
3107 pAC->Rlmt.Net[Para.Para32[1]].PortsUp >= 1) { in SkRlmtEvtModeChange()
3111 SkTimerStart(pAC, IoC, &pAC->Rlmt.Net[Para.Para32[1]].LocTimer, in SkRlmtEvtModeChange()
3112 pAC->Rlmt.Net[Para.Para32[1]].TimeoutValue, in SkRlmtEvtModeChange()
3118 (pAC->Rlmt.Net[Para.Para32[1]].RlmtMode & SK_RLMT_CHECK_SEG)) { in SkRlmtEvtModeChange()
3120 for (i = 0; i < pAC->Rlmt.Net[Para.Para32[1]].NumPorts; i++) { in SkRlmtEvtModeChange()
3121 (void)SkAddrMcClear(pAC, IoC, in SkRlmtEvtModeChange()
3122 pAC->Rlmt.Net[Para.Para32[1]].Port[i]->PortNumber, in SkRlmtEvtModeChange()
3126 (void)SkAddrMcAdd(pAC, IoC, in SkRlmtEvtModeChange()
3127 pAC->Rlmt.Net[Para.Para32[1]].Port[i]->PortNumber, in SkRlmtEvtModeChange()
3130 if ((pAC->Rlmt.Net[Para.Para32[1]].RlmtMode & in SkRlmtEvtModeChange()
3133 (void)SkAddrMcAdd(pAC, IoC, in SkRlmtEvtModeChange()
3134 pAC->Rlmt.Net[Para.Para32[1]].Port[i]->PortNumber, in SkRlmtEvtModeChange()
3137 if (pAC->Rlmt.Net[Para.Para32[1]].RlmtState != SK_RLMT_RS_INIT) { in SkRlmtEvtModeChange()
3138 if (!pAC->Rlmt.Net[Para.Para32[1]].Port[i]->LinkDown && in SkRlmtEvtModeChange()
3140 pAC, IoC, i)) != NULL) { in SkRlmtEvtModeChange()
3141 pAC->Rlmt.Net[Para.Para32[1]].Port[i]->RootIdSet = in SkRlmtEvtModeChange()
3143 SkEventQueue(pAC, SKGE_DRV, SK_DRV_RLMT_SEND, Para2); in SkRlmtEvtModeChange()
3147 (void)SkAddrMcUpdate(pAC, IoC, in SkRlmtEvtModeChange()
3148 pAC->Rlmt.Net[Para.Para32[1]].Port[i]->PortNumber); in SkRlmtEvtModeChange()
3151 if ((pAC->Rlmt.Net[Para.Para32[1]].RlmtMode & SK_RLMT_CHECK_SEG) != 0) { in SkRlmtEvtModeChange()
3154 SkTimerStart(pAC, IoC, &pAC->Rlmt.Net[Para.Para32[1]].SegTimer, in SkRlmtEvtModeChange()
3159 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvtModeChange()
3179 SK_AC *pAC, /* Adapter Context */ in SkRlmtEvent() argument
3189 SkRlmtEvtPortStartTim(pAC, IoC, Para); in SkRlmtEvent()
3192 SkRlmtEvtLinkUp(pAC, IoC, Para); in SkRlmtEvent()
3195 SkRlmtEvtPortUpTim(pAC, IoC, Para); in SkRlmtEvent()
3200 SkRlmtEvtPortDownX(pAC, IoC, Event, Para); in SkRlmtEvent()
3203 SkRlmtEvtLinkDown(pAC, IoC, Para); in SkRlmtEvent()
3206 SkRlmtEvtPortAddr(pAC, IoC, Para); in SkRlmtEvent()
3212 SkRlmtEvtStart(pAC, IoC, Para); in SkRlmtEvent()
3215 SkRlmtEvtStop(pAC, IoC, Para); in SkRlmtEvent()
3218 SkRlmtEvtTim(pAC, IoC, Para); in SkRlmtEvent()
3221 SkRlmtEvtSegTim(pAC, IoC, Para); in SkRlmtEvent()
3224 SkRlmtEvtPacketRx(pAC, IoC, Para); in SkRlmtEvent()
3227 SkRlmtEvtStatsClear(pAC, IoC, Para); in SkRlmtEvent()
3230 SkRlmtEvtStatsUpdate(pAC, IoC, Para); in SkRlmtEvent()
3233 SkRlmtEvtPrefportChange(pAC, IoC, Para); in SkRlmtEvent()
3236 SkRlmtEvtModeChange(pAC, IoC, Para); in SkRlmtEvent()
3239 SkRlmtEvtSetNets(pAC, IoC, Para); in SkRlmtEvent()
3245 SK_DBG_MSG(pAC, SK_DBGMOD_RLMT, SK_DBGCAT_CTRL, in SkRlmtEvent()
3247 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_RLMT_E003, SKERR_RLMT_E003_MSG); in SkRlmtEvent()