Lines Matching defs:priv

253 static struct tlan_private *priv;
278 priv->txHead = 0;
279 priv->txTail = 0;
293 priv->cur_rx = 0;
294 priv->rx_buf_sz = (TLAN_MAX_FRAME_SIZE);
295 priv->rx_head_desc = &rx_ring[0];
312 priv->dirty_rx = (unsigned int) (i - TLAN_NUM_RX_LISTS);
340 priv->tlanFullDuplex = FALSE;
341 priv->phyOnline = 0;
380 if (priv->tlanRev >= 0x30) {
389 if (priv->aui == 1) {
391 } else if (priv->duplex == TLAN_DUPLEX_FULL) {
393 priv->tlanFullDuplex = TRUE;
399 if (priv->phyNum == 0) {
425 phy = priv->phy[priv->phyNum];
428 if (priv->tlanFullDuplex) {
433 if (priv->phyNum == 0) {
442 || (priv->aui)) {
444 printf("TLAN: %s: Link forced.\n", priv->nic_name);
457 priv->nic_name);
481 priv->link = 1;
488 printf("TLAN: %s: Link active\n", priv->nic_name);
493 if (priv->phyNum == 0) {
504 priv->phyOnline = 1;
516 priv->nic_name);
538 int entry = priv->cur_rx % TLAN_NUM_RX_LISTS;
563 (priv->cur_rx * TLAN_MAX_FRAME_SIZE), nic->packetlen);
571 priv->cur_rx = entry;
597 (priv->cur_rx - priv->dirty_rx +
599 priv->dirty_rx = (priv->dirty_rx + 1) % TLAN_NUM_RX_LISTS) {
600 entry = priv->dirty_rx % TLAN_NUM_TX_LISTS;
634 if (!priv->phyOnline) {
635 printf("TRANSMIT: %s PHY is not ready\n", priv->nic_name);
639 tail_list = priv->txList + priv->txTail;
643 priv->nic_name, priv->txList, priv->txTail);
645 priv->txBusyCount++;
651 tail_buffer = txb + (priv->txTail * TLAN_MAX_FRAME_SIZE);
696 if (!priv->txInProgress) {
697 priv->txInProgress = 1;
701 if (priv->txTail == 0) {
705 (priv->txList + (TLAN_NUM_TX_LISTS - 1))->forward =
711 (priv->txList + (priv->txTail - 1))->forward =
716 CIRC_INC(priv->txTail, TLAN_NUM_TX_LISTS);
726 head_list = priv->txList + priv->txHead;
733 CIRC_INC(priv->txHead, TLAN_NUM_TX_LISTS);
734 head_list = priv->txList + priv->txHead;
741 head_list = priv->txList + priv->txHead;
746 priv->txInProgress = 0;
754 if(priv->tlanRev < 0x30 ) {
756 head_list = priv->txList + priv->txHead;
761 priv->txInProgress = 0;
862 priv = &TLanPrivateInfo;
876 priv->vendor_id = pci->vendor;
877 priv->dev_id = pci->dev_id;
878 priv->nic_name = pci->name;
879 priv->eoc = 0;
893 priv->tlanRev = TLan_DioRead8(BASE, TLAN_DEF_REVISION);
894 printf("\nRevision = 0x%hX\n", priv->tlanRev);
910 priv->txList = tx_ring;
911 priv->rxList = rx_ring;
1439 priv->phyNum = 0xFFFF;
1446 priv->phy[0] = TLAN_PHY_MAX_ADDR;
1448 priv->phy[0] = TLAN_PHY_NONE;
1451 priv->phy[1] = TLAN_PHY_NONE;
1460 if ((priv->phy[1] == TLAN_PHY_NONE)
1462 priv->phy[1] = phy;
1467 if (priv->phy[1] != TLAN_PHY_NONE) {
1468 priv->phyNum = 1;
1469 } else if (priv->phy[0] != TLAN_PHY_NONE) {
1470 priv->phyNum = 0;
1482 printf("%s: Powering down PHY(s).\n", priv->nic_name);
1485 TLan_MiiWriteReg(nic, priv->phy[priv->phyNum], MII_GEN_CTL, value);
1486 if ((priv->phyNum == 0) && (priv->phy[1] != TLAN_PHY_NONE)
1491 TLan_MiiWriteReg(nic, priv->phy[1], MII_GEN_CTL, value);
1509 printf("%s: Powering up PHY.\n", priv->nic_name);
1512 TLan_MiiWriteReg(nic, priv->phy[priv->phyNum], MII_GEN_CTL, value);
1529 phy = priv->phy[priv->phyNum];
1531 printf("%s: Reseting PHY.\n", priv->nic_name);
1561 phy = priv->phy[priv->phyNum];
1562 printf("%s: Trying to activate link.\n", priv->nic_name);
1566 if ((status & MII_GS_AUTONEG) && (!priv->aui)) {
1568 if (priv->speed == TLAN_SPEED_10 &&
1569 priv->duplex == TLAN_DUPLEX_HALF) {
1571 } else if (priv->speed == TLAN_SPEED_10 &&
1572 priv->duplex == TLAN_DUPLEX_FULL) {
1573 priv->tlanFullDuplex = TRUE;
1575 } else if (priv->speed == TLAN_SPEED_100 &&
1576 priv->duplex == TLAN_DUPLEX_HALF) {
1578 } else if (priv->speed == TLAN_SPEED_100 &&
1579 priv->duplex == TLAN_DUPLEX_FULL) {
1580 priv->tlanFullDuplex = TRUE;
1597 priv->nic_name);
1606 if ((priv->aui) && (priv->phyNum != 0)) {
1607 priv->phyNum = 0;
1616 } else if (priv->phyNum == 0) {
1619 if (priv->aui) {
1623 if (priv->duplex == TLAN_DUPLEX_FULL) {
1625 priv->tlanFullDuplex = TRUE;
1627 if (priv->speed == TLAN_SPEED_100) {
1654 phy = priv->phy[priv->phyNum];
1664 if (!priv->neg_be_verbose++) {
1680 printf("TLAN: %s: Autonegotiation complete.\n", priv->nic_name);
1686 priv->tlanFullDuplex = TRUE;
1688 priv->tlanFullDuplex = TRUE;
1694 && (priv->phyNum != 0)) {
1695 priv->phyNum = 0;
1706 if (priv->phyNum == 0) {
1707 if ((priv->duplex == TLAN_DUPLEX_FULL)
1751 TLanPrivateInfo *priv = dev->priv;
1755 phy = priv->phy[priv->phyNum];
1762 if (priv->link) {
1763 priv->link = 0;
1764 printf("TLAN: %s has lost link\n", priv->nic_name);
1765 priv->flags &= ~IFF_RUNNING;
1774 if ((phy_status & MII_GS_LINK) && !priv->link) {
1775 priv->link = 1;
1777 priv->nic_name);
1778 priv->flags |= IFF_RUNNING;