Lines Matching refs:pAC

73 SK_AC	*pAC,		/* adapter context */  in SkGePollRxD()  argument
80 pPrt = &pAC->GIni.GP[Port]; in SkGePollRxD()
101 SK_AC *pAC, /* adapter context */ in SkGePollTxD() argument
109 pPrt = &pAC->GIni.GP[Port]; in SkGePollTxD()
137 SK_AC *pAC, /* adapter context */ in SkGeYellowLED() argument
171 SK_AC *pAC, /* adapter context */ in SkGeXmitLED() argument
180 LedIni = SK_XMIT_DUR * (SK_U32)pAC->GIni.GIHstClkFact / 100; in SkGeXmitLED()
229 SK_AC *pAC, /* adapter context */ in DoCalcAddr() argument
284 SK_AC *pAC, /* Adapter context */ in SkGeInitAssignRamToQueues() argument
295 if (ActivePort >= pAC->GIni.GIMacsFound) { in SkGeInitAssignRamToQueues()
296 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_INIT, in SkGeInitAssignRamToQueues()
301 if (((pAC->GIni.GIMacsFound * (SK_MIN_RXQ_SIZE + SK_MIN_TXQ_SIZE)) + in SkGeInitAssignRamToQueues()
302 ((RAM_QUOTA_SYNC == 0) ? 0 : SK_MIN_TXQ_SIZE)) > pAC->GIni.GIRamSize) { in SkGeInitAssignRamToQueues()
303 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_INIT, in SkGeInitAssignRamToQueues()
305 pAC->GIni.GIRamSize)); in SkGeInitAssignRamToQueues()
311 ActivePortKilobytes = pAC->GIni.GIRamSize / pAC->GIni.GIMacsFound; in SkGeInitAssignRamToQueues()
312 for (i = 0; i < pAC->GIni.GIMacsFound; i++) { in SkGeInitAssignRamToQueues()
314 pGePort = &pAC->GIni.GP[i]; in SkGeInitAssignRamToQueues()
338 for (i = 0; i < pAC->GIni.GIMacsFound; i++) { in SkGeInitAssignRamToQueues()
341 pGePort = &pAC->GIni.GP[i]; in SkGeInitAssignRamToQueues()
352 ActivePortKilobytes = pAC->GIni.GIRamSize - UsedKilobytes; in SkGeInitAssignRamToQueues()
357 pGePort = &pAC->GIni.GP[ActivePort]; in SkGeInitAssignRamToQueues()
406 SK_AC *pAC, /* adapter context */ in SkGeCheckQSize() argument
423 for (i = 0; i < pAC->GIni.GIMacsFound; i++) { in SkGeCheckQSize()
424 pPrt = &pAC->GIni.GP[i]; in SkGeCheckQSize()
430 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E012, SKERR_HWI_E012MSG); in SkGeCheckQSize()
435 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E011, SKERR_HWI_E011MSG); in SkGeCheckQSize()
444 (pAC->GIni.GIPortUsage == SK_JUMBO_LINK && in SkGeCheckQSize()
447 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E023, SKERR_HWI_E023MSG); in SkGeCheckQSize()
454 if (UsedMem > pAC->GIni.GIRamSize) { in SkGeCheckQSize()
455 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E012, SKERR_HWI_E012MSG); in SkGeCheckQSize()
461 StartAddr = pAC->GIni.GIRamOffs; in SkGeCheckQSize()
462 for (i = 0; i < pAC->GIni.GIMacsFound; i++) { in SkGeCheckQSize()
463 pPrt = &pAC->GIni.GP[i]; in SkGeCheckQSize()
466 Rtv2 = DoCalcAddr(pAC, pPrt, pPrt->PRxQSize, &StartAddr, in SkGeCheckQSize()
471 Rtv2 = DoCalcAddr(pAC, pPrt, pPrt->PXSQSize, &StartAddr, in SkGeCheckQSize()
476 Rtv2 = DoCalcAddr(pAC, pPrt, pPrt->PXAQSize, &StartAddr, in SkGeCheckQSize()
481 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E013, SKERR_HWI_E013MSG); in SkGeCheckQSize()
504 SK_AC *pAC, /* adapter context */ in SkGeInitMacArb() argument
544 SK_AC *pAC, /* adapter context */ in SkGeInitPktArb() argument
561 if (pAC->GIni.GIPortUsage != SK_JUMBO_LINK) { in SkGeInitPktArb()
562 if (pAC->GIni.GIMacsFound == 1) { in SkGeInitPktArb()
584 SK_AC *pAC, /* adapter context */ in SkGeInitMacFifo() argument
601 if (pAC->GIni.GIGenesis) { in SkGeInitMacFifo()
613 if (pAC->GIni.GIPortUsage == SK_JUMBO_LINK) { in SkGeInitMacFifo()
620 if (pAC->GIni.GIYukon) { in SkGeInitMacFifo()
627 if (pAC->GIni.GIYukonLite && pAC->GIni.GIChipId == CHIP_ID_YUKON) { in SkGeInitMacFifo()
676 SK_AC *pAC, /* adapter context */ in SkGeLoadLnkSyncCnt() argument
760 SK_AC *pAC, /* adapter context */ in SkGeCfgSync() argument
776 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E010, SKERR_HWI_E010MSG); in SkGeCfgSync()
780 if (pAC->GIni.GP[Port].PXSQSize == 0) { in SkGeCfgSync()
781 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E009, SKERR_HWI_E009MSG); in SkGeCfgSync()
786 IntTime = (IntTime / 2) * pAC->GIni.GIHstClkFact / 100; in SkGeCfgSync()
790 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E010, SKERR_HWI_E010MSG); in SkGeCfgSync()
834 SK_AC *pAC, /* adapter context */ in DoInitRamQueue() argument
884 if (pAC->GIni.GIPortUsage == SK_JUMBO_LINK || in DoInitRamQueue()
885 pAC->GIni.GIYukon) { in DoInitRamQueue()
913 SK_AC *pAC, /* adapter context */ in SkGeInitRamBufs() argument
920 pPrt = &pAC->GIni.GP[Port]; in SkGeInitRamBufs()
929 DoInitRamQueue(pAC, IoC, pPrt->PRxQOff, pPrt->PRxQRamStart, in SkGeInitRamBufs()
932 DoInitRamQueue(pAC, IoC, pPrt->PXsQOff, pPrt->PXsQRamStart, in SkGeInitRamBufs()
935 DoInitRamQueue(pAC, IoC, pPrt->PXaQOff, pPrt->PXaQRamStart, in SkGeInitRamBufs()
955 SK_AC *pAC, /* adapter context */ in SkGeInitRamIface() argument
989 SK_AC *pAC, /* adapter context */ in SkGeInitBmu() argument
997 pPrt = &pAC->GIni.GP[Port]; in SkGeInitBmu()
1002 if (!pAC->GIni.GIPciSlot64 && !pAC->GIni.GIPciClock66) { in SkGeInitBmu()
1046 SK_AC *pAC, /* Adapter Context */ in TestStopBit() argument
1144 SK_AC *pAC, /* adapter context */ in SkGeStopPort() argument
1161 pPrt = &pAC->GIni.GP[Port]; in SkGeStopPort()
1165 SkMacRxTxDisable(pAC, IoC, Port); in SkGeStopPort()
1175 ToutStart = SkOsGetTime(pAC); in SkGeStopPort()
1189 SkMacFlushTxFifo(pAC, IoC, Port); in SkGeStopPort()
1191 XsCsr = TestStopBit(pAC, IoC, pPrt->PXsQOff); in SkGeStopPort()
1192 XaCsr = TestStopBit(pAC, IoC, pPrt->PXaQOff); in SkGeStopPort()
1194 if (SkOsGetTime(pAC) - ToutStart > (SK_TICKS_PER_SEC / 18)) { in SkGeStopPort()
1206 SK_ERR_LOG(pAC, SK_ERRCL_HW, SKERR_HWI_E018, in SkGeStopPort()
1210 SkEventQueue(pAC, SKGE_DRV, SK_DRV_PORT_FAIL, Para); in SkGeStopPort()
1218 ToutStart = SkOsGetTime(pAC); in SkGeStopPort()
1237 SkMacSoftRst(pAC, IoC, Port); in SkGeStopPort()
1240 SkMacHardRst(pAC, IoC, Port); in SkGeStopPort()
1264 if (pAC->GIni.GIGenesis) { in SkGeStopPort()
1270 SkGeXmitLED(pAC, IoC, MR_ADDR(Port, TX_LED_INI), SK_LED_DIS); in SkGeStopPort()
1275 if (pAC->GIni.GIYukon) { in SkGeStopPort()
1301 DWord = TestStopBit(pAC, IoC, pPrt->PRxQOff); in SkGeStopPort()
1305 SK_ERR_LOG(pAC, SK_ERRCL_HW, SKERR_HWI_E024, in SkGeStopPort()
1327 if (pAC->GIni.GIGenesis) { in SkGeStopPort()
1332 SkGeXmitLED(pAC, IoC, MR_ADDR(Port, RX_LED_INI), SK_LED_DIS); in SkGeStopPort()
1337 if (pAC->GIni.GIYukon) { in SkGeStopPort()
1357 SK_AC *pAC, /* adapter context */ in SkGeInit0() argument
1364 pPrt = &pAC->GIni.GP[i]; in SkGeInit0()
1405 pAC->GIni.GIPortUsage = SK_RED_LINK; in SkGeInit0()
1406 pAC->GIni.GILedBlinkCtrl = (SK_U16)OemConfig.Value; in SkGeInit0()
1407 pAC->GIni.GIValIrqMask = IS_ALL_MSK; in SkGeInit0()
1428 SK_AC *pAC, /* adapter context */ in SkGePciReset() argument
1446 SkPciReadCfgDWord(pAC, i*4, &ConfigSpace[i]); in SkGePciReset()
1450 SkPciWriteCfgWord(pAC, PCI_PM_CTL_STS, PCI_PM_STATE_D3); in SkGePciReset()
1451 SkPciReadCfgWord(pAC, PCI_PM_CTL_STS, &PmCtlSts); in SkGePciReset()
1458 SkPciWriteCfgWord(pAC, PCI_PM_CTL_STS, PCI_PM_STATE_D0); in SkGePciReset()
1461 SkPciReadCfgWord(pAC, PCI_PM_CTL_STS, &PmCtlSts); in SkGePciReset()
1468 SkPciReadCfgWord(pAC, PCI_COMMAND, &PciCmd); in SkGePciReset()
1469 SkPciReadCfgByte(pAC, PCI_CACHE_LSZ, &Cls); in SkGePciReset()
1470 SkPciReadCfgDWord(pAC, PCI_BASE_1ST, &Bp1); in SkGePciReset()
1471 SkPciReadCfgDWord(pAC, PCI_BASE_2ND, &Bp2); in SkGePciReset()
1472 SkPciReadCfgByte(pAC, PCI_LAT_TIM, &Lat); in SkGePciReset()
1481 SkPciWriteCfgDWord(pAC, i*4, ConfigSpace[i]); in SkGePciReset()
1511 SK_AC *pAC, /* adapter context */ in SkGeInit1() argument
1527 (void)SkGePciReset(pAC, IoC); in SkGeInit1()
1560 pAC->GIni.GIChipId = Byte; in SkGeInit1()
1564 pAC->GIni.GIMacsFound = (Byte & CFG_SNG_MAC) ? 1 : 2; in SkGeInit1()
1567 pAC->GIni.GIChipRev = (SK_U8)((Byte & CFG_CHIP_R_MSK) >> 4); in SkGeInit1()
1575 pAC->GIni.GIGenesis = SK_FALSE; in SkGeInit1()
1576 pAC->GIni.GIYukon = SK_FALSE; in SkGeInit1()
1577 pAC->GIni.GIYukonLite = SK_FALSE; in SkGeInit1()
1580 if (pAC->GIni.GIChipId == CHIP_ID_GENESIS) { in SkGeInit1()
1582 pAC->GIni.GIGenesis = SK_TRUE; in SkGeInit1()
1586 pAC->GIni.GIRamSize = 1024; in SkGeInit1()
1587 pAC->GIni.GIRamOffs = (SK_U32)512 * 1024; in SkGeInit1()
1590 pAC->GIni.GIRamSize = (int)Byte * 512; in SkGeInit1()
1591 pAC->GIni.GIRamOffs = 0; in SkGeInit1()
1594 pAC->GIni.GIHstClkFact = SK_FACT_53; in SkGeInit1()
1597 pAC->GIni.GIPollTimerVal = in SkGeInit1()
1598 SK_DPOLL_DEF * (SK_U32)pAC->GIni.GIHstClkFact / 100; in SkGeInit1()
1603 if (pAC->GIni.GIChipId != CHIP_ID_GENESIS) { in SkGeInit1()
1605 pAC->GIni.GIYukon = SK_TRUE; in SkGeInit1()
1607 pAC->GIni.GIRamSize = (Byte == (SK_U8)0) ? 128 : (int)Byte * 4; in SkGeInit1()
1609 pAC->GIni.GIRamOffs = 0; in SkGeInit1()
1612 pAC->GIni.GIWolOffs = (pAC->GIni.GIChipId == CHIP_ID_YUKON && in SkGeInit1()
1613 pAC->GIni.GIChipRev == 0) ? WOL_REG_OFFS : 0; in SkGeInit1()
1623 pAC->GIni.GIVauxAvail = SK_TRUE; in SkGeInit1()
1626 if (pAC->GIni.GIChipId == CHIP_ID_YUKON_LITE) { in SkGeInit1()
1628 pAC->GIni.GIYukonLite = SK_TRUE; in SkGeInit1()
1640 pAC->GIni.GIYukonLite = SK_TRUE; in SkGeInit1()
1660 pAC->GIni.GIValIrqMask &= ~IS_HW_ERR; in SkGeInit1()
1664 for (i = 0; i < pAC->GIni.GIMacsFound; i++) { in SkGeInit1()
1672 pAC->GIni.GIHstClkFact = SK_FACT_78; in SkGeInit1()
1674 pAC->GIni.GIPollTimerVal = SK_DPOLL_MAX; /* 215 ms */ in SkGeInit1()
1679 pAC->GIni.GIPciSlot64 = (SK_BOOL)((CtrlStat & CS_BUS_SLOT_SZ) != 0); in SkGeInit1()
1682 pAC->GIni.GIPciClock66 = (SK_BOOL)((CtrlStat & CS_BUS_CLOCK) != 0); in SkGeInit1()
1686 pAC->GIni.GIPciHwRev = Byte; in SkGeInit1()
1690 pAC->GIni.GICopperType = (SK_U8)(Byte == 'T'); in SkGeInit1()
1696 for (i = 0; i < pAC->GIni.GIMacsFound; i++) { in SkGeInit1()
1699 if (pAC->GIni.GIGenesis) { in SkGeInit1()
1702 pAC->GIni.GP[i].PhyAddr = PHY_ADDR_XMAC; in SkGeInit1()
1705 pAC->GIni.GP[i].PhyAddr = PHY_ADDR_BCOM; in SkGeInit1()
1706 pAC->GIni.GP[i].PMSCap = (SK_U8)(SK_MS_CAP_AUTO | in SkGeInit1()
1711 pAC->GIni.GP[i].PhyAddr = PHY_ADDR_LONE; in SkGeInit1()
1714 pAC->GIni.GP[i].PhyAddr = PHY_ADDR_NAT; in SkGeInit1()
1726 if (pAC->GIni.GIYukon) { in SkGeInit1()
1732 pAC->GIni.GICopperType = SK_TRUE; in SkGeInit1()
1735 pAC->GIni.GP[i].PhyAddr = PHY_ADDR_MARV; in SkGeInit1()
1737 if (pAC->GIni.GICopperType) { in SkGeInit1()
1739 pAC->GIni.GP[i].PLinkSpeedCap = (SK_U8)(SK_LSPEED_CAP_AUTO | in SkGeInit1()
1743 pAC->GIni.GP[i].PLinkSpeed = (SK_U8)SK_LSPEED_AUTO; in SkGeInit1()
1745 pAC->GIni.GP[i].PMSCap = (SK_U8)(SK_MS_CAP_AUTO | in SkGeInit1()
1754 pAC->GIni.GP[i].PhyType = (int)Byte; in SkGeInit1()
1756 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_INIT, in SkGeInit1()
1758 pAC->GIni.GP[i].PhyAddr)); in SkGeInit1()
1763 if (pAC->GIni.GIGenesis) { in SkGeInit1()
1765 pAC->GIni.GIMacType = SK_MAC_XMAC; in SkGeInit1()
1767 pAC->GIni.GIFunc.pFnMacUpdateStats = SkXmUpdateStats; in SkGeInit1()
1768 pAC->GIni.GIFunc.pFnMacStatistic = SkXmMacStatistic; in SkGeInit1()
1769 pAC->GIni.GIFunc.pFnMacResetCounter = SkXmResetCounter; in SkGeInit1()
1770 pAC->GIni.GIFunc.pFnMacOverflow = SkXmOverflowStatus; in SkGeInit1()
1775 if (pAC->GIni.GIYukon) { in SkGeInit1()
1777 pAC->GIni.GIMacType = SK_MAC_GMAC; in SkGeInit1()
1779 pAC->GIni.GIFunc.pFnMacUpdateStats = SkGmUpdateStats; in SkGeInit1()
1780 pAC->GIni.GIFunc.pFnMacStatistic = SkGmMacStatistic; in SkGeInit1()
1781 pAC->GIni.GIFunc.pFnMacResetCounter = SkGmResetCounter; in SkGeInit1()
1782 pAC->GIni.GIFunc.pFnMacOverflow = SkGmOverflowStatus; in SkGeInit1()
1785 if (pAC->GIni.GIChipId == CHIP_ID_YUKON) { in SkGeInit1()
1816 SK_AC *pAC, /* adapter context */ in SkGeInit2() argument
1825 if (pAC->GIni.GIPollTimerVal != 0) { in SkGeInit2()
1826 if (pAC->GIni.GIPollTimerVal > SK_DPOLL_MAX) { in SkGeInit2()
1827 pAC->GIni.GIPollTimerVal = SK_DPOLL_MAX; in SkGeInit2()
1829 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E017, SKERR_HWI_E017MSG); in SkGeInit2()
1831 SK_OUT32(IoC, B28_DPT_INI, pAC->GIni.GIPollTimerVal); in SkGeInit2()
1836 if (pAC->GIni.GIGenesis) { in SkGeInit2()
1838 DWord = SK_BLK_DUR * (SK_U32)pAC->GIni.GIHstClkFact / 100; in SkGeInit2()
1847 SkGeInitMacArb(pAC, IoC); in SkGeInit2()
1849 SkGeInitPktArb(pAC, IoC); in SkGeInit2()
1854 if (pAC->GIni.GIYukon) { in SkGeInit2()
1861 for (i = 0; i < pAC->GIni.GIMacsFound; i++) { in SkGeInit2()
1866 SkGeInitRamIface(pAC, IoC); in SkGeInit2()
1905 SK_AC *pAC, /* adapter context */ in SkGeInit() argument
1913 SK_DBG_MSG(pAC, SK_DBGMOD_HWM, SK_DBGCAT_INIT, in SkGeInit()
1919 SkGeInit0(pAC, IoC); in SkGeInit()
1920 pAC->GIni.GILevel = SK_INIT_DATA; in SkGeInit()
1925 RetVal = SkGeInit1(pAC, IoC); in SkGeInit()
1941 if (pAC->GIni.GIMacsFound > SK_MAX_MACS) { in SkGeInit()
1947 pAC->GIni.GILevel = SK_INIT_IO; in SkGeInit()
1952 if (pAC->GIni.GILevel != SK_INIT_IO) { in SkGeInit()
1954 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E002, SKERR_HWI_E002MSG); in SkGeInit()
1959 SkGeInit2(pAC, IoC); in SkGeInit()
1962 pAC->GIni.GILevel = SK_INIT_RUN; in SkGeInit()
1966 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E003, SKERR_HWI_E003MSG); in SkGeInit()
1987 SK_AC *pAC, /* adapter context */ in SkGeDeInit() argument
2000 SkI2cWaitIrq(pAC, IoC); in SkGeDeInit()
2004 for (i = 0; i < pAC->GIni.GIMacsFound; i++) { in SkGeDeInit()
2005 if (pAC->GIni.GP[i].PState != SK_PRT_STOP && in SkGeDeInit()
2006 pAC->GIni.GP[i].PState != SK_PRT_RESET) { in SkGeDeInit()
2008 SkGeStopPort(pAC, IoC, i, SK_STOP_ALL, SK_HARD_RST); in SkGeDeInit()
2017 if (pAC->GIni.GIYukonLite && in SkGeDeInit()
2018 pAC->GIni.GIChipRev == CHIP_REV_YU_LITE_A3) { in SkGeDeInit()
2021 for (i = 0; i < pAC->GIni.GIMacsFound; i++) { in SkGeDeInit()
2023 SkGmEnterLowPowerMode(pAC, IoC, i, PHY_PM_DEEP_SLEEP); in SkGeDeInit()
2026 if (pAC->GIni.GIVauxAvail) { in SkGeDeInit()
2058 pAC->GIni.GILevel = SK_INIT_DATA; in SkGeDeInit()
2091 SK_AC *pAC, /* adapter context */ in SkGeInitPort() argument
2097 pPrt = &pAC->GIni.GP[Port]; in SkGeInitPort()
2099 if (SkGeCheckQSize(pAC, Port) != 0) { in SkGeInitPort()
2100 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E004, SKERR_HWI_E004MSG); in SkGeInitPort()
2105 SK_ERR_LOG(pAC, SK_ERRCL_SW, SKERR_HWI_E005, SKERR_HWI_E005MSG); in SkGeInitPort()
2112 if (pAC->GIni.GIGenesis) { in SkGeInitPort()
2118 SkGeXmitLED(pAC, IoC, MR_ADDR(Port, TX_LED_INI), SK_LED_ENA); in SkGeInitPort()
2119 SkGeXmitLED(pAC, IoC, MR_ADDR(Port, RX_LED_INI), SK_LED_ENA); in SkGeInitPort()
2122 SkXmInitMac(pAC, IoC, Port); in SkGeInitPort()
2127 if (pAC->GIni.GIYukon) { in SkGeInitPort()
2129 SkGmInitMac(pAC, IoC, Port); in SkGeInitPort()
2135 SkGeInitMacFifo(pAC, IoC, Port); in SkGeInitPort()
2137 SkGeInitRamBufs(pAC, IoC, Port); in SkGeInitPort()
2144 SkGeInitBmu(pAC, IoC, Port); in SkGeInitPort()