Lines Matching defs:etdev
266 struct et131x_adapter *etdev = (struct et131x_adapter *) data;
269 pm_csr = readl(&etdev->regs->global.pm_csr);
272 UpdateMacStatHostCounters(etdev);
274 dev_err(&etdev->pdev->dev,
277 if (!etdev->Bmsr.bits.link_status &&
278 etdev->RegistryPhyComa &&
279 etdev->PoMgmt.TransPhyComaModeOnBoot < 11) {
280 etdev->PoMgmt.TransPhyComaModeOnBoot++;
283 if (etdev->PoMgmt.TransPhyComaModeOnBoot == 10) {
284 if (!etdev->Bmsr.bits.link_status
285 && etdev->RegistryPhyComa) {
290 et131x_enable_interrupts(etdev);
291 EnablePhyComa(etdev);
297 mod_timer(&etdev->ErrorTimer, jiffies +
308 struct et131x_adapter *etdev = (struct et131x_adapter *) data;
311 if (etdev->MediaState == 0) {
312 spin_lock_irqsave(&etdev->Lock, flags);
314 etdev->MediaState = NETIF_STATUS_MEDIA_DISCONNECT;
315 etdev->Flags &= ~fMP_ADAPTER_LINK_DETECTION;
317 spin_unlock_irqrestore(&etdev->Lock, flags);
319 netif_carrier_off(etdev->netdev);
325 * @etdev: pointer to our adapter structure
329 void ConfigGlobalRegs(struct et131x_adapter *etdev)
331 struct global_regs __iomem *regs = &etdev->regs->global;
336 if (etdev->RegistryJumboPacket < 2048) {
344 } else if (etdev->RegistryJumboPacket < 8192) {
377 int et131x_adapter_setup(struct et131x_adapter *etdev)
382 ConfigGlobalRegs(etdev);
384 ConfigMACRegs1(etdev);
388 writel(ET_MMC_ENABLE, &etdev->regs->mmc.mmc_ctrl);
390 ConfigRxMacRegs(etdev);
391 ConfigTxMacRegs(etdev);
393 ConfigRxDmaRegs(etdev);
394 ConfigTxDmaRegs(etdev);
396 ConfigMacStatRegs(etdev);
399 status = et131x_xcvr_find(etdev);
402 dev_warn(&etdev->pdev->dev, "Could not find the xcvr\n");
405 ET1310_PhyInit(etdev);
408 ET1310_PhyReset(etdev);
411 ET1310_PhyPowerDown(etdev, 1);
417 if (etdev->pdev->device != ET131X_PCI_DEVICE_ID_FAST)
418 ET1310_PhyAdvertise1000BaseT(etdev, TRUEPHY_ADV_DUPLEX_FULL);
420 ET1310_PhyAdvertise1000BaseT(etdev, TRUEPHY_ADV_DUPLEX_NONE);
423 ET1310_PhyPowerDown(etdev, 0);
425 et131x_setphy_normal(etdev);
525 * @etdev: pointer to the private adapter struct
540 struct et131x_adapter *etdev;
546 etdev = netdev_priv(netdev);
547 etdev->pdev = pci_dev_get(pdev);
548 etdev->netdev = netdev;
555 spin_lock_init(&etdev->Lock);
556 spin_lock_init(&etdev->TCBSendQLock);
557 spin_lock_init(&etdev->TCBReadyQLock);
558 spin_lock_init(&etdev->SendHWLock);
559 spin_lock_init(&etdev->RcvLock);
560 spin_lock_init(&etdev->RcvPendLock);
561 spin_lock_init(&etdev->FbrLock);
562 spin_lock_init(&etdev->PHYLock);
566 dev_info(&etdev->pdev->dev,
569 etdev->SpeedDuplex = et131x_speed_set;
570 etdev->RegistryJumboPacket = 1514; /* 1514-9216 */
573 memcpy(etdev->CurrentAddress, default_mac, ETH_ALEN);
583 if (etdev->pdev->device == ET131X_PCI_DEVICE_ID_FAST &&
584 etdev->SpeedDuplex == 5)
585 etdev->SpeedDuplex = 4;
587 etdev->AiForceSpeed = speed[etdev->SpeedDuplex];
588 etdev->AiForceDpx = duplex[etdev->SpeedDuplex]; /* Auto FDX */
590 return etdev;