Lines Matching full:lp
335 #define HAVE_DMA_RXALIGN(lp) likely((lp)->chiptype != TC35815CF) argument
439 static inline dma_addr_t fd_virt_to_bus(struct tc35815_local *lp, void *virt) in fd_virt_to_bus() argument
441 return lp->fd_buf_dma + ((u8 *)virt - (u8 *)lp->fd_buf); in fd_virt_to_bus()
444 static inline void *fd_bus_to_virt(struct tc35815_local *lp, dma_addr_t bus) in fd_bus_to_virt() argument
446 return (void *)((u8 *)lp->fd_buf + (bus - lp->fd_buf_dma)); in fd_bus_to_virt()
540 struct tc35815_local *lp = netdev_priv(dev); in tc_handle_link_change() local
545 spin_lock_irqsave(&lp->lock, flags); in tc_handle_link_change()
547 (lp->speed != phydev->speed || lp->duplex != phydev->duplex)) { in tc_handle_link_change()
573 lp->chiptype != TC35815_TX4939) in tc_handle_link_change()
577 lp->speed = phydev->speed; in tc_handle_link_change()
578 lp->duplex = phydev->duplex; in tc_handle_link_change()
582 if (phydev->link != lp->link) { in tc_handle_link_change()
588 lp->speed = 0; in tc_handle_link_change()
589 lp->duplex = -1; in tc_handle_link_change()
591 lp->link = phydev->link; in tc_handle_link_change()
595 spin_unlock_irqrestore(&lp->lock, flags); in tc_handle_link_change()
597 if (status_change && netif_msg_link(lp)) { in tc_handle_link_change()
610 struct tc35815_local *lp = netdev_priv(dev); in tc_mii_probe() local
613 phydev = phy_find_first(lp->mii_bus); in tc_mii_probe()
622 lp->chiptype == TC35815_TX4939 ? PHY_INTERFACE_MODE_RMII : PHY_INTERFACE_MODE_MII); in tc_mii_probe()
649 lp->link = 0; in tc_mii_probe()
650 lp->speed = 0; in tc_mii_probe()
651 lp->duplex = -1; in tc_mii_probe()
658 struct tc35815_local *lp = netdev_priv(dev); in tc_mii_init() local
661 lp->mii_bus = mdiobus_alloc(); in tc_mii_init()
662 if (lp->mii_bus == NULL) { in tc_mii_init()
667 lp->mii_bus->name = "tc35815_mii_bus"; in tc_mii_init()
668 lp->mii_bus->read = tc_mdio_read; in tc_mii_init()
669 lp->mii_bus->write = tc_mdio_write; in tc_mii_init()
670 snprintf(lp->mii_bus->id, MII_BUS_ID_SIZE, "%x", pci_dev_id(lp->pci_dev)); in tc_mii_init()
671 lp->mii_bus->priv = dev; in tc_mii_init()
672 lp->mii_bus->parent = &lp->pci_dev->dev; in tc_mii_init()
673 err = mdiobus_register(lp->mii_bus); in tc_mii_init()
682 mdiobus_unregister(lp->mii_bus); in tc_mii_init()
684 mdiobus_free(lp->mii_bus); in tc_mii_init()
705 struct tc35815_local *lp = netdev_priv(dev); in tc35815_read_plat_dev_addr() local
707 lp->pci_dev, tc35815_mac_match); in tc35815_read_plat_dev_addr()
767 struct tc35815_local *lp; in tc35815_init_one() local
784 dev = alloc_etherdev(sizeof(*lp)); in tc35815_init_one()
789 lp = netdev_priv(dev); in tc35815_init_one()
790 lp->dev = dev; in tc35815_init_one()
806 netif_napi_add_weight(dev, &lp->napi, tc35815_poll, NAPI_WEIGHT); in tc35815_init_one()
811 INIT_WORK(&lp->restart_work, tc35815_restart_work); in tc35815_init_one()
812 spin_lock_init(&lp->lock); in tc35815_init_one()
813 spin_lock_init(&lp->rx_lock); in tc35815_init_one()
814 lp->pci_dev = pdev; in tc35815_init_one()
815 lp->chiptype = ent->driver_data; in tc35815_init_one()
817 lp->msg_enable = NETIF_MSG_TX_ERR | NETIF_MSG_HW | NETIF_MSG_DRV | NETIF_MSG_LINK; in tc35815_init_one()
857 struct tc35815_local *lp = netdev_priv(dev); in tc35815_remove_one() local
860 mdiobus_unregister(lp->mii_bus); in tc35815_remove_one()
861 mdiobus_free(lp->mii_bus); in tc35815_remove_one()
869 struct tc35815_local *lp = netdev_priv(dev); in tc35815_init_queues() local
873 if (!lp->fd_buf) { in tc35815_init_queues()
880 lp->fd_buf = dma_alloc_coherent(&lp->pci_dev->dev, in tc35815_init_queues()
882 &lp->fd_buf_dma, GFP_ATOMIC); in tc35815_init_queues()
883 if (!lp->fd_buf) in tc35815_init_queues()
886 lp->rx_skbs[i].skb = in tc35815_init_queues()
887 alloc_rxbuf_skb(dev, lp->pci_dev, in tc35815_init_queues()
888 &lp->rx_skbs[i].skb_dma); in tc35815_init_queues()
889 if (!lp->rx_skbs[i].skb) { in tc35815_init_queues()
891 free_rxbuf_skb(lp->pci_dev, in tc35815_init_queues()
892 lp->rx_skbs[i].skb, in tc35815_init_queues()
893 lp->rx_skbs[i].skb_dma); in tc35815_init_queues()
894 lp->rx_skbs[i].skb = NULL; in tc35815_init_queues()
896 dma_free_coherent(&lp->pci_dev->dev, in tc35815_init_queues()
898 lp->fd_buf, lp->fd_buf_dma); in tc35815_init_queues()
899 lp->fd_buf = NULL; in tc35815_init_queues()
904 dev->name, lp->fd_buf); in tc35815_init_queues()
908 clear_page((void *)((unsigned long)lp->fd_buf + in tc35815_init_queues()
911 fd_addr = (unsigned long)lp->fd_buf; in tc35815_init_queues()
914 lp->rfd_base = (struct RxFD *)fd_addr; in tc35815_init_queues()
917 lp->rfd_base[i].fd.FDCtl = cpu_to_le32(FD_CownsFD); in tc35815_init_queues()
918 lp->rfd_cur = lp->rfd_base; in tc35815_init_queues()
919 lp->rfd_limit = (struct RxFD *)fd_addr - (RX_FD_RESERVE + 1); in tc35815_init_queues()
922 lp->tfd_base = (struct TxFD *)fd_addr; in tc35815_init_queues()
925 lp->tfd_base[i].fd.FDNext = cpu_to_le32(fd_virt_to_bus(lp, &lp->tfd_base[i+1])); in tc35815_init_queues()
926 lp->tfd_base[i].fd.FDSystem = cpu_to_le32(0xffffffff); in tc35815_init_queues()
927 lp->tfd_base[i].fd.FDCtl = cpu_to_le32(0); in tc35815_init_queues()
929 lp->tfd_base[TX_FD_NUM-1].fd.FDNext = cpu_to_le32(fd_virt_to_bus(lp, &lp->tfd_base[0])); in tc35815_init_queues()
930 lp->tfd_start = 0; in tc35815_init_queues()
931 lp->tfd_end = 0; in tc35815_init_queues()
934 lp->fbl_ptr = (struct FrFD *)fd_addr; in tc35815_init_queues()
935 lp->fbl_ptr->fd.FDNext = cpu_to_le32(fd_virt_to_bus(lp, lp->fbl_ptr)); in tc35815_init_queues()
936 lp->fbl_ptr->fd.FDCtl = cpu_to_le32(RX_BUF_NUM | FD_CownsFD); in tc35815_init_queues()
942 lp->fbl_count = 0; in tc35815_init_queues()
944 if (lp->rx_skbs[i].skb) { in tc35815_init_queues()
945 if (i != lp->fbl_count) { in tc35815_init_queues()
946 lp->rx_skbs[lp->fbl_count].skb = in tc35815_init_queues()
947 lp->rx_skbs[i].skb; in tc35815_init_queues()
948 lp->rx_skbs[lp->fbl_count].skb_dma = in tc35815_init_queues()
949 lp->rx_skbs[i].skb_dma; in tc35815_init_queues()
951 lp->fbl_count++; in tc35815_init_queues()
955 if (i >= lp->fbl_count) { in tc35815_init_queues()
956 lp->fbl_ptr->bd[i].BuffData = 0; in tc35815_init_queues()
957 lp->fbl_ptr->bd[i].BDCtl = 0; in tc35815_init_queues()
960 lp->fbl_ptr->bd[i].BuffData = in tc35815_init_queues()
961 cpu_to_le32(lp->rx_skbs[i].skb_dma); in tc35815_init_queues()
963 lp->fbl_ptr->bd[i].BDCtl = in tc35815_init_queues()
969 dev->name, lp->tfd_base, lp->rfd_base, lp->fbl_ptr); in tc35815_init_queues()
976 struct tc35815_local *lp = netdev_priv(dev); in tc35815_clear_queues() local
980 u32 fdsystem = le32_to_cpu(lp->tfd_base[i].fd.FDSystem); in tc35815_clear_queues()
983 lp->tx_skbs[fdsystem].skb : NULL; in tc35815_clear_queues()
985 if (lp->tx_skbs[i].skb != skb) { in tc35815_clear_queues()
990 BUG_ON(lp->tx_skbs[i].skb != skb); in tc35815_clear_queues()
993 dma_unmap_single(&lp->pci_dev->dev, in tc35815_clear_queues()
994 lp->tx_skbs[i].skb_dma, skb->len, in tc35815_clear_queues()
996 lp->tx_skbs[i].skb = NULL; in tc35815_clear_queues()
997 lp->tx_skbs[i].skb_dma = 0; in tc35815_clear_queues()
1000 lp->tfd_base[i].fd.FDSystem = cpu_to_le32(0xffffffff); in tc35815_clear_queues()
1009 struct tc35815_local *lp = netdev_priv(dev); in tc35815_free_queues() local
1012 if (lp->tfd_base) { in tc35815_free_queues()
1014 u32 fdsystem = le32_to_cpu(lp->tfd_base[i].fd.FDSystem); in tc35815_free_queues()
1017 lp->tx_skbs[fdsystem].skb : NULL; in tc35815_free_queues()
1019 if (lp->tx_skbs[i].skb != skb) { in tc35815_free_queues()
1024 BUG_ON(lp->tx_skbs[i].skb != skb); in tc35815_free_queues()
1027 dma_unmap_single(&lp->pci_dev->dev, in tc35815_free_queues()
1028 lp->tx_skbs[i].skb_dma, in tc35815_free_queues()
1031 lp->tx_skbs[i].skb = NULL; in tc35815_free_queues()
1032 lp->tx_skbs[i].skb_dma = 0; in tc35815_free_queues()
1034 lp->tfd_base[i].fd.FDSystem = cpu_to_le32(0xffffffff); in tc35815_free_queues()
1038 lp->rfd_base = NULL; in tc35815_free_queues()
1039 lp->rfd_limit = NULL; in tc35815_free_queues()
1040 lp->rfd_cur = NULL; in tc35815_free_queues()
1041 lp->fbl_ptr = NULL; in tc35815_free_queues()
1044 if (lp->rx_skbs[i].skb) { in tc35815_free_queues()
1045 free_rxbuf_skb(lp->pci_dev, lp->rx_skbs[i].skb, in tc35815_free_queues()
1046 lp->rx_skbs[i].skb_dma); in tc35815_free_queues()
1047 lp->rx_skbs[i].skb = NULL; in tc35815_free_queues()
1050 if (lp->fd_buf) { in tc35815_free_queues()
1051 dma_free_coherent(&lp->pci_dev->dev, PAGE_SIZE * FD_PAGE_NUM, in tc35815_free_queues()
1052 lp->fd_buf, lp->fd_buf_dma); in tc35815_free_queues()
1053 lp->fd_buf = NULL; in tc35815_free_queues()
1115 struct tc35815_local *lp = netdev_priv(dev); in panic_queues() local
1119 lp->tfd_base, lp->tfd_start, lp->tfd_end); in panic_queues()
1121 lp->rfd_base, lp->rfd_limit, lp->rfd_cur); in panic_queues()
1122 printk("FrFD %p\n", lp->fbl_ptr); in panic_queues()
1124 dump_txfd(&lp->tfd_base[i]); in panic_queues()
1126 int bd_count = dump_rxfd(&lp->rfd_base[i]); in panic_queues()
1129 dump_frfd(lp->fbl_ptr); in panic_queues()
1143 struct tc35815_local *lp = netdev_priv(dev); in tc35815_tx_full() local
1144 return (lp->tfd_start + 1) % TX_FD_NUM == lp->tfd_end; in tc35815_tx_full()
1149 struct tc35815_local *lp = netdev_priv(dev); in tc35815_restart() local
1158 spin_lock_bh(&lp->rx_lock); in tc35815_restart()
1159 spin_lock_irq(&lp->lock); in tc35815_restart()
1165 spin_unlock_irq(&lp->lock); in tc35815_restart()
1166 spin_unlock_bh(&lp->rx_lock); in tc35815_restart()
1173 struct tc35815_local *lp = in tc35815_restart_work() local
1175 struct net_device *dev = lp->dev; in tc35815_restart_work()
1182 struct tc35815_local *lp = netdev_priv(dev); in tc35815_schedule_restart() local
1188 spin_lock_irqsave(&lp->lock, flags); in tc35815_schedule_restart()
1191 schedule_work(&lp->restart_work); in tc35815_schedule_restart()
1192 spin_unlock_irqrestore(&lp->lock, flags); in tc35815_schedule_restart()
1219 struct tc35815_local *lp = netdev_priv(dev); in tc35815_open() local
1236 napi_enable(&lp->napi); in tc35815_open()
1239 spin_lock_irq(&lp->lock); in tc35815_open()
1241 spin_unlock_irq(&lp->lock); in tc35815_open()
1263 struct tc35815_local *lp = netdev_priv(dev); in tc35815_send_packet() local
1281 spin_lock_irqsave(&lp->lock, flags); in tc35815_send_packet()
1284 if ((lp->tfd_start + TX_FD_NUM - lp->tfd_end) % TX_FD_NUM > in tc35815_send_packet()
1288 if (netif_msg_pktdata(lp)) in tc35815_send_packet()
1291 if (lp->tx_skbs[lp->tfd_start].skb) { in tc35815_send_packet()
1296 BUG_ON(lp->tx_skbs[lp->tfd_start].skb); in tc35815_send_packet()
1298 lp->tx_skbs[lp->tfd_start].skb = skb; in tc35815_send_packet()
1299 lp->tx_skbs[lp->tfd_start].skb_dma = dma_map_single(&lp->pci_dev->dev, in tc35815_send_packet()
1305 txfd = &lp->tfd_base[lp->tfd_start]; in tc35815_send_packet()
1306 txfd->bd.BuffData = cpu_to_le32(lp->tx_skbs[lp->tfd_start].skb_dma); in tc35815_send_packet()
1308 txfd->fd.FDSystem = cpu_to_le32(lp->tfd_start); in tc35815_send_packet()
1311 if (lp->tfd_start == lp->tfd_end) { in tc35815_send_packet()
1317 if (netif_msg_tx_queued(lp)) { in tc35815_send_packet()
1321 tc_writel(fd_virt_to_bus(lp, txfd), &tr->TxFrmPtr); in tc35815_send_packet()
1324 if (netif_msg_tx_queued(lp)) { in tc35815_send_packet()
1329 lp->tfd_start = (lp->tfd_start + 1) % TX_FD_NUM; in tc35815_send_packet()
1336 if (netif_msg_tx_queued(lp)) in tc35815_send_packet()
1345 spin_unlock_irqrestore(&lp->lock, flags); in tc35815_send_packet()
1372 struct tc35815_local *lp = netdev_priv(dev); in tc35815_do_interrupt() local
1382 if (netif_msg_rx_err(lp)) in tc35815_do_interrupt()
1390 if (netif_msg_rx_err(lp)) in tc35815_do_interrupt()
1398 if (netif_msg_rx_err(lp)) in tc35815_do_interrupt()
1410 lp->lstats.rx_ints++; in tc35815_do_interrupt()
1414 lp->lstats.tx_ints++; in tc35815_do_interrupt()
1415 spin_lock_irq(&lp->lock); in tc35815_do_interrupt()
1417 spin_unlock_irq(&lp->lock); in tc35815_do_interrupt()
1431 struct tc35815_local *lp = netdev_priv(dev); in tc35815_interrupt() local
1439 if (napi_schedule_prep(&lp->napi)) in tc35815_interrupt()
1440 __napi_schedule(&lp->napi); in tc35815_interrupt()
1465 struct tc35815_local *lp = netdev_priv(dev); in tc35815_rx() local
1470 while (!((fdctl = le32_to_cpu(lp->rfd_cur->fd.FDCtl)) & FD_CownsFD)) { in tc35815_rx()
1471 int status = le32_to_cpu(lp->rfd_cur->fd.FDStat); in tc35815_rx()
1481 if (netif_msg_rx_status(lp)) in tc35815_rx()
1482 dump_rxfd(lp->rfd_cur); in tc35815_rx()
1491 cur_bd = (le32_to_cpu(lp->rfd_cur->bd[0].BDCtl) in tc35815_rx()
1498 BUG_ON(lp->rx_skbs[cur_bd].skb_dma != in tc35815_rx()
1499 (le32_to_cpu(lp->rfd_cur->bd[0].BuffData) & ~3)); in tc35815_rx()
1500 if (!lp->rx_skbs[cur_bd].skb) { in tc35815_rx()
1507 skb = lp->rx_skbs[cur_bd].skb; in tc35815_rx()
1509 lp->rx_skbs[cur_bd].skb = NULL; in tc35815_rx()
1510 dma_unmap_single(&lp->pci_dev->dev, in tc35815_rx()
1511 lp->rx_skbs[cur_bd].skb_dma, in tc35815_rx()
1513 if (!HAVE_DMA_RXALIGN(lp) && NET_IP_ALIGN != 0) in tc35815_rx()
1517 if (netif_msg_pktdata(lp)) in tc35815_rx()
1526 if (netif_msg_rx_err(lp)) in tc35815_rx()
1546 int bdctl = le32_to_cpu(lp->rfd_cur->bd[bd_count - 1].BDCtl); in tc35815_rx()
1558 lp->fbl_count--; in tc35815_rx()
1559 while (lp->fbl_count < RX_BUF_NUM) in tc35815_rx()
1562 (id + 1 + lp->fbl_count) % RX_BUF_NUM; in tc35815_rx()
1563 struct BDesc *bd = &lp->fbl_ptr->bd[curid]; in tc35815_rx()
1573 if (!lp->rx_skbs[curid].skb) { in tc35815_rx()
1574 lp->rx_skbs[curid].skb = in tc35815_rx()
1576 lp->pci_dev, in tc35815_rx()
1577 &lp->rx_skbs[curid].skb_dma); in tc35815_rx()
1578 if (!lp->rx_skbs[curid].skb) in tc35815_rx()
1580 bd->BuffData = cpu_to_le32(lp->rx_skbs[curid].skb_dma); in tc35815_rx()
1586 lp->fbl_count++; in tc35815_rx()
1592 next_rfd = fd_bus_to_virt(lp, in tc35815_rx()
1593 le32_to_cpu(lp->rfd_cur->fd.FDNext)); in tc35815_rx()
1594 if (next_rfd < lp->rfd_base || next_rfd > lp->rfd_limit) { in tc35815_rx()
1602 lp->rfd_cur->fd.FDNext = cpu_to_le32(0xdeaddead); in tc35815_rx()
1604 lp->rfd_cur->fd.FDNext = cpu_to_le32(FD_Next_EOL); in tc35815_rx()
1606 lp->rfd_cur->fd.FDCtl = cpu_to_le32(FD_CownsFD); in tc35815_rx()
1607 lp->rfd_cur++; in tc35815_rx()
1609 if (lp->rfd_cur > lp->rfd_limit) in tc35815_rx()
1610 lp->rfd_cur = lp->rfd_base; in tc35815_rx()
1612 if (lp->rfd_cur != next_rfd) in tc35815_rx()
1614 lp->rfd_cur, next_rfd); in tc35815_rx()
1623 struct tc35815_local *lp = container_of(napi, struct tc35815_local, napi); in tc35815_poll() local
1624 struct net_device *dev = lp->dev; in tc35815_poll()
1633 spin_lock(&lp->rx_lock); in tc35815_poll()
1651 spin_unlock(&lp->rx_lock); in tc35815_poll()
1666 struct tc35815_local *lp = netdev_priv(dev); in tc35815_check_tx_stat() local
1676 if (lp->chiptype == TC35815_TX4939) in tc35815_check_tx_stat()
1679 if (!lp->link || lp->duplex == DUPLEX_FULL) in tc35815_check_tx_stat()
1696 if (lp->lstats.tx_underrun < TX_THRESHOLD_KEEP_LIMIT) { in tc35815_check_tx_stat()
1697 lp->lstats.tx_underrun++; in tc35815_check_tx_stat()
1698 if (lp->lstats.tx_underrun >= TX_THRESHOLD_KEEP_LIMIT) { in tc35815_check_tx_stat()
1726 if (msg && netif_msg_tx_err(lp)) in tc35815_check_tx_stat()
1736 struct tc35815_local *lp = netdev_priv(dev); in tc35815_txdone() local
1740 txfd = &lp->tfd_base[lp->tfd_end]; in tc35815_txdone()
1741 while (lp->tfd_start != lp->tfd_end && in tc35815_txdone()
1748 if (netif_msg_tx_done(lp)) { in tc35815_txdone()
1755 lp->tx_skbs[fdsystem].skb : NULL; in tc35815_txdone()
1757 if (lp->tx_skbs[lp->tfd_end].skb != skb) { in tc35815_txdone()
1762 BUG_ON(lp->tx_skbs[lp->tfd_end].skb != skb); in tc35815_txdone()
1766 dma_unmap_single(&lp->pci_dev->dev, in tc35815_txdone()
1767 lp->tx_skbs[lp->tfd_end].skb_dma, in tc35815_txdone()
1769 lp->tx_skbs[lp->tfd_end].skb = NULL; in tc35815_txdone()
1770 lp->tx_skbs[lp->tfd_end].skb_dma = 0; in tc35815_txdone()
1775 lp->tfd_end = (lp->tfd_end + 1) % TX_FD_NUM; in tc35815_txdone()
1776 txfd = &lp->tfd_base[lp->tfd_end]; in tc35815_txdone()
1778 if ((fdnext & ~FD_Next_EOL) != fd_virt_to_bus(lp, txfd)) { in tc35815_txdone()
1785 if (lp->tfd_end != lp->tfd_start) { in tc35815_txdone()
1788 int head = (lp->tfd_start + TX_FD_NUM - 1) % TX_FD_NUM; in tc35815_txdone()
1789 struct TxFD *txhead = &lp->tfd_base[head]; in tc35815_txdone()
1790 int qlen = (lp->tfd_start + TX_FD_NUM in tc35815_txdone()
1791 - lp->tfd_end) % TX_FD_NUM; in tc35815_txdone()
1800 if (lp->lstats.max_tx_qlen < qlen) in tc35815_txdone()
1801 lp->lstats.max_tx_qlen = qlen; in tc35815_txdone()
1807 if (netif_msg_tx_queued(lp)) { in tc35815_txdone()
1812 tc_writel(fd_virt_to_bus(lp, txfd), &tr->TxFrmPtr); in tc35815_txdone()
1830 struct tc35815_local *lp = netdev_priv(dev); in tc35815_close() local
1833 napi_disable(&lp->napi); in tc35815_close()
1836 cancel_work_sync(&lp->restart_work); in tc35815_close()
1866 struct tc35815_local *lp = netdev_priv(dev); in tc35815_set_cam_entry() local
1875 if (netif_msg_hw(lp)) in tc35815_set_cam_entry()
1921 struct tc35815_local *lp = netdev_priv(dev); in tc35815_set_multicast_list() local
1923 if (!lp->link) in tc35815_set_multicast_list()
1956 struct tc35815_local *lp = netdev_priv(dev); in tc35815_get_drvinfo() local
1960 strscpy(info->bus_info, pci_name(lp->pci_dev), sizeof(info->bus_info)); in tc35815_get_drvinfo()
1965 struct tc35815_local *lp = netdev_priv(dev); in tc35815_get_msglevel() local
1966 return lp->msg_enable; in tc35815_get_msglevel()
1971 struct tc35815_local *lp = netdev_priv(dev); in tc35815_set_msglevel() local
1972 lp->msg_enable = datum; in tc35815_set_msglevel()
1977 struct tc35815_local *lp = netdev_priv(dev); in tc35815_get_sset_count() local
1981 return sizeof(lp->lstats) / sizeof(int); in tc35815_get_sset_count()
1989 struct tc35815_local *lp = netdev_priv(dev); in tc35815_get_ethtool_stats() local
1990 data[0] = lp->lstats.max_tx_qlen; in tc35815_get_ethtool_stats()
1991 data[1] = lp->lstats.tx_ints; in tc35815_get_ethtool_stats()
1992 data[2] = lp->lstats.rx_ints; in tc35815_get_ethtool_stats()
1993 data[3] = lp->lstats.tx_underrun; in tc35815_get_ethtool_stats()
2066 struct tc35815_local *lp = netdev_priv(dev); in tc35815_chip_init() local
2079 if (HAVE_DMA_RXALIGN(lp)) in tc35815_chip_init()
2088 tc_writel(fd_virt_to_bus(lp, lp->rfd_base), &tr->FDA_Bas); in tc35815_chip_init()
2089 tc_writel((unsigned long)lp->rfd_limit - (unsigned long)lp->rfd_base, in tc35815_chip_init()
2096 tc_writel(fd_virt_to_bus(lp, lp->fbl_ptr), &tr->BLFrmPtr); /* start DMA receiver */ in tc35815_chip_init()
2101 if (lp->chiptype == TC35815_TX4939) in tc35815_chip_init()
2104 if (!dev->phydev || !lp->link || lp->duplex == DUPLEX_FULL) in tc35815_chip_init()
2113 struct tc35815_local *lp = netdev_priv(dev); in tc35815_suspend() local
2122 spin_lock_irqsave(&lp->lock, flags); in tc35815_suspend()
2124 spin_unlock_irqrestore(&lp->lock, flags); in tc35815_suspend()