Lines Matching refs:priv

80     struct EthDrvSc *drvSc = (struct EthDrvSc *)ethDevice->priv;
81 HiethPriv *priv = (HiethPriv *)drvSc->driverPrivate;
82 struct HiethNetdevLocal *ld = &(g_stHiethPlatformData[priv->index].stNetdevLocal);
85 linkStatus = MiiphyLink(ld, priv->phy);
96 struct EthDrvSc *drvSc = (struct EthDrvSc *)ethDevice->priv;
97 HiethPriv *priv = (HiethPriv *)drvSc->driverPrivate;
98 struct HiethNetdevLocal *ld = &(g_stHiethPlatformData[priv->index].stNetdevLocal);
101 refillCnt = HiethFeedHw(ld, priv);
103 RestartTimer(&priv->monitorTimer, HIETH_MONITOR_TIME, HiethMonitorFunc, (uintptr_t)ethDevice);
109 struct EthDrvSc *drvSc = (struct EthDrvSc *)ethDevice->priv;
110 HiethPriv *priv = (HiethPriv *)drvSc->driverPrivate;
112 priv->rxRelease++;
113 if (priv->rxRelease == HIETH_HWQ_RXQ_DEPTH) {
114 priv->rxRelease = 0;
123 struct EthDrvSc *drvInfo = (struct EthDrvSc *)(ethDevice->priv);
124 HiethPriv *priv = (HiethPriv *)drvInfo->driverPrivate;
126 (void)OsalTimerDelete(&priv->phyTimer);
127 (void)OsalTimerDelete(&priv->monitorTimer);
152 HiethPriv *priv = (HiethPriv *)drvSc->driverPrivate;
154 OsalDisableIrq(priv->vector); // 禁止一个irq;
155 LOS_EventWrite(&(g_stHiethPlatformData[priv->index].stEvent), EVENT_NET_TX_RX);
163 struct EthDrvSc *drvSc = (struct EthDrvSc *)ethDevice->priv;
164 HiethPriv *priv = (HiethPriv *)drvSc->driverPrivate;
167 uwRet = LOS_EventRead(&(g_stHiethPlatformData[priv->index].stEvent), EVENT_NET_TX_RX,
210 struct EthDrvSc *drvSc = (struct EthDrvSc *)ethDevice->priv;
211 HiethPriv *priv = (HiethPriv *)drvSc->driverPrivate;
212 struct HiethNetdevLocal *ld = &(g_stHiethPlatformData[priv->index].stNetdevLocal);
216 HiethXmitReleasePkt(ld, priv);
231 OsalEnableIrq(priv->vector);
232 uwRet = LOS_EventRead(&(g_stHiethPlatformData[priv->index].stEvent),
237 OsalDisableIrq(priv->vector);
248 struct EthDrvSc *drvSc = (struct EthDrvSc *)ethDevice->priv;
249 HiethPriv *priv = (HiethPriv *)drvSc->driverPrivate;
250 struct HiethNetdevLocal *ld = &(g_stHiethPlatformData[priv->index].stNetdevLocal);
254 HiethXmitGso(ld, priv, netBuf);
261 struct EthDrvSc *drvSc = (struct EthDrvSc *)ethDevice->priv;
262 HiethPriv *priv = (HiethPriv *)drvSc->driverPrivate;
263 struct HiethNetdevLocal *ld = &(g_stHiethPlatformData[priv->index].stNetdevLocal);
276 HiethXmitReleasePkt(ld, priv);
296 netBuf = priv->ram->rxNetbuf[priv->rxRelease];
302 refillCnt = HiethFeedHw(ld, priv);
303 if (!refillCnt && (priv->rxRelease == priv->rxFeed)) {
304 RestartTimer(&priv->monitorTimer, HIETH_MONITOR_TIME, HiethMonitorFunc, (uintptr_t)ethDevice);
326 OsalEnableIrq(priv->vector);
328 drv_interrupt_unmask(priv->vector);
339 struct EthDrvSc *drvSc = (struct EthDrvSc *)ethDevice->priv;
340 HiethPriv *priv = (HiethPriv *)drvSc->driverPrivate;
342 OsalDisableIrq(priv->vector);
344 OsalEnableIrq(priv->vector);
348 OsalEnableIrq(priv->vector);
369 struct EthDrvSc *drvSc = (struct EthDrvSc *)ethDevice->priv;
370 HiethPriv *priv = (HiethPriv *)drvSc->driverPrivate;
371 struct HiethNetdevLocal *ld = &(g_stHiethPlatformData[priv->index].stNetdevLocal);
377 duplex = MiiphyDuplex(ld, priv->phy);
378 speed = MiiphySpeed(ld, priv->phy);
392 switch (priv->phy->phyMode) {
400 HDF_LOGE("not supported mode: %d", priv->phy->phyMode);
416 HiethPriv *priv = (HiethPriv *)((struct EthDrvSc *)ethDevice->priv)->driverPrivate;
428 HiethHwSetMacAddress(&(g_stHiethPlatformData[priv->index].stNetdevLocal), 1, addr);
448 struct EthDrvSc *drvSc = (struct EthDrvSc *)ethDevice->priv;
449 HiethPriv *priv = (HiethPriv *)drvSc->driverPrivate;
450 struct HiethNetdevLocal *ld = &(g_stHiethPlatformData[priv->index].stNetdevLocal);
457 ld->txq = priv->ram->txqInfo;
458 ld->iobase = (char *)((uintptr_t)priv->base);
463 priv->phy->phyMode = g_phyModeVal;
464 HDF_LOGE("hisi_eth: User set phy mode=%s", PhyModes(priv->phy->phyMode));
466 priv->phy->phyMode = ld->phyMode;
467 HDF_LOGE("hisi_eth: User did not set phy mode, use default=%s", PhyModes(priv->phy->phyMode));
470 if (!priv->phy->initDone) {
473 priv->phy->initDone = true;
476 priv->phy->phyAddr = g_phyAddrVal;
477 HDF_LOGE("hisi_eth: User set phy addr=%d", priv->phy->phyAddr);
479 id = ScanPhyId(ld, priv->phy->phyAddr);
482 priv->phy->initDone = false;
498 priv->phy->initDone = false;
502 priv->phy->phyAddr = addr;
509 HiethFephyTrim(ld, priv->phy);
510 HDF_LOGE("Detected phy addr %d, phyid: 0x%x.", priv->phy->phyAddr, ld->phyId);
512 if (!priv->phy->initDone) {
516 HiethGetPhyStat(ld, priv->phy, &phyState);
518 if (OsalRegisterIrq(priv->vector, OSAL_IRQF_TRIGGER_NONE, HisiEthIsr, "ETH", (void *)drvSc) != HDF_SUCCESS) {
522 OsalEnableIrq(priv->vector);
533 struct EthDrvSc *drvSc = (struct EthDrvSc *)ethDevice->priv;
534 HiethPriv *priv = (HiethPriv *)drvSc->driverPrivate;
535 struct HiethNetdevLocal *ld = &(g_stHiethPlatformData[priv->index].stNetdevLocal);
543 priv->rxFeed = 0;
544 priv->rxRelease = 0;
545 HiethFeedHw(ld, priv);
547 if (OsalTimerCreate(&priv->phyTimer, PHY_STATE_TIME, PhyStateMachine, (uintptr_t)ethDevice) != HDF_SUCCESS) {
551 if (OsalTimerStartLoop(&priv->phyTimer) != HDF_SUCCESS) {
624 struct EthDrvSc *drvSc = (struct EthDrvSc *)ethDevice->priv;
625 HiethPriv *priv = (HiethPriv *)drvSc->driverPrivate;
626 ld = &(g_stHiethPlatformData[priv->index].stNetdevLocal);