Lines Matching refs:pAC
55 int SkPnmiInit(SK_AC *pAC, SK_IOC IoC, int level);
56 int SkPnmiGetVar(SK_AC *pAC, SK_IOC IoC, SK_U32 Id, void *pBuf,
58 int SkPnmiPreSetVar(SK_AC *pAC, SK_IOC IoC, SK_U32 Id, void *pBuf,
60 int SkPnmiSetVar(SK_AC *pAC, SK_IOC IoC, SK_U32 Id, void *pBuf,
62 int SkPnmiGetStruct(SK_AC *pAC, SK_IOC IoC, void *pBuf,
64 int SkPnmiPreSetStruct(SK_AC *pAC, SK_IOC IoC, void *pBuf,
66 int SkPnmiSetStruct(SK_AC *pAC, SK_IOC IoC, void *pBuf,
68 int SkPnmiEvent(SK_AC *pAC, SK_IOC IoC, SK_U32 Event, SK_EVPARA Param);
69 int SkPnmiGenIoctl(SK_AC *pAC, SK_IOC IoC, void * pBuf,
77 PNMI_STATIC SK_U8 CalculateLinkModeStatus(SK_AC *pAC, SK_IOC IoC, unsigned int
79 PNMI_STATIC SK_U8 CalculateLinkStatus(SK_AC *pAC, SK_IOC IoC, unsigned int
82 PNMI_STATIC void CopyTrapQueue(SK_AC *pAC, char *pDstBuf);
83 PNMI_STATIC SK_U64 GetPhysStatVal(SK_AC *pAC, SK_IOC IoC,
85 PNMI_STATIC SK_U64 GetStatVal(SK_AC *pAC, SK_IOC IoC, unsigned int LogPortIndex,
87 PNMI_STATIC char* GetTrapEntry(SK_AC *pAC, SK_U32 TrapId, unsigned int Size);
88 PNMI_STATIC void GetTrapQueueLen(SK_AC *pAC, unsigned int *pLen,
90 PNMI_STATIC int GetVpdKeyArr(SK_AC *pAC, SK_IOC IoC, char *pKeyArr,
93 PNMI_STATIC int MacUpdate(SK_AC *pAC, SK_IOC IoC, unsigned int FirstMac,
95 PNMI_STATIC int PnmiStruct(SK_AC *pAC, SK_IOC IoC, int Action, char *pBuf,
97 PNMI_STATIC int PnmiVar(SK_AC *pAC, SK_IOC IoC, int Action, SK_U32 Id,
99 PNMI_STATIC void QueueRlmtNewMacTrap(SK_AC *pAC, unsigned int ActiveMac);
100 PNMI_STATIC void QueueRlmtPortTrap(SK_AC *pAC, SK_U32 TrapId,
102 PNMI_STATIC void QueueSensorTrap(SK_AC *pAC, SK_U32 TrapId,
104 PNMI_STATIC void QueueSimpleTrap(SK_AC *pAC, SK_U32 TrapId);
105 PNMI_STATIC void ResetCounter(SK_AC *pAC, SK_IOC IoC, SK_U32 NetIndex);
106 PNMI_STATIC int RlmtUpdate(SK_AC *pAC, SK_IOC IoC, SK_U32 NetIndex);
107 PNMI_STATIC int SirqUpdate(SK_AC *pAC, SK_IOC IoC);
108 PNMI_STATIC void VirtualConf(SK_AC *pAC, SK_IOC IoC, SK_U32 Id, char *pBuf);
109 PNMI_STATIC int Vct(SK_AC *pAC, SK_IOC IoC, int Action, SK_U32 Id, char *pBuf,
353 SK_AC *pAC, /* Pointer to adapter context */ in SkPnmiInit() argument
365 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL, in SkPnmiInit()
371 SK_MEMSET((char *)&pAC->Pnmi, 0, sizeof(pAC->Pnmi)); in SkPnmiInit()
372 pAC->Pnmi.TrapBufFree = SK_PNMI_TRAP_QUEUE_LEN; in SkPnmiInit()
373 pAC->Pnmi.StartUpTime = SK_PNMI_HUNDREDS_SEC(SkOsGetTime(pAC)); in SkPnmiInit()
374 pAC->Pnmi.RlmtChangeThreshold = SK_PNMI_DEF_RLMT_CHG_THRES; in SkPnmiInit()
377 pAC->Pnmi.Port[PortIndex].ActiveFlag = SK_FALSE; in SkPnmiInit()
378 pAC->Pnmi.DualNetActiveFlag = SK_FALSE; in SkPnmiInit()
384 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR049, SK_PNMI_ERR049MSG); in SkPnmiInit()
386 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_INIT | SK_DBGCAT_FATAL, in SkPnmiInit()
395 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR050, SK_PNMI_ERR050MSG); in SkPnmiInit()
397 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_INIT | SK_DBGCAT_FATAL, in SkPnmiInit()
411 PortMax = pAC->GIni.GIMacsFound; in SkPnmiInit()
415 pAC->GIni.GIFunc.pFnMacResetCounter(pAC, IoC, PortIndex); in SkPnmiInit()
420 pAC->GIni.GP[PortIndex].PCableLen = 0xff; in SkPnmiInit()
421 pVctBackupData = &pAC->Pnmi.VctBackup[PortIndex]; in SkPnmiInit()
431 pAC->Pnmi.PciBusSpeed = 33; in SkPnmiInit()
434 pAC->Pnmi.PciBusSpeed = 66; in SkPnmiInit()
443 pAC->Pnmi.PciBusWidth = 32; in SkPnmiInit()
446 pAC->Pnmi.PciBusWidth = 64; in SkPnmiInit()
452 switch (pAC->GIni.GIChipId) { in SkPnmiInit()
454 pAC->Pnmi.Chipset = SK_PNMI_CHIPSET_XMAC; in SkPnmiInit()
458 pAC->Pnmi.Chipset = SK_PNMI_CHIPSET_YUKON; in SkPnmiInit()
471 pAC->Pnmi.PMD = 3; in SkPnmiInit()
472 if (pAC->GIni.GIMacsFound > 1) { in SkPnmiInit()
474 pAC->Pnmi.DeviceType = 0x00020002; in SkPnmiInit()
477 pAC->Pnmi.DeviceType = 0x00020001; in SkPnmiInit()
482 pAC->Pnmi.PMD = 2; in SkPnmiInit()
483 if (pAC->GIni.GIMacsFound > 1) { in SkPnmiInit()
485 pAC->Pnmi.DeviceType = 0x00020004; in SkPnmiInit()
488 pAC->Pnmi.DeviceType = 0x00020003; in SkPnmiInit()
493 pAC->Pnmi.PMD = 4; in SkPnmiInit()
494 if (pAC->GIni.GIMacsFound > 1) { in SkPnmiInit()
496 pAC->Pnmi.DeviceType = 0x00020006; in SkPnmiInit()
499 pAC->Pnmi.DeviceType = 0x00020005; in SkPnmiInit()
504 pAC->Pnmi.PMD = 5; in SkPnmiInit()
505 if (pAC->GIni.GIMacsFound > 1) { in SkPnmiInit()
507 pAC->Pnmi.DeviceType = 0x00020008; in SkPnmiInit()
510 pAC->Pnmi.DeviceType = 0x00020007; in SkPnmiInit()
515 pAC->Pnmi.PMD = 1; in SkPnmiInit()
516 pAC->Pnmi.DeviceType = 0; in SkPnmiInit()
526 pAC->Pnmi.Connector = 2; in SkPnmiInit()
530 pAC->Pnmi.Connector = 3; in SkPnmiInit()
534 pAC->Pnmi.Connector = 4; in SkPnmiInit()
538 pAC->Pnmi.Connector = 5; in SkPnmiInit()
542 pAC->Pnmi.Connector = 6; in SkPnmiInit()
546 pAC->Pnmi.Connector = 1; in SkPnmiInit()
556 SkTimerStart(pAC, IoC, &pAC->Pnmi.RlmtChangeEstimate.EstTimer, in SkPnmiInit()
588 SK_AC *pAC, /* Pointer to adapter context */ in SkPnmiGetVar() argument
596 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL, in SkPnmiGetVar()
600 return (PnmiVar(pAC, IoC, SK_PNMI_GET, Id, (char *)pBuf, pLen, in SkPnmiGetVar()
630 SK_AC *pAC, /* Pointer to adapter context */ in SkPnmiPreSetVar() argument
638 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL, in SkPnmiPreSetVar()
643 return (PnmiVar(pAC, IoC, SK_PNMI_PRESET, Id, (char *)pBuf, pLen, in SkPnmiPreSetVar()
673 SK_AC *pAC, /* Pointer to adapter context */ in SkPnmiSetVar() argument
681 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL, in SkPnmiSetVar()
685 return (PnmiVar(pAC, IoC, SK_PNMI_SET, Id, (char *)pBuf, pLen, in SkPnmiSetVar()
709 SK_AC *pAC, /* Pointer to adapter context */ in SkPnmiGetStruct() argument
725 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL, in SkPnmiGetStruct()
744 if (NetIndex >= pAC->Rlmt.NumNets) { in SkPnmiGetStruct()
751 if ((Ret = MacUpdate(pAC, IoC, 0, pAC->GIni.GIMacsFound - 1)) != in SkPnmiGetStruct()
759 if ((Ret = RlmtUpdate(pAC, IoC, NetIndex)) != SK_PNMI_ERR_OK) { in SkPnmiGetStruct()
766 if ((Ret = SirqUpdate(pAC, IoC)) != SK_PNMI_ERR_OK) { in SkPnmiGetStruct()
777 pAC->Pnmi.MacUpdatedFlag ++; in SkPnmiGetStruct()
778 pAC->Pnmi.RlmtUpdatedFlag ++; in SkPnmiGetStruct()
779 pAC->Pnmi.SirqUpdatedFlag ++; in SkPnmiGetStruct()
782 Ret = GetVpdKeyArr(pAC, IoC, &KeyArr[0][0], sizeof(KeyArr), &TmpLen); in SkPnmiGetStruct()
785 pAC->Pnmi.MacUpdatedFlag --; in SkPnmiGetStruct()
786 pAC->Pnmi.RlmtUpdatedFlag --; in SkPnmiGetStruct()
787 pAC->Pnmi.SirqUpdatedFlag --; in SkPnmiGetStruct()
824 Ret = IdTable[TableIndex].Func(pAC, IoC, SK_PNMI_GET, in SkPnmiGetStruct()
841 pAC->Pnmi.MacUpdatedFlag --; in SkPnmiGetStruct()
842 pAC->Pnmi.RlmtUpdatedFlag --; in SkPnmiGetStruct()
843 pAC->Pnmi.SirqUpdatedFlag --; in SkPnmiGetStruct()
853 pAC->Pnmi.MacUpdatedFlag --; in SkPnmiGetStruct()
854 pAC->Pnmi.RlmtUpdatedFlag --; in SkPnmiGetStruct()
855 pAC->Pnmi.SirqUpdatedFlag --; in SkPnmiGetStruct()
887 SK_AC *pAC, /* Pointer to adapter context */ in SkPnmiPreSetStruct() argument
893 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL, in SkPnmiPreSetStruct()
897 return (PnmiStruct(pAC, IoC, SK_PNMI_PRESET, (char *)pBuf, in SkPnmiPreSetStruct()
925 SK_AC *pAC, /* Pointer to adapter context */ in SkPnmiSetStruct() argument
931 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL, in SkPnmiSetStruct()
935 return (PnmiStruct(pAC, IoC, SK_PNMI_SET, (char *)pBuf, in SkPnmiSetStruct()
990 SK_AC *pAC, /* Pointer to adapter context */ in SkPnmiEvent() argument
1022 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL, in SkPnmiEvent()
1029 MacType = pAC->GIni.GIMacType; in SkPnmiEvent()
1039 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL, in SkPnmiEvent()
1051 if ((pAC->GIni.GIFunc.pFnMacOverflow(pAC, IoC, PhysPortIndex, in SkPnmiEvent()
1109 pAC->Pnmi.Port[PhysPortIndex]. in SkPnmiEvent()
1115 pAC->Pnmi.Port[PhysPortIndex]. in SkPnmiEvent()
1123 if ((unsigned int)Param.Para64 >= (unsigned int)pAC->I2c.MaxSens) { in SkPnmiEvent()
1125 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL, in SkPnmiEvent()
1137 QueueSensorTrap(pAC, OID_SKGE_TRAP_SEN_WAR_LOW, in SkPnmiEvent()
1139 (void)SK_DRIVER_SENDEVENT(pAC, IoC); in SkPnmiEvent()
1144 if ((unsigned int)Param.Para64 >= (unsigned int)pAC->I2c.MaxSens) { in SkPnmiEvent()
1146 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL, in SkPnmiEvent()
1158 QueueSensorTrap(pAC, OID_SKGE_TRAP_SEN_WAR_UPP, in SkPnmiEvent()
1160 (void)SK_DRIVER_SENDEVENT(pAC, IoC); in SkPnmiEvent()
1165 if ((unsigned int)Param.Para64 >= (unsigned int)pAC->I2c.MaxSens) { in SkPnmiEvent()
1167 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL, in SkPnmiEvent()
1179 QueueSensorTrap(pAC, OID_SKGE_TRAP_SEN_ERR_LOW, in SkPnmiEvent()
1181 (void)SK_DRIVER_SENDEVENT(pAC, IoC); in SkPnmiEvent()
1186 if ((unsigned int)Param.Para64 >= (unsigned int)pAC->I2c.MaxSens) { in SkPnmiEvent()
1188 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL, in SkPnmiEvent()
1200 QueueSensorTrap(pAC, OID_SKGE_TRAP_SEN_ERR_UPP, in SkPnmiEvent()
1202 (void)SK_DRIVER_SENDEVENT(pAC, IoC); in SkPnmiEvent()
1219 pEst = &pAC->Pnmi.RlmtChangeEstimate; in SkPnmiEvent()
1227 NewestValue = pAC->Pnmi.RlmtChangeCts; in SkPnmiEvent()
1250 pAC->Pnmi.RlmtChangeEstimate.Estimate = Delta << 4; in SkPnmiEvent()
1257 if ((pAC->Pnmi.RlmtChangeThreshold != 0) && in SkPnmiEvent()
1258 (pAC->Pnmi.RlmtChangeEstimate.Estimate >= in SkPnmiEvent()
1259 pAC->Pnmi.RlmtChangeThreshold)) { in SkPnmiEvent()
1261 QueueSimpleTrap(pAC, OID_SKGE_TRAP_RLMT_CHANGE_THRES); in SkPnmiEvent()
1262 (void)SK_DRIVER_SENDEVENT(pAC, IoC); in SkPnmiEvent()
1266 SkTimerStart(pAC, IoC, &pAC->Pnmi.RlmtChangeEstimate.EstTimer, in SkPnmiEvent()
1279 if (NetIndex >= pAC->Rlmt.NumNets) { in SkPnmiEvent()
1281 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL, in SkPnmiEvent()
1294 ResetCounter(pAC, IoC, NetIndex); in SkPnmiEvent()
1306 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL, in SkPnmiEvent()
1317 Ret = MacUpdate(pAC, IoC, 0, pAC->GIni.GIMacsFound - 1); in SkPnmiEvent()
1327 pAC->Pnmi.MacUpdatedFlag ++; in SkPnmiEvent()
1337 pAC->Pnmi.Port[PhysPortIndex].CounterOffset[CounterIndex] = in SkPnmiEvent()
1338 GetPhysStatVal(pAC, IoC, PhysPortIndex, CounterIndex); in SkPnmiEvent()
1340 pAC->Pnmi.Port[PhysPortIndex].CounterHigh[CounterIndex] = 0; in SkPnmiEvent()
1343 pAC->Pnmi.MacUpdatedFlag --; in SkPnmiEvent()
1351 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL, in SkPnmiEvent()
1363 QueueRlmtPortTrap(pAC, OID_SKGE_TRAP_RLMT_PORT_UP, PhysPortIndex); in SkPnmiEvent()
1364 (void)SK_DRIVER_SENDEVENT(pAC, IoC); in SkPnmiEvent()
1369 (void)pAC->GIni.GIFunc.pFnMacStatistic(pAC, IoC, PhysPortIndex, in SkPnmiEvent()
1372 Value = (((SK_U64)pAC->Pnmi.Port[PhysPortIndex]. in SkPnmiEvent()
1374 pAC->Pnmi.Port[PhysPortIndex].CounterOffset[SK_PNMI_HRX_SHORTS] += in SkPnmiEvent()
1375 Value - pAC->Pnmi.Port[PhysPortIndex].RxShortZeroMark; in SkPnmiEvent()
1379 pAC->Pnmi.VctStatus[PhysPortIndex] |= SK_PNMI_VCT_LINK; in SkPnmiEvent()
1388 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL, in SkPnmiEvent()
1400 QueueRlmtPortTrap(pAC, OID_SKGE_TRAP_RLMT_PORT_DOWN, PhysPortIndex); in SkPnmiEvent()
1401 (void)SK_DRIVER_SENDEVENT(pAC, IoC); in SkPnmiEvent()
1406 (void)pAC->GIni.GIFunc.pFnMacStatistic(pAC, IoC, PhysPortIndex, in SkPnmiEvent()
1409 pAC->Pnmi.Port[PhysPortIndex].RxShortZeroMark = in SkPnmiEvent()
1410 (((SK_U64)pAC->Pnmi.Port[PhysPortIndex]. in SkPnmiEvent()
1422 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL, in SkPnmiEvent()
1427 if (NetIndex >= pAC->Rlmt.NumNets) { in SkPnmiEvent()
1429 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL, in SkPnmiEvent()
1446 if (!pAC->Pnmi.Port[PhysPortIndex].ActiveFlag) { in SkPnmiEvent()
1456 if (MacUpdate(pAC, IoC, 0, pAC->GIni.GIMacsFound - 1) != in SkPnmiEvent()
1462 pAC->Pnmi.MacUpdatedFlag ++; in SkPnmiEvent()
1480 Value = GetPhysStatVal(pAC, IoC, PhysPortIndex, CounterIndex); in SkPnmiEvent()
1482 pAC->Pnmi.VirtualCounterOffset[CounterIndex] += Value; in SkPnmiEvent()
1488 pAC->Pnmi.Port[PhysPortIndex].ActiveFlag = SK_FALSE; in SkPnmiEvent()
1490 pAC->Pnmi.MacUpdatedFlag --; in SkPnmiEvent()
1500 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL, in SkPnmiEvent()
1505 if (NetIndex >= pAC->Rlmt.NumNets) { in SkPnmiEvent()
1507 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_CTRL, in SkPnmiEvent()
1524 if (pAC->Pnmi.Port[PhysPortIndex].ActiveFlag) { in SkPnmiEvent()
1532 pAC->Pnmi.RlmtChangeCts ++; in SkPnmiEvent()
1533 pAC->Pnmi.RlmtChangeTime = SK_PNMI_HUNDREDS_SEC(SkOsGetTime(pAC)); in SkPnmiEvent()
1539 QueueRlmtNewMacTrap(pAC, PhysPortIndex); in SkPnmiEvent()
1540 (void)SK_DRIVER_SENDEVENT(pAC, IoC); in SkPnmiEvent()
1547 if (MacUpdate(pAC, IoC, 0, pAC->GIni.GIMacsFound - 1) != in SkPnmiEvent()
1553 pAC->Pnmi.MacUpdatedFlag ++; in SkPnmiEvent()
1569 Value = GetPhysStatVal(pAC, IoC, PhysPortIndex, CounterIndex); in SkPnmiEvent()
1571 pAC->Pnmi.VirtualCounterOffset[CounterIndex] -= Value; in SkPnmiEvent()
1575 pAC->Pnmi.Port[PhysPortIndex].ActiveFlag = SK_TRUE; in SkPnmiEvent()
1577 pAC->Pnmi.MacUpdatedFlag --; in SkPnmiEvent()
1589 QueueSimpleTrap(pAC, OID_SKGE_TRAP_RLMT_SEGMENTATION); in SkPnmiEvent()
1590 (void)SK_DRIVER_SENDEVENT(pAC, IoC); in SkPnmiEvent()
1601 MaxNetNumber = pAC->GIni.GIMacsFound; in SkPnmiEvent()
1608 pAC->Pnmi.DualNetActiveFlag = SK_FALSE; in SkPnmiEvent()
1611 pAC->Pnmi.DualNetActiveFlag = SK_TRUE; in SkPnmiEvent()
1617 pPrt = &pAC->GIni.GP[PhysPortIndex]; in SkPnmiEvent()
1618 pVctBackupData = &pAC->Pnmi.VctBackup[PhysPortIndex]; in SkPnmiEvent()
1620 if (pAC->Pnmi.VctStatus[PhysPortIndex] & SK_PNMI_VCT_PENDING) { in SkPnmiEvent()
1621 RetCode = SkGmCableDiagStatus(pAC, IoC, PhysPortIndex, SK_FALSE); in SkPnmiEvent()
1630 SkTimerStart(pAC, IoC, in SkPnmiEvent()
1631 &pAC->Pnmi.VctTimeout[PhysPortIndex].VctTimer, in SkPnmiEvent()
1635 pAC->Pnmi.VctStatus[PhysPortIndex] &= ~SK_PNMI_VCT_PENDING; in SkPnmiEvent()
1636 pAC->Pnmi.VctStatus[PhysPortIndex] |= in SkPnmiEvent()
1661 SkEventQueue(pAC, SKGE_DRV, SK_DRV_PORT_RESET, Param); in SkPnmiEvent()
1662 SkEventDispatcher(pAC, IoC); in SkPnmiEvent()
1698 SK_AC *pAC, /* Pointer to adapter context */ in PnmiVar() argument
1718 if (NetIndex >= pAC->Rlmt.NumNets) { in PnmiVar()
1724 Ret = IdTable[TableIndex].Func(pAC, IoC, Action, Id, pBuf, pLen, in PnmiVar()
1751 SK_AC *pAC, /* Pointer to adapter context */ in PnmiStruct() argument
1783 if (NetIndex >= pAC->Rlmt.NumNets) { in PnmiStruct()
1793 if ((Ret = RlmtUpdate(pAC, IoC, NetIndex)) != SK_PNMI_ERR_OK) { in PnmiStruct()
1800 if ((Ret = SirqUpdate(pAC, IoC)) != SK_PNMI_ERR_OK) { in PnmiStruct()
1807 pAC->Pnmi.RlmtUpdatedFlag ++; in PnmiStruct()
1808 pAC->Pnmi.SirqUpdatedFlag ++; in PnmiStruct()
1841 Ret = IdTable[TableIndex].Func(pAC, IoC, in PnmiStruct()
1851 pAC->Pnmi.RlmtUpdatedFlag --; in PnmiStruct()
1852 pAC->Pnmi.SirqUpdatedFlag --; in PnmiStruct()
1879 Ret = IdTable[TableIndex].Func(pAC, IoC, Action, in PnmiStruct()
1885 pAC->Pnmi.RlmtUpdatedFlag --; in PnmiStruct()
1886 pAC->Pnmi.SirqUpdatedFlag --; in PnmiStruct()
1897 pAC->Pnmi.RlmtUpdatedFlag --; in PnmiStruct()
1898 pAC->Pnmi.SirqUpdatedFlag --; in PnmiStruct()
1953 SK_AC *pAC, /* Pointer to adapter context */ in OidStruct() argument
1965 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR003, in OidStruct()
1984 return (SkPnmiGetStruct(pAC, IoC, pBuf, pLen, NetIndex)); in OidStruct()
1987 return (SkPnmiPreSetStruct(pAC, IoC, pBuf, pLen, NetIndex)); in OidStruct()
1990 return (SkPnmiSetStruct(pAC, IoC, pBuf, pLen, NetIndex)); in OidStruct()
1993 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR004, SK_PNMI_ERR004MSG); in OidStruct()
2020 SK_AC *pAC, /* Pointer to adapter context */ in Perform() argument
2095 Ret = SK_DRIVER_RESET(pAC, IoC); in Perform()
2098 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR005, in Perform()
2111 Ret = SK_DRIVER_SELFTEST(pAC, IoC); in Perform()
2112 pAC->Pnmi.TestResult = Ret; in Perform()
2117 ResetCounter(pAC, IoC, NetIndex); in Perform()
2121 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR006, in Perform()
2151 SK_AC *pAC, /* Pointer to adapter context */ in Mac8023Stat() argument
2225 Ret = MacUpdate(pAC, IoC, 0, pAC->GIni.GIMacsFound - 1); in Mac8023Stat()
2231 pAC->Pnmi.MacUpdatedFlag ++; in Mac8023Stat()
2239 CopyMac(pBuf, &pAC->Addr.Net[NetIndex].PermanentMacAddress); in Mac8023Stat()
2244 CopyMac(pBuf, &pAC->Addr.Net[NetIndex].CurrentMacAddress); in Mac8023Stat()
2249 StatVal = GetStatVal(pAC, IoC, 0, IdTable[TableIndex].Param, NetIndex); in Mac8023Stat()
2264 pAC->Pnmi.MacUpdatedFlag --; in Mac8023Stat()
2287 SK_AC *pAC, /* Pointer to adapter context */ in MacPrivateStat() argument
2309 PhysPortMax = pAC->GIni.GIMacsFound; in MacPrivateStat()
2312 MacType = pAC->GIni.GIMacType; in MacPrivateStat()
2314 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) { /* Dual net mode */ in MacPrivateStat()
2353 Ret = MacUpdate(pAC, IoC, 0, pAC->GIni.GIMacsFound - 1); in MacPrivateStat()
2359 pAC->Pnmi.MacUpdatedFlag ++; in MacPrivateStat()
2378 GetStatVal(pAC, IoC, LogPortIndex, in MacPrivateStat()
2380 GetStatVal(pAC, IoC, LogPortIndex, in MacPrivateStat()
2382 GetStatVal(pAC, IoC, LogPortIndex, in MacPrivateStat()
2384 GetStatVal(pAC, IoC, LogPortIndex, in MacPrivateStat()
2388 StatVal = GetStatVal(pAC, IoC, LogPortIndex, in MacPrivateStat()
2396 GetStatVal(pAC, IoC, LogPortIndex, in MacPrivateStat()
2398 GetStatVal(pAC, IoC, LogPortIndex, in MacPrivateStat()
2400 GetStatVal(pAC, IoC, LogPortIndex, in MacPrivateStat()
2404 StatVal = GetStatVal(pAC, IoC, LogPortIndex, in MacPrivateStat()
2410 StatVal = GetStatVal(pAC, IoC, LogPortIndex, in MacPrivateStat()
2419 pAC->Pnmi.MacUpdatedFlag --; in MacPrivateStat()
2449 SK_AC *pAC, /* Pointer to adapter context */ in Addr() argument
2471 PhysPortMax = pAC->GIni.GIMacsFound; in Addr()
2474 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) { /* Dual net mode */ in Addr()
2515 CopyMac(pBuf + Offset, &pAC->Addr.Net[NetIndex].CurrentMacAddress); in Addr()
2518 PhysPortIndex = SK_PNMI_PORT_LOG2PHYS(pAC, LogPortIndex); in Addr()
2521 &pAC->Addr.Port[PhysPortIndex].CurrentMacAddress); in Addr()
2529 &pAC->Addr.Net[NetIndex].PermanentMacAddress); in Addr()
2533 pAC, LogPortIndex); in Addr()
2536 &pAC->Addr.Port[PhysPortIndex].PermanentMacAddress); in Addr()
2542 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR008, in Addr()
2568 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR009, in Addr()
2611 PhysPortIndex = SK_PNMI_PORT_LOG2PHYS(pAC, in Addr()
2614 Ret = SkAddrOverride(pAC, IoC, PhysPortIndex, in Addr()
2650 SK_AC *pAC, /* Pointer to adapter context */ in CsumStat() argument
2708 StatVal = pAC->Csum.ProtoStats[NetIndex][Index].RxOkCts; in CsumStat()
2712 StatVal = pAC->Csum.ProtoStats[NetIndex][Index].RxUnableCts; in CsumStat()
2716 StatVal = pAC->Csum.ProtoStats[NetIndex][Index].RxErrCts; in CsumStat()
2720 StatVal = pAC->Csum.ProtoStats[NetIndex][Index].TxOkCts; in CsumStat()
2724 StatVal = pAC->Csum.ProtoStats[NetIndex][Index].TxUnableCts; in CsumStat()
2728 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR010, in CsumStat()
2766 SK_AC *pAC, /* Pointer to adapter context */ in SensorStat() argument
2790 if ((Instance < 1) || (Instance > (SK_U32)pAC->I2c.MaxSens)) { in SensorStat()
2801 Limit = (unsigned int) pAC->I2c.MaxSens; in SensorStat()
2832 SK_STRLEN(pAC->I2c.SenTable[i].SenDesc) + 1; in SensorStat()
2835 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR011, in SensorStat()
2872 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR012, in SensorStat()
2893 Len = SK_STRLEN(pAC->I2c.SenTable[Index].SenDesc); in SensorStat()
2895 pAC->I2c.SenTable[Index].SenDesc, Len); in SensorStat()
2902 (char)pAC->I2c.SenTable[Index].SenType; in SensorStat()
2907 Val32 = (SK_U32)pAC->I2c.SenTable[Index].SenValue; in SensorStat()
2913 Val32 = (SK_U32)pAC->I2c.SenTable[Index]. in SensorStat()
2920 Val32 = (SK_U32)pAC->I2c.SenTable[Index]. in SensorStat()
2927 Val32 = (SK_U32)pAC->I2c.SenTable[Index]. in SensorStat()
2934 Val32 = pAC->I2c.SenTable[Index].SenThreErrHigh; in SensorStat()
2941 (char)pAC->I2c.SenTable[Index].SenErrFlag; in SensorStat()
2946 Val64 = pAC->I2c.SenTable[Index].SenWarnCts; in SensorStat()
2952 Val64 = pAC->I2c.SenTable[Index].SenErrCts; in SensorStat()
2958 Val64 = SK_PNMI_HUNDREDS_SEC(pAC->I2c.SenTable[Index]. in SensorStat()
2965 Val64 = SK_PNMI_HUNDREDS_SEC(pAC->I2c.SenTable[Index]. in SensorStat()
2972 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_ERR, in SensorStat()
3011 SK_AC *pAC, /* Pointer to adapter context */ in Vpd() argument
3038 Ret = GetVpdKeyArr(pAC, IoC, &KeyArr[0][0], sizeof(KeyArr), &KeyNo); in Vpd()
3097 pVpdStatus = VpdStat(pAC, IoC); in Vpd()
3100 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR017, in Vpd()
3108 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR018, in Vpd()
3199 if (VpdRead(pAC, IoC, KeyArr[Index], Buf, in Vpd()
3203 SK_ERR_LOG(pAC, SK_ERRCL_SW, in Vpd()
3225 if (VpdRead(pAC, IoC, KeyArr[Index], Buf, in Vpd()
3229 SK_ERR_LOG(pAC, SK_ERRCL_SW, in Vpd()
3278 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR023, in Vpd()
3300 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR024, in Vpd()
3363 Ret = VpdWrite(pAC, IoC, KeyStr, Buf); in Vpd()
3371 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR025, in Vpd()
3382 Ret = VpdUpdate(pAC, IoC); in Vpd()
3385 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR026, in Vpd()
3433 Ret = VpdDelete(pAC, IoC, KeyStr); in Vpd()
3436 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR027, in Vpd()
3447 Ret = VpdUpdate(pAC, IoC); in Vpd()
3450 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR028, in Vpd()
3485 SK_AC *pAC, /* Pointer to adapter context */ in General() argument
3528 MacType = pAC->GIni.GIMacType; in General()
3640 Ret = MacUpdate(pAC, IoC, 0, pAC->GIni.GIMacsFound - 1); in General()
3646 pAC->Pnmi.MacUpdatedFlag ++; in General()
3659 GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_MISSED, NetIndex) + in General()
3660 GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_FRAMING, NetIndex) + in General()
3661 GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_OVERFLOW, NetIndex) + in General()
3662 GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_JABBER, NetIndex) + in General()
3663 GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_CARRIER, NetIndex) + in General()
3664 GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_IRLENGTH, NetIndex) + in General()
3665 GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_SYMBOL, NetIndex) + in General()
3666 GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_SHORTS, NetIndex) + in General()
3667 GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_RUNT, NetIndex) + in General()
3668 GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_TOO_LONG, NetIndex) + in General()
3669 GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_FCS, NetIndex) + in General()
3670 GetStatVal(pAC, IoC, 0, SK_PNMI_HRX_CEXT, NetIndex); in General()
3677 GetStatVal(pAC, IoC, 0, SK_PNMI_HTX_EXCESS_COL, NetIndex) + in General()
3678 GetStatVal(pAC, IoC, 0, SK_PNMI_HTX_LATE_COL, NetIndex) + in General()
3679 GetStatVal(pAC, IoC, 0, SK_PNMI_HTX_UNDERRUN, NetIndex) + in General()
3680 GetStatVal(pAC, IoC, 0, SK_PNMI_HTX_CARRIER, NetIndex); in General()
3707 Val32 = (SK_U32)pAC->GIni.GILevel; in General()
3713 Val32 = (SK_U32)pAC->GIni.GIMacsFound; in General()
3719 Val32 = (SK_U32)pAC->Pnmi.DeviceType; in General()
3725 if (pAC->Pnmi.pDriverDescription == NULL) { in General()
3727 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR007, in General()
3734 Len = SK_STRLEN(pAC->Pnmi.pDriverDescription) + 1; in General()
3737 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR029, in General()
3750 SK_MEMCPY(pBuf + 1, pAC->Pnmi.pDriverDescription, Len - 1); in General()
3755 if (pAC->Pnmi.pDriverVersion == NULL) { in General()
3757 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR030, in General()
3764 Len = SK_STRLEN(pAC->Pnmi.pDriverVersion) + 1; in General()
3767 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR031, in General()
3780 SK_MEMCPY(pBuf + 1, pAC->Pnmi.pDriverVersion, Len - 1); in General()
3785 if (pAC->Pnmi.pDriverReleaseDate == NULL) { in General()
3787 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR030, in General()
3794 Len = SK_STRLEN(pAC->Pnmi.pDriverReleaseDate) + 1; in General()
3797 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR031, in General()
3810 SK_MEMCPY(pBuf + 1, pAC->Pnmi.pDriverReleaseDate, Len - 1); in General()
3815 if (pAC->Pnmi.pDriverFileName == NULL) { in General()
3817 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR030, in General()
3824 Len = SK_STRLEN(pAC->Pnmi.pDriverFileName) + 1; in General()
3827 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR031, in General()
3840 SK_MEMCPY(pBuf + 1, pAC->Pnmi.pDriverFileName, Len - 1); in General()
3852 if (VpdRead(pAC, IoC, VPD_NAME, Buf, (int *)&Len) > 0) { in General()
3854 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR032, in General()
3863 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR033, in General()
3886 Val8 = (SK_U8)pAC->GIni.GIPciHwRev; in General()
3896 Val16 = pAC->Pnmi.Chipset; in General()
3902 Val32 = pAC->GIni.GIChipId; in General()
3908 Val32 = pAC->GIni.GIRamSize; in General()
3914 *pBuf = (char) pAC->GIni.GIVauxAvail; in General()
3924 *pBuf = pAC->Pnmi.PciBusSpeed; in General()
3929 *pBuf = pAC->Pnmi.PciBusWidth; in General()
3934 Val32 = pAC->Pnmi.TestResult; in General()
3940 *pBuf = (char)pAC->I2c.MaxSens; in General()
3950 GetTrapQueueLen(pAC, &Len, &Val); in General()
3957 GetTrapQueueLen(pAC, &Len, &Val); in General()
3963 CopyTrapQueue(pAC, pBuf); in General()
3978 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) { in General()
3979 Val64 = pAC->Pnmi.BufPort[NetIndex].TxSwQueueLen; in General()
3983 Val64 = pAC->Pnmi.BufPort[0].TxSwQueueLen + in General()
3984 pAC->Pnmi.BufPort[1].TxSwQueueLen; in General()
3989 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) { in General()
3990 Val64 = pAC->Pnmi.Port[NetIndex].TxSwQueueLen; in General()
3994 Val64 = pAC->Pnmi.Port[0].TxSwQueueLen + in General()
3995 pAC->Pnmi.Port[1].TxSwQueueLen; in General()
4007 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) { in General()
4008 Val64 = pAC->Pnmi.BufPort[NetIndex].TxSwQueueMax; in General()
4012 Val64 = pAC->Pnmi.BufPort[0].TxSwQueueMax + in General()
4013 pAC->Pnmi.BufPort[1].TxSwQueueMax; in General()
4018 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) { in General()
4019 Val64 = pAC->Pnmi.Port[NetIndex].TxSwQueueMax; in General()
4023 Val64 = pAC->Pnmi.Port[0].TxSwQueueMax + in General()
4024 pAC->Pnmi.Port[1].TxSwQueueMax; in General()
4035 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) { in General()
4036 Val64 = pAC->Pnmi.BufPort[NetIndex].TxRetryCts; in General()
4040 Val64 = pAC->Pnmi.BufPort[0].TxRetryCts + in General()
4041 pAC->Pnmi.BufPort[1].TxRetryCts; in General()
4046 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) { in General()
4047 Val64 = pAC->Pnmi.Port[NetIndex].TxRetryCts; in General()
4051 Val64 = pAC->Pnmi.Port[0].TxRetryCts + in General()
4052 pAC->Pnmi.Port[1].TxRetryCts; in General()
4063 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) { in General()
4064 Val64 = pAC->Pnmi.BufPort[NetIndex].RxIntrCts; in General()
4068 Val64 = pAC->Pnmi.BufPort[0].RxIntrCts + in General()
4069 pAC->Pnmi.BufPort[1].RxIntrCts; in General()
4074 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) { in General()
4075 Val64 = pAC->Pnmi.Port[NetIndex].RxIntrCts; in General()
4079 Val64 = pAC->Pnmi.Port[0].RxIntrCts + in General()
4080 pAC->Pnmi.Port[1].RxIntrCts; in General()
4091 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) { in General()
4092 Val64 = pAC->Pnmi.BufPort[NetIndex].TxIntrCts; in General()
4096 Val64 = pAC->Pnmi.BufPort[0].TxIntrCts + in General()
4097 pAC->Pnmi.BufPort[1].TxIntrCts; in General()
4102 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) { in General()
4103 Val64 = pAC->Pnmi.Port[NetIndex].TxIntrCts; in General()
4107 Val64 = pAC->Pnmi.Port[0].TxIntrCts + in General()
4108 pAC->Pnmi.Port[1].TxIntrCts; in General()
4119 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) { in General()
4120 Val64 = pAC->Pnmi.BufPort[NetIndex].RxNoBufCts; in General()
4124 Val64 = pAC->Pnmi.BufPort[0].RxNoBufCts + in General()
4125 pAC->Pnmi.BufPort[1].RxNoBufCts; in General()
4130 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) { in General()
4131 Val64 = pAC->Pnmi.Port[NetIndex].RxNoBufCts; in General()
4135 Val64 = pAC->Pnmi.Port[0].RxNoBufCts + in General()
4136 pAC->Pnmi.Port[1].RxNoBufCts; in General()
4147 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) { in General()
4148 Val64 = pAC->Pnmi.BufPort[NetIndex].TxNoBufCts; in General()
4152 Val64 = pAC->Pnmi.BufPort[0].TxNoBufCts + in General()
4153 pAC->Pnmi.BufPort[1].TxNoBufCts; in General()
4158 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) { in General()
4159 Val64 = pAC->Pnmi.Port[NetIndex].TxNoBufCts; in General()
4163 Val64 = pAC->Pnmi.Port[0].TxNoBufCts + in General()
4164 pAC->Pnmi.Port[1].TxNoBufCts; in General()
4175 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) { in General()
4176 Val64 = pAC->Pnmi.BufPort[NetIndex].TxUsedDescrNo; in General()
4180 Val64 = pAC->Pnmi.BufPort[0].TxUsedDescrNo + in General()
4181 pAC->Pnmi.BufPort[1].TxUsedDescrNo; in General()
4186 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) { in General()
4187 Val64 = pAC->Pnmi.Port[NetIndex].TxUsedDescrNo; in General()
4191 Val64 = pAC->Pnmi.Port[0].TxUsedDescrNo + in General()
4192 pAC->Pnmi.Port[1].TxUsedDescrNo; in General()
4203 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) { in General()
4204 Val64 = pAC->Pnmi.BufPort[NetIndex].RxDeliveredCts; in General()
4208 Val64 = pAC->Pnmi.BufPort[0].RxDeliveredCts + in General()
4209 pAC->Pnmi.BufPort[1].RxDeliveredCts; in General()
4214 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) { in General()
4215 Val64 = pAC->Pnmi.Port[NetIndex].RxDeliveredCts; in General()
4219 Val64 = pAC->Pnmi.Port[0].RxDeliveredCts + in General()
4220 pAC->Pnmi.Port[1].RxDeliveredCts; in General()
4231 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) { in General()
4232 Val64 = pAC->Pnmi.BufPort[NetIndex].RxOctetsDeliveredCts; in General()
4236 Val64 = pAC->Pnmi.BufPort[0].RxOctetsDeliveredCts + in General()
4237 pAC->Pnmi.BufPort[1].RxOctetsDeliveredCts; in General()
4242 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) { in General()
4243 Val64 = pAC->Pnmi.Port[NetIndex].RxOctetsDeliveredCts; in General()
4247 Val64 = pAC->Pnmi.Port[0].RxOctetsDeliveredCts + in General()
4248 pAC->Pnmi.Port[1].RxOctetsDeliveredCts; in General()
4269 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) { in General()
4270 Val64 = Val64RxHwErrs + pAC->Pnmi.BufPort[NetIndex].RxNoBufCts; in General()
4275 pAC->Pnmi.BufPort[0].RxNoBufCts + in General()
4276 pAC->Pnmi.BufPort[1].RxNoBufCts; in General()
4281 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) { in General()
4282 Val64 = Val64RxHwErrs + pAC->Pnmi.Port[NetIndex].RxNoBufCts; in General()
4287 pAC->Pnmi.Port[0].RxNoBufCts + in General()
4288 pAC->Pnmi.Port[1].RxNoBufCts; in General()
4299 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) { in General()
4300 Val64 = Val64TxHwErrs + pAC->Pnmi.BufPort[NetIndex].TxNoBufCts; in General()
4305 pAC->Pnmi.BufPort[0].TxNoBufCts + in General()
4306 pAC->Pnmi.BufPort[1].TxNoBufCts; in General()
4311 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) { in General()
4312 Val64 = Val64TxHwErrs + pAC->Pnmi.Port[NetIndex].TxNoBufCts; in General()
4317 pAC->Pnmi.Port[0].TxNoBufCts + in General()
4318 pAC->Pnmi.Port[1].TxNoBufCts; in General()
4329 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) { in General()
4330 Val64 = pAC->Pnmi.BufPort[NetIndex].ErrRecoveryCts; in General()
4334 Val64 = pAC->Pnmi.BufPort[0].ErrRecoveryCts + in General()
4335 pAC->Pnmi.BufPort[1].ErrRecoveryCts; in General()
4340 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) { in General()
4341 Val64 = pAC->Pnmi.Port[NetIndex].ErrRecoveryCts; in General()
4345 Val64 = pAC->Pnmi.Port[0].ErrRecoveryCts + in General()
4346 pAC->Pnmi.Port[1].ErrRecoveryCts; in General()
4354 Val64 = SK_PNMI_HUNDREDS_SEC(SkOsGetTime(pAC)); in General()
4355 Val64 -= pAC->Pnmi.StartUpTime; in General()
4369 Val64 = Val64RxHwErrs + pAC->Pnmi.BufPort[NetIndex].RxNoBufCts; in General()
4372 Val64 = Val64RxHwErrs + pAC->Pnmi.Port[NetIndex].RxNoBufCts; in General()
4392 Val64 = Val64TxHwErrs + pAC->Pnmi.BufPort[NetIndex].TxNoBufCts; in General()
4395 Val64 = Val64TxHwErrs + pAC->Pnmi.Port[NetIndex].TxNoBufCts; in General()
4415 Val64 = pAC->Pnmi.BufPort[NetIndex].RxNoBufCts; in General()
4418 Val64 = pAC->Pnmi.Port[NetIndex].RxNoBufCts; in General()
4436 Val32 = (SK_U32)pAC->Pnmi.Port[NetIndex].TxSwQueueLen; in General()
4442 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR034, in General()
4456 pAC->Pnmi.MacUpdatedFlag --; in General()
4483 SK_AC *pAC, /* Pointer to adapter context */ in Rlmt() argument
4551 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR035, in Rlmt()
4564 if ((Ret = RlmtUpdate(pAC, IoC, NetIndex)) != SK_PNMI_ERR_OK) { in Rlmt()
4569 pAC->Pnmi.RlmtUpdatedFlag ++; in Rlmt()
4577 *pBuf = (char)pAC->Rlmt.Net[0].RlmtMode; in Rlmt()
4582 Val32 = (SK_U32)pAC->GIni.GIMacsFound; in Rlmt()
4596 PhysPortMax = pAC->GIni.GIMacsFound; in Rlmt()
4601 if (pAC->Pnmi.Port[PhysPortIndex].ActiveFlag) { in Rlmt()
4611 *pBuf = (char)SK_PNMI_PORT_PHYS2LOG(pAC->Rlmt.Net[NetIndex].Preference); in Rlmt()
4616 Val64 = pAC->Pnmi.RlmtChangeCts; in Rlmt()
4622 Val64 = pAC->Pnmi.RlmtChangeTime; in Rlmt()
4628 Val64 = pAC->Pnmi.RlmtChangeEstimate.Estimate; in Rlmt()
4634 Val64 = pAC->Pnmi.RlmtChangeThreshold; in Rlmt()
4640 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_ERR, in Rlmt()
4643 pAC->Pnmi.RlmtUpdatedFlag --; in Rlmt()
4648 pAC->Pnmi.RlmtUpdatedFlag --; in Rlmt()
4679 if (SkRlmtEvent(pAC, IoC, SK_RLMT_MODE_CHANGE, in Rlmt()
4682 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR037, in Rlmt()
4699 (SK_U8)pAC->GIni.GIMacsFound) { in Rlmt()
4719 if (SkRlmtEvent(pAC, IoC, SK_RLMT_PREFPORT_CHANGE, in Rlmt()
4722 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR038, in Rlmt()
4757 pAC->Pnmi.RlmtChangeThreshold = Val64; in Rlmt()
4788 SK_AC *pAC, /* Pointer to adapter context */ in RlmtStat() argument
4809 PhysPortMax = pAC->GIni.GIMacsFound; in RlmtStat()
4823 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) { in RlmtStat()
4836 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) { in RlmtStat()
4877 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR039, in RlmtStat()
4889 if ((Ret = RlmtUpdate(pAC, IoC, NetIndex)) != SK_PNMI_ERR_OK) { in RlmtStat()
4894 pAC->Pnmi.RlmtUpdatedFlag ++; in RlmtStat()
4911 if (pAC->Rlmt.Port[PhysPortIndex].PortState == in RlmtStat()
4913 pAC->Rlmt.Port[PhysPortIndex].PortState == in RlmtStat()
4918 else if (pAC->Pnmi.Port[PhysPortIndex].ActiveFlag) { in RlmtStat()
4930 Val64 = pAC->Rlmt.Port[PhysPortIndex].TxHelloCts; in RlmtStat()
4936 Val64 = pAC->Rlmt.Port[PhysPortIndex].RxHelloCts; in RlmtStat()
4942 Val64 = pAC->Rlmt.Port[PhysPortIndex].TxSpHelloReqCts; in RlmtStat()
4948 Val64 = pAC->Rlmt.Port[PhysPortIndex].RxSpHelloCts; in RlmtStat()
4954 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_ERR, in RlmtStat()
4957 pAC->Pnmi.RlmtUpdatedFlag --; in RlmtStat()
4964 pAC->Pnmi.RlmtUpdatedFlag --; in RlmtStat()
4990 SK_AC *pAC, /* Pointer to adapter context */ in MacPrivateConf() argument
5015 PhysPortMax = pAC->GIni.GIMacsFound; in MacPrivateConf()
5018 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) { /* Dual net mode */ in MacPrivateConf()
5082 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR041, in MacPrivateConf()
5092 if ((Ret = SirqUpdate(pAC, IoC)) != SK_PNMI_ERR_OK) { in MacPrivateConf()
5097 pAC->Pnmi.SirqUpdatedFlag ++; in MacPrivateConf()
5110 *pBufPtr = pAC->Pnmi.PMD; in MacPrivateConf()
5115 *pBufPtr = pAC->Pnmi.Connector; in MacPrivateConf()
5120 if (!pAC->Pnmi.DualNetActiveFlag) { /* SingleNetMode */ in MacPrivateConf()
5127 pAC, LogPortIndex); in MacPrivateConf()
5128 Val32 = pAC->GIni.GP[PhysPortIndex].PhyType; in MacPrivateConf()
5134 Val32 = pAC->GIni.GP[NetIndex].PhyType; in MacPrivateConf()
5142 if (!pAC->Pnmi.DualNetActiveFlag) { /* SingleNetMode */ in MacPrivateConf()
5148 PhysPortIndex = SK_PNMI_PORT_LOG2PHYS(pAC, LogPortIndex); in MacPrivateConf()
5149 Val8 = (SK_U8) pAC->GIni.GP[PhysPortIndex].PPhyPowerState; in MacPrivateConf()
5155 Val8 = (SK_U8) pAC->GIni.GP[PhysPortIndex].PPhyPowerState; in MacPrivateConf()
5163 if (!pAC->Pnmi.DualNetActiveFlag) { /* SingleNetMode */ in MacPrivateConf()
5166 VirtualConf(pAC, IoC, Id, pBufPtr); in MacPrivateConf()
5171 pAC, LogPortIndex); in MacPrivateConf()
5173 *pBufPtr = pAC->GIni.GP[PhysPortIndex].PLinkCap; in MacPrivateConf()
5178 *pBufPtr = pAC->GIni.GP[NetIndex].PLinkCap; in MacPrivateConf()
5184 if (!pAC->Pnmi.DualNetActiveFlag) { /* SingleNetMode */ in MacPrivateConf()
5187 VirtualConf(pAC, IoC, Id, pBufPtr); in MacPrivateConf()
5192 pAC, LogPortIndex); in MacPrivateConf()
5194 *pBufPtr = pAC->GIni.GP[PhysPortIndex].PLinkModeConf; in MacPrivateConf()
5199 *pBufPtr = pAC->GIni.GP[NetIndex].PLinkModeConf; in MacPrivateConf()
5205 if (!pAC->Pnmi.DualNetActiveFlag) { /* SingleNetMode */ in MacPrivateConf()
5208 VirtualConf(pAC, IoC, Id, pBufPtr); in MacPrivateConf()
5213 pAC, LogPortIndex); in MacPrivateConf()
5216 CalculateLinkModeStatus(pAC, IoC, PhysPortIndex); in MacPrivateConf()
5221 *pBufPtr = CalculateLinkModeStatus(pAC, IoC, NetIndex); in MacPrivateConf()
5227 if (!pAC->Pnmi.DualNetActiveFlag) { /* SingleNetMode */ in MacPrivateConf()
5230 VirtualConf(pAC, IoC, Id, pBufPtr); in MacPrivateConf()
5235 pAC, LogPortIndex); in MacPrivateConf()
5237 *pBufPtr = CalculateLinkStatus(pAC, IoC, PhysPortIndex); in MacPrivateConf()
5242 *pBufPtr = CalculateLinkStatus(pAC, IoC, NetIndex); in MacPrivateConf()
5248 if (!pAC->Pnmi.DualNetActiveFlag) { /* SingleNetMode */ in MacPrivateConf()
5251 VirtualConf(pAC, IoC, Id, pBufPtr); in MacPrivateConf()
5256 pAC, LogPortIndex); in MacPrivateConf()
5258 *pBufPtr = pAC->GIni.GP[PhysPortIndex].PFlowCtrlCap; in MacPrivateConf()
5263 *pBufPtr = pAC->GIni.GP[NetIndex].PFlowCtrlCap; in MacPrivateConf()
5269 if (!pAC->Pnmi.DualNetActiveFlag) { /* SingleNetMode */ in MacPrivateConf()
5272 VirtualConf(pAC, IoC, Id, pBufPtr); in MacPrivateConf()
5277 pAC, LogPortIndex); in MacPrivateConf()
5279 *pBufPtr = pAC->GIni.GP[PhysPortIndex].PFlowCtrlMode; in MacPrivateConf()
5284 *pBufPtr = pAC->GIni.GP[NetIndex].PFlowCtrlMode; in MacPrivateConf()
5290 if (!pAC->Pnmi.DualNetActiveFlag) { /* SingleNetMode */ in MacPrivateConf()
5293 VirtualConf(pAC, IoC, Id, pBufPtr); in MacPrivateConf()
5298 pAC, LogPortIndex); in MacPrivateConf()
5300 *pBufPtr = pAC->GIni.GP[PhysPortIndex].PFlowCtrlStatus; in MacPrivateConf()
5305 *pBufPtr = pAC->GIni.GP[NetIndex].PFlowCtrlStatus; in MacPrivateConf()
5311 if (!pAC->Pnmi.DualNetActiveFlag) { /* SingleNetMode */ in MacPrivateConf()
5314 VirtualConf(pAC, IoC, Id, pBufPtr); in MacPrivateConf()
5319 pAC, LogPortIndex); in MacPrivateConf()
5321 *pBufPtr = pAC->GIni.GP[PhysPortIndex].PMSCap; in MacPrivateConf()
5326 *pBufPtr = pAC->GIni.GP[NetIndex].PMSCap; in MacPrivateConf()
5332 if (!pAC->Pnmi.DualNetActiveFlag) { /* SingleNetMode */ in MacPrivateConf()
5335 VirtualConf(pAC, IoC, Id, pBufPtr); in MacPrivateConf()
5340 pAC, LogPortIndex); in MacPrivateConf()
5342 *pBufPtr = pAC->GIni.GP[PhysPortIndex].PMSMode; in MacPrivateConf()
5347 *pBufPtr = pAC->GIni.GP[NetIndex].PMSMode; in MacPrivateConf()
5353 if (!pAC->Pnmi.DualNetActiveFlag) { /* SingleNetMode */ in MacPrivateConf()
5356 VirtualConf(pAC, IoC, Id, pBufPtr); in MacPrivateConf()
5361 pAC, LogPortIndex); in MacPrivateConf()
5363 *pBufPtr = pAC->GIni.GP[PhysPortIndex].PMSStatus; in MacPrivateConf()
5368 *pBufPtr = pAC->GIni.GP[NetIndex].PMSStatus; in MacPrivateConf()
5374 if (!pAC->Pnmi.DualNetActiveFlag) { /* SingleNetMode */ in MacPrivateConf()
5377 VirtualConf(pAC, IoC, Id, pBufPtr); in MacPrivateConf()
5382 pAC, LogPortIndex); in MacPrivateConf()
5384 *pBufPtr = pAC->GIni.GP[PhysPortIndex].PLinkSpeedCap; in MacPrivateConf()
5389 *pBufPtr = pAC->GIni.GP[NetIndex].PLinkSpeedCap; in MacPrivateConf()
5395 if (!pAC->Pnmi.DualNetActiveFlag) { /* SingleNetMode */ in MacPrivateConf()
5398 VirtualConf(pAC, IoC, Id, pBufPtr); in MacPrivateConf()
5403 pAC, LogPortIndex); in MacPrivateConf()
5405 *pBufPtr = pAC->GIni.GP[PhysPortIndex].PLinkSpeed; in MacPrivateConf()
5410 *pBufPtr = pAC->GIni.GP[NetIndex].PLinkSpeed; in MacPrivateConf()
5416 if (!pAC->Pnmi.DualNetActiveFlag) { /* SingleNetMode */ in MacPrivateConf()
5419 VirtualConf(pAC, IoC, Id, pBufPtr); in MacPrivateConf()
5424 pAC, LogPortIndex); in MacPrivateConf()
5426 *pBufPtr = pAC->GIni.GP[PhysPortIndex].PLinkSpeedUsed; in MacPrivateConf()
5431 *pBufPtr = pAC->GIni.GP[NetIndex].PLinkSpeedUsed; in MacPrivateConf()
5437 Val32 = SK_DRIVER_GET_MTU(pAC, IoC, NetIndex); in MacPrivateConf()
5443 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_ERR, in MacPrivateConf()
5446 pAC->Pnmi.SirqUpdatedFlag --; in MacPrivateConf()
5451 pAC->Pnmi.SirqUpdatedFlag --; in MacPrivateConf()
5547 if (!pAC->Pnmi.Port[PhysPortIndex]. in MacPrivateConf()
5555 if (SkGeSirqEvent(pAC, IoC, in MacPrivateConf()
5559 SK_ERR_LOG(pAC, SK_ERRCL_SW, in MacPrivateConf()
5574 pAC, LogPortIndex); in MacPrivateConf()
5576 if (SkGeSirqEvent(pAC, IoC, SK_HWEV_SET_LMODE, in MacPrivateConf()
5579 SK_ERR_LOG(pAC, SK_ERRCL_SW, in MacPrivateConf()
5623 if (!pAC->Pnmi.Port[PhysPortIndex]. in MacPrivateConf()
5631 if (SkGeSirqEvent(pAC, IoC, in MacPrivateConf()
5635 SK_ERR_LOG(pAC, SK_ERRCL_SW, in MacPrivateConf()
5650 pAC, LogPortIndex); in MacPrivateConf()
5652 if (SkGeSirqEvent(pAC, IoC, in MacPrivateConf()
5656 SK_ERR_LOG(pAC, SK_ERRCL_SW, in MacPrivateConf()
5700 if (!pAC->Pnmi.Port[PhysPortIndex]. in MacPrivateConf()
5708 if (SkGeSirqEvent(pAC, IoC, in MacPrivateConf()
5712 SK_ERR_LOG(pAC, SK_ERRCL_SW, in MacPrivateConf()
5727 pAC, LogPortIndex); in MacPrivateConf()
5729 if (SkGeSirqEvent(pAC, IoC, in MacPrivateConf()
5732 SK_ERR_LOG(pAC, SK_ERRCL_SW, in MacPrivateConf()
5777 if (!pAC->Pnmi.Port[PhysPortIndex].ActiveFlag) { in MacPrivateConf()
5784 if (SkGeSirqEvent(pAC, IoC, in MacPrivateConf()
5788 SK_ERR_LOG(pAC, SK_ERRCL_SW, in MacPrivateConf()
5803 pAC, LogPortIndex); in MacPrivateConf()
5805 if (SkGeSirqEvent(pAC, IoC, in MacPrivateConf()
5809 SK_ERR_LOG(pAC, SK_ERRCL_SW, in MacPrivateConf()
5828 if (SK_DRIVER_PRESET_MTU(pAC, IoC, NetIndex, Val32) != 0) { in MacPrivateConf()
5838 if (SK_DRIVER_SET_MTU(pAC, IoC, NetIndex, Val32) != 0) { in MacPrivateConf()
5853 if (!pAC->Pnmi.DualNetActiveFlag) { /* SingleNetMode */ in MacPrivateConf()
5860 PhysPortIndex = SK_PNMI_PORT_LOG2PHYS(pAC, LogPortIndex); in MacPrivateConf()
5865 if (pAC->GIni.GP[PhysPortIndex].PPhyPowerState) { in MacPrivateConf()
5867 Val32 = SkGmLeaveLowPowerMode(pAC, IoC, PhysPortIndex); in MacPrivateConf()
5869 if (pAC->GIni.GP[PhysPortIndex].PPhyPowerState < 3) { in MacPrivateConf()
5871 SkDrvInitAdapter(pAC); in MacPrivateConf()
5884 if (!pAC->GIni.GP[PhysPortIndex].PPhyPowerState) { in MacPrivateConf()
5888 SkDrvDeInitAdapter(pAC); in MacPrivateConf()
5891 Val32 = SkGmEnterLowPowerMode(pAC, IoC, PhysPortIndex, *pBuf); in MacPrivateConf()
5909 if (pAC->GIni.GP[PhysPortIndex].PPhyPowerState) { in MacPrivateConf()
5911 Val32 = SkGmLeaveLowPowerMode(pAC, IoC, PhysPortIndex); in MacPrivateConf()
5913 if (pAC->GIni.GP[PhysPortIndex].PPhyPowerState < 3) { in MacPrivateConf()
5915 SkDrvInitAdapter(pAC); in MacPrivateConf()
5929 if (!pAC->GIni.GP[PhysPortIndex].PPhyPowerState) { in MacPrivateConf()
5933 SkDrvDeInitAdapter(pAC); in MacPrivateConf()
5937 Val32 = SkGmEnterLowPowerMode(pAC, IoC, PhysPortIndex, *pBuf); in MacPrivateConf()
5956 SK_DBG_MSG(pAC, SK_DBGMOD_PNMI, SK_DBGCAT_ERR, in MacPrivateConf()
5989 SK_AC *pAC, /* Pointer to adapter context */ in Monitor() argument
6044 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR046, in Monitor()
6104 SK_AC *pAC, /* Pointer to adapter context */ in VirtualConf() argument
6118 PhysPortMax = pAC->GIni.GIMacsFound; in VirtualConf()
6123 pPrt = &pAC->GIni.GP[PhysPortIndex]; in VirtualConf()
6126 if (!pAC->Pnmi.Port[PhysPortIndex].ActiveFlag) { in VirtualConf()
6175 Val8 = CalculateLinkModeStatus(pAC, IoC, PhysPortIndex); in VirtualConf()
6198 Val8 = CalculateLinkStatus(pAC, IoC, PhysPortIndex); in VirtualConf()
6442 SK_AC *pAC, /* Pointer to adapter context */ in CalculateLinkStatus() argument
6448 if (!pAC->GIni.GP[PhysPortIndex].PHWLinkUp) { in CalculateLinkStatus()
6452 else if (pAC->GIni.GP[PhysPortIndex].PAutoNegFail > 0) { in CalculateLinkStatus()
6456 else if (!pAC->Rlmt.Port[PhysPortIndex].PortDown) { in CalculateLinkStatus()
6481 SK_AC *pAC, /* Pointer to adapter context */ in CalculateLinkModeStatus() argument
6488 Result = pAC->GIni.GP[PhysPortIndex].PLinkModeStatus; in CalculateLinkModeStatus()
6495 else if (pAC->GIni.GP[PhysPortIndex].PLinkMode >= SK_LMODE_AUTOHALF) { in CalculateLinkModeStatus()
6528 SK_AC *pAC, /* Pointer to adapter context */ in GetVpdKeyArr() argument
6547 Ret = VpdKeys(pAC, IoC, (char *)&BufKeys, (int *)&BufKeysLen, in GetVpdKeyArr()
6551 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR014, in GetVpdKeyArr()
6568 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR015, in GetVpdKeyArr()
6588 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR016, in GetVpdKeyArr()
6624 SK_AC *pAC, /* Pointer to adapter context */ in SirqUpdate() argument
6631 if (pAC->Pnmi.SirqUpdatedFlag > 0) { in SirqUpdate()
6638 if (SkGeSirqEvent(pAC, IoC, SK_HWEV_UPDATE_STAT, EventParam) > 0) { in SirqUpdate()
6640 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR047, in SirqUpdate()
6663 SK_AC *pAC, /* Pointer to adapter context */ in RlmtUpdate() argument
6671 if (pAC->Pnmi.RlmtUpdatedFlag > 0) { in RlmtUpdate()
6680 if (SkRlmtEvent(pAC, IoC, SK_RLMT_STATS_UPDATE, EventParam) > 0) { in RlmtUpdate()
6682 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR048, in RlmtUpdate()
6705 SK_AC *pAC, /* Pointer to adapter context */ in MacUpdate() argument
6716 if (pAC->Pnmi.MacUpdatedFlag > 0) { in MacUpdate()
6730 if (pAC->GIni.GIMacType == SK_MAC_XMAC) { in MacUpdate()
6731 pAC->Pnmi.BufPort[MacIndex] = pAC->Pnmi.Port[MacIndex]; in MacUpdate()
6735 if (pAC->GIni.GIFunc.pFnMacUpdateStats(pAC, IoC, MacIndex) != 0) { in MacUpdate()
6761 SK_AC *pAC, /* Pointer to adapter context */ in GetStatVal() argument
6772 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) { /* Dual net mode */ in GetStatVal()
6776 Val = GetPhysStatVal(pAC, IoC, PhysPortIndex, StatIndex); in GetStatVal()
6782 PhysPortMax = pAC->GIni.GIMacsFound; in GetStatVal()
6788 if (pAC->Pnmi.Port[PhysPortIndex].ActiveFlag) { in GetStatVal()
6790 Val += GetPhysStatVal(pAC, IoC, PhysPortIndex, StatIndex); in GetStatVal()
6795 Val += pAC->Pnmi.VirtualCounterOffset[StatIndex]; in GetStatVal()
6799 PhysPortIndex = SK_PNMI_PORT_LOG2PHYS(pAC, LogPortIndex); in GetStatVal()
6801 Val = GetPhysStatVal(pAC, IoC, PhysPortIndex, StatIndex); in GetStatVal()
6824 SK_AC *pAC, /* Pointer to adapter context */ in GetPhysStatVal() argument
6840 pPrt = &pAC->GIni.GP[PhysPortIndex]; in GetPhysStatVal()
6842 MacType = pAC->GIni.GIMacType; in GetPhysStatVal()
6846 pPnmiPrt = &pAC->Pnmi.BufPort[PhysPortIndex]; in GetPhysStatVal()
6849 pPnmiPrt = &pAC->Pnmi.Port[PhysPortIndex]; in GetPhysStatVal()
6852 pFnMac = &pAC->GIni.GIFunc; in GetPhysStatVal()
6857 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex, in GetPhysStatVal()
6860 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex, in GetPhysStatVal()
6864 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex, in GetPhysStatVal()
6870 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex, in GetPhysStatVal()
6879 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex, in GetPhysStatVal()
6882 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex, in GetPhysStatVal()
6886 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex, in GetPhysStatVal()
6892 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex, in GetPhysStatVal()
6901 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex, in GetPhysStatVal()
6904 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex, in GetPhysStatVal()
6917 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex, in GetPhysStatVal()
6932 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex, in GetPhysStatVal()
6946 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex, in GetPhysStatVal()
6972 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex, in GetPhysStatVal()
6985 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex, in GetPhysStatVal()
6988 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex, in GetPhysStatVal()
7004 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex, in GetPhysStatVal()
7011 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex, in GetPhysStatVal()
7051 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex, in GetPhysStatVal()
7078 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex, in GetPhysStatVal()
7090 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex, in GetPhysStatVal()
7116 SkXmPhyRead(pAC, IoC, PhysPortIndex, PHY_BCOM_RE_CTR, &Word); in GetPhysStatVal()
7123 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex, in GetPhysStatVal()
7131 (void)pFnMac->pFnMacStatistic(pAC, IoC, PhysPortIndex, in GetPhysStatVal()
7158 SK_AC *pAC, /* Pointer to adapter context */ in ResetCounter() argument
7169 SkEventQueue(pAC, SKGE_I2C, SK_I2CEV_CLEAR, EventParam); in ResetCounter()
7174 SkEventQueue(pAC, SKGE_RLMT, SK_RLMT_STATS_CLEAR, EventParam); in ResetCounter()
7178 SkEventQueue(pAC, SKGE_HWAC, SK_HWEV_CLEAR_STAT, EventParam); in ResetCounter()
7184 SkEventQueue(pAC, SKGE_CSUM, SK_CSUM_EVENT_CLEAR_PROTO_STATS, in ResetCounter()
7190 (unsigned int)pAC->GIni.GIMacsFound; PhysPortIndex ++) { in ResetCounter()
7192 (void)pAC->GIni.GIFunc.pFnMacResetCounter(pAC, IoC, PhysPortIndex); in ResetCounter()
7194 SK_MEMSET((char *)&pAC->Pnmi.Port[PhysPortIndex].CounterHigh, in ResetCounter()
7195 0, sizeof(pAC->Pnmi.Port[PhysPortIndex].CounterHigh)); in ResetCounter()
7196 SK_MEMSET((char *)&pAC->Pnmi.Port[PhysPortIndex]. in ResetCounter()
7197 CounterOffset, 0, sizeof(pAC->Pnmi.Port[ in ResetCounter()
7199 SK_MEMSET((char *)&pAC->Pnmi.Port[PhysPortIndex].StatSyncCts, in ResetCounter()
7200 0, sizeof(pAC->Pnmi.Port[PhysPortIndex].StatSyncCts)); in ResetCounter()
7201 SK_MEMSET((char *)&pAC->Pnmi.Port[PhysPortIndex]. in ResetCounter()
7202 StatSyncOctetsCts, 0, sizeof(pAC->Pnmi.Port[ in ResetCounter()
7204 SK_MEMSET((char *)&pAC->Pnmi.Port[PhysPortIndex]. in ResetCounter()
7205 StatRxLongFrameCts, 0, sizeof(pAC->Pnmi.Port[ in ResetCounter()
7207 SK_MEMSET((char *)&pAC->Pnmi.Port[PhysPortIndex]. in ResetCounter()
7208 StatRxFrameTooLongCts, 0, sizeof(pAC->Pnmi.Port[ in ResetCounter()
7210 SK_MEMSET((char *)&pAC->Pnmi.Port[PhysPortIndex]. in ResetCounter()
7211 StatRxPMaccErr, 0, sizeof(pAC->Pnmi.Port[ in ResetCounter()
7218 SK_MEMSET((char *)&pAC->Pnmi.VirtualCounterOffset, 0, in ResetCounter()
7219 sizeof(pAC->Pnmi.VirtualCounterOffset)); in ResetCounter()
7220 pAC->Pnmi.RlmtChangeCts = 0; in ResetCounter()
7221 pAC->Pnmi.RlmtChangeTime = 0; in ResetCounter()
7222 SK_MEMSET((char *)&pAC->Pnmi.RlmtChangeEstimate.EstValue[0], 0, in ResetCounter()
7223 sizeof(pAC->Pnmi.RlmtChangeEstimate.EstValue)); in ResetCounter()
7224 pAC->Pnmi.RlmtChangeEstimate.EstValueIndex = 0; in ResetCounter()
7225 pAC->Pnmi.RlmtChangeEstimate.Estimate = 0; in ResetCounter()
7226 pAC->Pnmi.Port[NetIndex].TxSwQueueMax = 0; in ResetCounter()
7227 pAC->Pnmi.Port[NetIndex].TxRetryCts = 0; in ResetCounter()
7228 pAC->Pnmi.Port[NetIndex].RxIntrCts = 0; in ResetCounter()
7229 pAC->Pnmi.Port[NetIndex].TxIntrCts = 0; in ResetCounter()
7230 pAC->Pnmi.Port[NetIndex].RxNoBufCts = 0; in ResetCounter()
7231 pAC->Pnmi.Port[NetIndex].TxNoBufCts = 0; in ResetCounter()
7232 pAC->Pnmi.Port[NetIndex].TxUsedDescrNo = 0; in ResetCounter()
7233 pAC->Pnmi.Port[NetIndex].RxDeliveredCts = 0; in ResetCounter()
7234 pAC->Pnmi.Port[NetIndex].RxOctetsDeliveredCts = 0; in ResetCounter()
7235 pAC->Pnmi.Port[NetIndex].ErrRecoveryCts = 0; in ResetCounter()
7254 SK_AC *pAC, /* Pointer to adapter context */ in GetTrapEntry() argument
7258 unsigned int BufPad = pAC->Pnmi.TrapBufPad; in GetTrapEntry()
7259 unsigned int BufFree = pAC->Pnmi.TrapBufFree; in GetTrapEntry()
7260 unsigned int Beg = pAC->Pnmi.TrapQueueBeg; in GetTrapEntry()
7261 unsigned int End = pAC->Pnmi.TrapQueueEnd; in GetTrapEntry()
7262 char *pBuf = &pAC->Pnmi.TrapBuf[0]; in GetTrapEntry()
7329 pAC->Pnmi.TrapQueueBeg = Beg; in GetTrapEntry()
7330 pAC->Pnmi.TrapQueueEnd = End; in GetTrapEntry()
7331 pAC->Pnmi.TrapBufPad = BufPad; in GetTrapEntry()
7332 pAC->Pnmi.TrapBufFree = BufFree; in GetTrapEntry()
7337 Val32 = (pAC->Pnmi.TrapUnique) ++; in GetTrapEntry()
7340 Val64 = SK_PNMI_HUNDREDS_SEC(SkOsGetTime(pAC)); in GetTrapEntry()
7359 SK_AC *pAC, /* Pointer to adapter context */ in CopyTrapQueue() argument
7362 unsigned int BufPad = pAC->Pnmi.TrapBufPad; in CopyTrapQueue()
7363 unsigned int Trap = pAC->Pnmi.TrapQueueBeg; in CopyTrapQueue()
7364 unsigned int End = pAC->Pnmi.TrapQueueEnd; in CopyTrapQueue()
7365 char *pBuf = &pAC->Pnmi.TrapBuf[0]; in CopyTrapQueue()
7402 SK_AC *pAC, /* Pointer to adapter context */ in GetTrapQueueLen() argument
7406 unsigned int BufPad = pAC->Pnmi.TrapBufPad; in GetTrapQueueLen()
7407 unsigned int Trap = pAC->Pnmi.TrapQueueBeg; in GetTrapQueueLen()
7408 unsigned int End = pAC->Pnmi.TrapQueueEnd; in GetTrapQueueLen()
7409 char *pBuf = &pAC->Pnmi.TrapBuf[0]; in GetTrapQueueLen()
7444 SK_AC *pAC, /* Pointer to adapter context */ in QueueSimpleTrap() argument
7447 GetTrapEntry(pAC, TrapId, SK_PNMI_TRAP_SIMPLE_LEN); in QueueSimpleTrap()
7462 SK_AC *pAC, /* Pointer to adapter context */ in QueueSensorTrap() argument
7473 DescrLen = SK_STRLEN(pAC->I2c.SenTable[SensorIndex].SenDesc); in QueueSensorTrap()
7474 pBuf = GetTrapEntry(pAC, TrapId, in QueueSensorTrap()
7489 SK_MEMCPY(pBuf + Offset + 5, pAC->I2c.SenTable[SensorIndex].SenDesc, in QueueSensorTrap()
7496 *(pBuf + Offset + 5) = (char)pAC->I2c.SenTable[SensorIndex].SenType; in QueueSensorTrap()
7502 Val32 = (SK_U32)pAC->I2c.SenTable[SensorIndex].SenValue; in QueueSensorTrap()
7517 SK_AC *pAC, /* Pointer to adapter context */ in QueueRlmtNewMacTrap() argument
7524 pBuf = GetTrapEntry(pAC, OID_SKGE_TRAP_RLMT_CHANGE_PORT, in QueueRlmtNewMacTrap()
7544 SK_AC *pAC, /* Pointer to adapter context */ in QueueRlmtPortTrap() argument
7552 pBuf = GetTrapEntry(pAC, TrapId, SK_PNMI_TRAP_RLMT_PORT_LEN); in QueueRlmtPortTrap()
7603 SK_AC *pAC, /* Pointer to adapter context */ in PowerManagement() argument
7675 RetCode = SkPowerQueryPnPCapabilities(pAC, IoC, pBuf, pLen); in PowerManagement()
7700 RetCode = SkPowerGetEnableWakeUp(pAC, IoC, pBuf, pLen); in PowerManagement()
7723 RetCode = SkPowerSetPower(pAC, IoC, pBuf, pLen); in PowerManagement()
7727 RetCode = SkPowerAddWakeUpPattern(pAC, IoC, pBuf, pLen); in PowerManagement()
7731 RetCode = SkPowerRemoveWakeUpPattern(pAC, IoC, pBuf, pLen); in PowerManagement()
7735 RetCode = SkPowerSetEnableWakeUp(pAC, IoC, pBuf, pLen); in PowerManagement()
7766 SK_AC *pAC, /* Pointer to adapter context */ in DiagActions() argument
7803 SK_ERR_LOG(pAC, SK_ERRCL_SW, SK_PNMI_ERR040, SK_PNMI_ERR040MSG); in DiagActions()
7816 DiagStatus = pAC->Pnmi.DiagAttached; in DiagActions()
7847 if (pAC->Pnmi.DiagAttached == SK_DIAG_RUNNING) { in DiagActions()
7849 RetCode = SkDrvLeaveDiagMode(pAC); in DiagActions()
7852 else if (pAC->Pnmi.DiagAttached == SK_DIAG_IDLE) { in DiagActions()
7865 pAC->Pnmi.DiagAttached = SK_DIAG_ATTACHED; in DiagActions()
7877 if (pAC->Pnmi.DiagAttached == SK_DIAG_ATTACHED) { in DiagActions()
7879 if (!pAC->DiagModeActive) { in DiagActions()
7881 RetCode = SkDrvEnterDiagMode(pAC); in DiagActions()
7895 pAC->Pnmi.DiagAttached = SK_DIAG_RUNNING; in DiagActions()
7901 if (pAC->Pnmi.DiagAttached == SK_DIAG_RUNNING) { in DiagActions()
7903 RetCode = SkDrvLeaveDiagMode(pAC); in DiagActions()
7906 else if (pAC->Pnmi.DiagAttached == SK_DIAG_ATTACHED) { in DiagActions()
7919 pAC->Pnmi.DiagAttached = SK_DIAG_IDLE; in DiagActions()
7965 SK_AC *pAC, /* Pointer to adapter context */ in Vct() argument
7991 PhysPortMax = pAC->GIni.GIMacsFound; in Vct()
7995 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) { in Vct()
8006 if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) { in Vct()
8024 pPrt = &pAC->GIni.GP[PhysPortIndex]; in Vct()
8039 pVctBackupData = &pAC->Pnmi.VctBackup[PhysPortIndex]; in Vct()
8072 (pAC->Pnmi.VctStatus[PhysPortIndex] & SK_PNMI_VCT_PENDING)) { in Vct()
8073 RetCode = SkGmCableDiagStatus(pAC, IoC, PhysPortIndex, SK_FALSE); in Vct()
8075 pAC->Pnmi.VctStatus[PhysPortIndex] &= ~SK_PNMI_VCT_PENDING; in Vct()
8076 pAC->Pnmi.VctStatus[PhysPortIndex] |= in Vct()
8098 SkEventQueue(pAC, SKGE_DRV, SK_DRV_PORT_RESET, Para); in Vct()
8099 SkEventDispatcher(pAC, IoC); in Vct()
8107 CheckVctStatus(pAC, IoC, pBuf, Offset, PhysPortIndex); in Vct()
8124 CheckVctStatus(pAC, IoC, pBuf, Offset, PhysPortIndex); in Vct()
8172 SkGeStopPort(pAC, IoC, PhysPortIndex, SK_STOP_ALL, SK_SOFT_RST); in Vct()
8174 RetCode = SkGmCableDiagStatus(pAC, IoC, PhysPortIndex, SK_TRUE); in Vct()
8176 pAC->Pnmi.VctStatus[PhysPortIndex] |= SK_PNMI_VCT_PENDING; in Vct()
8177 pAC->Pnmi.VctStatus[PhysPortIndex] &= ~SK_PNMI_VCT_NEW_VCT_DATA; in Vct()
8178 pAC->Pnmi.VctStatus[PhysPortIndex] &= ~SK_PNMI_VCT_LINK; in Vct()
8186 SkTimerStart(pAC, IoC, &pAC->Pnmi.VctTimeout[PhysPortIndex].VctTimer, in Vct()
8216 SK_AC *pAC, in CheckVctStatus() argument
8226 pPrt = &pAC->GIni.GP[PhysPortIndex]; in CheckVctStatus()
8234 if (pAC->Pnmi.VctStatus[PhysPortIndex] & SK_PNMI_VCT_TEST_DONE) { in CheckVctStatus()
8235 if ((pAC->Pnmi.VctStatus[PhysPortIndex] & SK_PNMI_VCT_LINK)) { in CheckVctStatus()
8244 RetCode = SkGmCableDiagStatus(pAC,IoC, PhysPortIndex, SK_FALSE); in CheckVctStatus()
8249 if (pAC->Pnmi.VctStatus[PhysPortIndex] & SK_PNMI_VCT_PENDING) { in CheckVctStatus()
8261 if (pAC->Pnmi.VctStatus[PhysPortIndex] & SK_PNMI_VCT_TEST_DONE) { in CheckVctStatus()
8267 if (pAC->GIni.GP[PhysPortIndex].PLinkSpeedUsed != in CheckVctStatus()
8300 SK_AC *pAC, /* Pointer to adapter context struct */ in SkPnmiGenIoctl() argument
8321 ReturnCode = SkPnmiGetVar(pAC, IoC, Oid, in SkPnmiGenIoctl()
8328 ReturnCode = SkPnmiPreSetVar(pAC, IoC, Oid, in SkPnmiGenIoctl()
8335 ReturnCode = SkPnmiSetVar(pAC, IoC, Oid, in SkPnmiGenIoctl()
8342 ReturnCode = SkPnmiGetStruct(pAC, IoC, pBuf, pLen, NetIndex); in SkPnmiGenIoctl()
8345 ReturnCode = SkPnmiPreSetStruct(pAC, IoC, pBuf, pLen, NetIndex); in SkPnmiGenIoctl()
8348 ReturnCode = SkPnmiSetStruct(pAC, IoC, pBuf, pLen, NetIndex); in SkPnmiGenIoctl()