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", in tc_mii_init()
671 (lp->pci_dev->bus->number << 8) | lp->pci_dev->devfn); in tc_mii_init()
672 lp->mii_bus->priv = dev; in tc_mii_init()
673 lp->mii_bus->parent = &lp->pci_dev->dev; in tc_mii_init()
674 err = mdiobus_register(lp->mii_bus); in tc_mii_init()
683 mdiobus_unregister(lp->mii_bus); in tc_mii_init()
685 mdiobus_free(lp->mii_bus); in tc_mii_init()
706 struct tc35815_local *lp = netdev_priv(dev); in tc35815_read_plat_dev_addr() local
708 lp->pci_dev, tc35815_mac_match); in tc35815_read_plat_dev_addr()
766 struct tc35815_local *lp; in tc35815_init_one() local
783 dev = alloc_etherdev(sizeof(*lp)); in tc35815_init_one()
788 lp = netdev_priv(dev); in tc35815_init_one()
789 lp->dev = dev; in tc35815_init_one()
805 netif_napi_add(dev, &lp->napi, tc35815_poll, NAPI_WEIGHT); in tc35815_init_one()
810 INIT_WORK(&lp->restart_work, tc35815_restart_work); in tc35815_init_one()
811 spin_lock_init(&lp->lock); in tc35815_init_one()
812 spin_lock_init(&lp->rx_lock); in tc35815_init_one()
813 lp->pci_dev = pdev; in tc35815_init_one()
814 lp->chiptype = ent->driver_data; in tc35815_init_one()
816 lp->msg_enable = NETIF_MSG_TX_ERR | NETIF_MSG_HW | NETIF_MSG_DRV | NETIF_MSG_LINK; in tc35815_init_one()
856 struct tc35815_local *lp = netdev_priv(dev); in tc35815_remove_one() local
859 mdiobus_unregister(lp->mii_bus); in tc35815_remove_one()
860 mdiobus_free(lp->mii_bus); in tc35815_remove_one()
868 struct tc35815_local *lp = netdev_priv(dev); in tc35815_init_queues() local
872 if (!lp->fd_buf) { in tc35815_init_queues()
879 lp->fd_buf = dma_alloc_coherent(&lp->pci_dev->dev, in tc35815_init_queues()
881 &lp->fd_buf_dma, GFP_ATOMIC); in tc35815_init_queues()
882 if (!lp->fd_buf) in tc35815_init_queues()
885 lp->rx_skbs[i].skb = in tc35815_init_queues()
886 alloc_rxbuf_skb(dev, lp->pci_dev, in tc35815_init_queues()
887 &lp->rx_skbs[i].skb_dma); in tc35815_init_queues()
888 if (!lp->rx_skbs[i].skb) { in tc35815_init_queues()
890 free_rxbuf_skb(lp->pci_dev, in tc35815_init_queues()
891 lp->rx_skbs[i].skb, in tc35815_init_queues()
892 lp->rx_skbs[i].skb_dma); in tc35815_init_queues()
893 lp->rx_skbs[i].skb = NULL; in tc35815_init_queues()
895 dma_free_coherent(&lp->pci_dev->dev, in tc35815_init_queues()
897 lp->fd_buf, lp->fd_buf_dma); in tc35815_init_queues()
898 lp->fd_buf = NULL; in tc35815_init_queues()
903 dev->name, lp->fd_buf); in tc35815_init_queues()
907 clear_page((void *)((unsigned long)lp->fd_buf + in tc35815_init_queues()
910 fd_addr = (unsigned long)lp->fd_buf; in tc35815_init_queues()
913 lp->rfd_base = (struct RxFD *)fd_addr; in tc35815_init_queues()
916 lp->rfd_base[i].fd.FDCtl = cpu_to_le32(FD_CownsFD); in tc35815_init_queues()
917 lp->rfd_cur = lp->rfd_base; in tc35815_init_queues()
918 lp->rfd_limit = (struct RxFD *)fd_addr - (RX_FD_RESERVE + 1); in tc35815_init_queues()
921 lp->tfd_base = (struct TxFD *)fd_addr; in tc35815_init_queues()
924 lp->tfd_base[i].fd.FDNext = cpu_to_le32(fd_virt_to_bus(lp, &lp->tfd_base[i+1])); in tc35815_init_queues()
925 lp->tfd_base[i].fd.FDSystem = cpu_to_le32(0xffffffff); in tc35815_init_queues()
926 lp->tfd_base[i].fd.FDCtl = cpu_to_le32(0); in tc35815_init_queues()
928 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()
929 lp->tfd_start = 0; in tc35815_init_queues()
930 lp->tfd_end = 0; in tc35815_init_queues()
933 lp->fbl_ptr = (struct FrFD *)fd_addr; in tc35815_init_queues()
934 lp->fbl_ptr->fd.FDNext = cpu_to_le32(fd_virt_to_bus(lp, lp->fbl_ptr)); in tc35815_init_queues()
935 lp->fbl_ptr->fd.FDCtl = cpu_to_le32(RX_BUF_NUM | FD_CownsFD); in tc35815_init_queues()
941 lp->fbl_count = 0; in tc35815_init_queues()
943 if (lp->rx_skbs[i].skb) { in tc35815_init_queues()
944 if (i != lp->fbl_count) { in tc35815_init_queues()
945 lp->rx_skbs[lp->fbl_count].skb = in tc35815_init_queues()
946 lp->rx_skbs[i].skb; in tc35815_init_queues()
947 lp->rx_skbs[lp->fbl_count].skb_dma = in tc35815_init_queues()
948 lp->rx_skbs[i].skb_dma; in tc35815_init_queues()
950 lp->fbl_count++; in tc35815_init_queues()
954 if (i >= lp->fbl_count) { in tc35815_init_queues()
955 lp->fbl_ptr->bd[i].BuffData = 0; in tc35815_init_queues()
956 lp->fbl_ptr->bd[i].BDCtl = 0; in tc35815_init_queues()
959 lp->fbl_ptr->bd[i].BuffData = in tc35815_init_queues()
960 cpu_to_le32(lp->rx_skbs[i].skb_dma); in tc35815_init_queues()
962 lp->fbl_ptr->bd[i].BDCtl = in tc35815_init_queues()
968 dev->name, lp->tfd_base, lp->rfd_base, lp->fbl_ptr); in tc35815_init_queues()
975 struct tc35815_local *lp = netdev_priv(dev); in tc35815_clear_queues() local
979 u32 fdsystem = le32_to_cpu(lp->tfd_base[i].fd.FDSystem); in tc35815_clear_queues()
982 lp->tx_skbs[fdsystem].skb : NULL; in tc35815_clear_queues()
984 if (lp->tx_skbs[i].skb != skb) { in tc35815_clear_queues()
989 BUG_ON(lp->tx_skbs[i].skb != skb); in tc35815_clear_queues()
992 dma_unmap_single(&lp->pci_dev->dev, in tc35815_clear_queues()
993 lp->tx_skbs[i].skb_dma, skb->len, in tc35815_clear_queues()
995 lp->tx_skbs[i].skb = NULL; in tc35815_clear_queues()
996 lp->tx_skbs[i].skb_dma = 0; in tc35815_clear_queues()
999 lp->tfd_base[i].fd.FDSystem = cpu_to_le32(0xffffffff); in tc35815_clear_queues()
1008 struct tc35815_local *lp = netdev_priv(dev); in tc35815_free_queues() local
1011 if (lp->tfd_base) { in tc35815_free_queues()
1013 u32 fdsystem = le32_to_cpu(lp->tfd_base[i].fd.FDSystem); in tc35815_free_queues()
1016 lp->tx_skbs[fdsystem].skb : NULL; in tc35815_free_queues()
1018 if (lp->tx_skbs[i].skb != skb) { in tc35815_free_queues()
1023 BUG_ON(lp->tx_skbs[i].skb != skb); in tc35815_free_queues()
1026 dma_unmap_single(&lp->pci_dev->dev, in tc35815_free_queues()
1027 lp->tx_skbs[i].skb_dma, in tc35815_free_queues()
1030 lp->tx_skbs[i].skb = NULL; in tc35815_free_queues()
1031 lp->tx_skbs[i].skb_dma = 0; in tc35815_free_queues()
1033 lp->tfd_base[i].fd.FDSystem = cpu_to_le32(0xffffffff); in tc35815_free_queues()
1037 lp->rfd_base = NULL; in tc35815_free_queues()
1038 lp->rfd_limit = NULL; in tc35815_free_queues()
1039 lp->rfd_cur = NULL; in tc35815_free_queues()
1040 lp->fbl_ptr = NULL; in tc35815_free_queues()
1043 if (lp->rx_skbs[i].skb) { in tc35815_free_queues()
1044 free_rxbuf_skb(lp->pci_dev, lp->rx_skbs[i].skb, in tc35815_free_queues()
1045 lp->rx_skbs[i].skb_dma); in tc35815_free_queues()
1046 lp->rx_skbs[i].skb = NULL; in tc35815_free_queues()
1049 if (lp->fd_buf) { in tc35815_free_queues()
1050 dma_free_coherent(&lp->pci_dev->dev, PAGE_SIZE * FD_PAGE_NUM, in tc35815_free_queues()
1051 lp->fd_buf, lp->fd_buf_dma); in tc35815_free_queues()
1052 lp->fd_buf = NULL; in tc35815_free_queues()
1114 struct tc35815_local *lp = netdev_priv(dev); in panic_queues() local
1118 lp->tfd_base, lp->tfd_start, lp->tfd_end); in panic_queues()
1120 lp->rfd_base, lp->rfd_limit, lp->rfd_cur); in panic_queues()
1121 printk("FrFD %p\n", lp->fbl_ptr); in panic_queues()
1123 dump_txfd(&lp->tfd_base[i]); in panic_queues()
1125 int bd_count = dump_rxfd(&lp->rfd_base[i]); in panic_queues()
1128 dump_frfd(lp->fbl_ptr); in panic_queues()
1142 struct tc35815_local *lp = netdev_priv(dev); in tc35815_tx_full() local
1143 return (lp->tfd_start + 1) % TX_FD_NUM == lp->tfd_end; in tc35815_tx_full()
1148 struct tc35815_local *lp = netdev_priv(dev); in tc35815_restart() local
1157 spin_lock_bh(&lp->rx_lock); in tc35815_restart()
1158 spin_lock_irq(&lp->lock); in tc35815_restart()
1164 spin_unlock_irq(&lp->lock); in tc35815_restart()
1165 spin_unlock_bh(&lp->rx_lock); in tc35815_restart()
1172 struct tc35815_local *lp = in tc35815_restart_work() local
1174 struct net_device *dev = lp->dev; in tc35815_restart_work()
1181 struct tc35815_local *lp = netdev_priv(dev); in tc35815_schedule_restart() local
1187 spin_lock_irqsave(&lp->lock, flags); in tc35815_schedule_restart()
1190 schedule_work(&lp->restart_work); in tc35815_schedule_restart()
1191 spin_unlock_irqrestore(&lp->lock, flags); in tc35815_schedule_restart()
1218 struct tc35815_local *lp = netdev_priv(dev); in tc35815_open() local
1235 napi_enable(&lp->napi); in tc35815_open()
1238 spin_lock_irq(&lp->lock); in tc35815_open()
1240 spin_unlock_irq(&lp->lock); in tc35815_open()
1262 struct tc35815_local *lp = netdev_priv(dev); in tc35815_send_packet() local
1280 spin_lock_irqsave(&lp->lock, flags); in tc35815_send_packet()
1283 if ((lp->tfd_start + TX_FD_NUM - lp->tfd_end) % TX_FD_NUM > in tc35815_send_packet()
1287 if (netif_msg_pktdata(lp)) in tc35815_send_packet()
1290 if (lp->tx_skbs[lp->tfd_start].skb) { in tc35815_send_packet()
1295 BUG_ON(lp->tx_skbs[lp->tfd_start].skb); in tc35815_send_packet()
1297 lp->tx_skbs[lp->tfd_start].skb = skb; in tc35815_send_packet()
1298 lp->tx_skbs[lp->tfd_start].skb_dma = dma_map_single(&lp->pci_dev->dev, in tc35815_send_packet()
1304 txfd = &lp->tfd_base[lp->tfd_start]; in tc35815_send_packet()
1305 txfd->bd.BuffData = cpu_to_le32(lp->tx_skbs[lp->tfd_start].skb_dma); in tc35815_send_packet()
1307 txfd->fd.FDSystem = cpu_to_le32(lp->tfd_start); in tc35815_send_packet()
1310 if (lp->tfd_start == lp->tfd_end) { in tc35815_send_packet()
1316 if (netif_msg_tx_queued(lp)) { in tc35815_send_packet()
1320 tc_writel(fd_virt_to_bus(lp, txfd), &tr->TxFrmPtr); in tc35815_send_packet()
1323 if (netif_msg_tx_queued(lp)) { in tc35815_send_packet()
1328 lp->tfd_start = (lp->tfd_start + 1) % TX_FD_NUM; in tc35815_send_packet()
1335 if (netif_msg_tx_queued(lp)) in tc35815_send_packet()
1344 spin_unlock_irqrestore(&lp->lock, flags); in tc35815_send_packet()
1371 struct tc35815_local *lp = netdev_priv(dev); in tc35815_do_interrupt() local
1381 if (netif_msg_rx_err(lp)) in tc35815_do_interrupt()
1389 if (netif_msg_rx_err(lp)) in tc35815_do_interrupt()
1397 if (netif_msg_rx_err(lp)) in tc35815_do_interrupt()
1409 lp->lstats.rx_ints++; in tc35815_do_interrupt()
1413 lp->lstats.tx_ints++; in tc35815_do_interrupt()
1414 spin_lock_irq(&lp->lock); in tc35815_do_interrupt()
1416 spin_unlock_irq(&lp->lock); in tc35815_do_interrupt()
1430 struct tc35815_local *lp = netdev_priv(dev); in tc35815_interrupt() local
1438 if (napi_schedule_prep(&lp->napi)) in tc35815_interrupt()
1439 __napi_schedule(&lp->napi); in tc35815_interrupt()
1464 struct tc35815_local *lp = netdev_priv(dev); in tc35815_rx() local
1469 while (!((fdctl = le32_to_cpu(lp->rfd_cur->fd.FDCtl)) & FD_CownsFD)) { in tc35815_rx()
1470 int status = le32_to_cpu(lp->rfd_cur->fd.FDStat); in tc35815_rx()
1480 if (netif_msg_rx_status(lp)) in tc35815_rx()
1481 dump_rxfd(lp->rfd_cur); in tc35815_rx()
1490 cur_bd = (le32_to_cpu(lp->rfd_cur->bd[0].BDCtl) in tc35815_rx()
1497 BUG_ON(lp->rx_skbs[cur_bd].skb_dma != in tc35815_rx()
1498 (le32_to_cpu(lp->rfd_cur->bd[0].BuffData) & ~3)); in tc35815_rx()
1499 if (!lp->rx_skbs[cur_bd].skb) { in tc35815_rx()
1506 skb = lp->rx_skbs[cur_bd].skb; in tc35815_rx()
1508 lp->rx_skbs[cur_bd].skb = NULL; in tc35815_rx()
1509 dma_unmap_single(&lp->pci_dev->dev, in tc35815_rx()
1510 lp->rx_skbs[cur_bd].skb_dma, in tc35815_rx()
1512 if (!HAVE_DMA_RXALIGN(lp) && NET_IP_ALIGN != 0) in tc35815_rx()
1516 if (netif_msg_pktdata(lp)) in tc35815_rx()
1525 if (netif_msg_rx_err(lp)) in tc35815_rx()
1545 int bdctl = le32_to_cpu(lp->rfd_cur->bd[bd_count - 1].BDCtl); in tc35815_rx()
1557 lp->fbl_count--; in tc35815_rx()
1558 while (lp->fbl_count < RX_BUF_NUM) in tc35815_rx()
1561 (id + 1 + lp->fbl_count) % RX_BUF_NUM; in tc35815_rx()
1562 struct BDesc *bd = &lp->fbl_ptr->bd[curid]; in tc35815_rx()
1572 if (!lp->rx_skbs[curid].skb) { in tc35815_rx()
1573 lp->rx_skbs[curid].skb = in tc35815_rx()
1575 lp->pci_dev, in tc35815_rx()
1576 &lp->rx_skbs[curid].skb_dma); in tc35815_rx()
1577 if (!lp->rx_skbs[curid].skb) in tc35815_rx()
1579 bd->BuffData = cpu_to_le32(lp->rx_skbs[curid].skb_dma); in tc35815_rx()
1585 lp->fbl_count++; in tc35815_rx()
1591 next_rfd = fd_bus_to_virt(lp, in tc35815_rx()
1592 le32_to_cpu(lp->rfd_cur->fd.FDNext)); in tc35815_rx()
1593 if (next_rfd < lp->rfd_base || next_rfd > lp->rfd_limit) { in tc35815_rx()
1601 lp->rfd_cur->fd.FDNext = cpu_to_le32(0xdeaddead); in tc35815_rx()
1603 lp->rfd_cur->fd.FDNext = cpu_to_le32(FD_Next_EOL); in tc35815_rx()
1605 lp->rfd_cur->fd.FDCtl = cpu_to_le32(FD_CownsFD); in tc35815_rx()
1606 lp->rfd_cur++; in tc35815_rx()
1608 if (lp->rfd_cur > lp->rfd_limit) in tc35815_rx()
1609 lp->rfd_cur = lp->rfd_base; in tc35815_rx()
1611 if (lp->rfd_cur != next_rfd) in tc35815_rx()
1613 lp->rfd_cur, next_rfd); in tc35815_rx()
1622 struct tc35815_local *lp = container_of(napi, struct tc35815_local, napi); in tc35815_poll() local
1623 struct net_device *dev = lp->dev; in tc35815_poll()
1632 spin_lock(&lp->rx_lock); in tc35815_poll()
1650 spin_unlock(&lp->rx_lock); in tc35815_poll()
1665 struct tc35815_local *lp = netdev_priv(dev); in tc35815_check_tx_stat() local
1675 if (lp->chiptype == TC35815_TX4939) in tc35815_check_tx_stat()
1678 if (!lp->link || lp->duplex == DUPLEX_FULL) in tc35815_check_tx_stat()
1695 if (lp->lstats.tx_underrun < TX_THRESHOLD_KEEP_LIMIT) { in tc35815_check_tx_stat()
1696 lp->lstats.tx_underrun++; in tc35815_check_tx_stat()
1697 if (lp->lstats.tx_underrun >= TX_THRESHOLD_KEEP_LIMIT) { in tc35815_check_tx_stat()
1725 if (msg && netif_msg_tx_err(lp)) in tc35815_check_tx_stat()
1735 struct tc35815_local *lp = netdev_priv(dev); in tc35815_txdone() local
1739 txfd = &lp->tfd_base[lp->tfd_end]; in tc35815_txdone()
1740 while (lp->tfd_start != lp->tfd_end && in tc35815_txdone()
1747 if (netif_msg_tx_done(lp)) { in tc35815_txdone()
1754 lp->tx_skbs[fdsystem].skb : NULL; in tc35815_txdone()
1756 if (lp->tx_skbs[lp->tfd_end].skb != skb) { in tc35815_txdone()
1761 BUG_ON(lp->tx_skbs[lp->tfd_end].skb != skb); in tc35815_txdone()
1765 dma_unmap_single(&lp->pci_dev->dev, in tc35815_txdone()
1766 lp->tx_skbs[lp->tfd_end].skb_dma, in tc35815_txdone()
1768 lp->tx_skbs[lp->tfd_end].skb = NULL; in tc35815_txdone()
1769 lp->tx_skbs[lp->tfd_end].skb_dma = 0; in tc35815_txdone()
1774 lp->tfd_end = (lp->tfd_end + 1) % TX_FD_NUM; in tc35815_txdone()
1775 txfd = &lp->tfd_base[lp->tfd_end]; in tc35815_txdone()
1777 if ((fdnext & ~FD_Next_EOL) != fd_virt_to_bus(lp, txfd)) { in tc35815_txdone()
1784 if (lp->tfd_end != lp->tfd_start) { in tc35815_txdone()
1787 int head = (lp->tfd_start + TX_FD_NUM - 1) % TX_FD_NUM; in tc35815_txdone()
1788 struct TxFD *txhead = &lp->tfd_base[head]; in tc35815_txdone()
1789 int qlen = (lp->tfd_start + TX_FD_NUM in tc35815_txdone()
1790 - lp->tfd_end) % TX_FD_NUM; in tc35815_txdone()
1799 if (lp->lstats.max_tx_qlen < qlen) in tc35815_txdone()
1800 lp->lstats.max_tx_qlen = qlen; in tc35815_txdone()
1806 if (netif_msg_tx_queued(lp)) { in tc35815_txdone()
1811 tc_writel(fd_virt_to_bus(lp, txfd), &tr->TxFrmPtr); in tc35815_txdone()
1829 struct tc35815_local *lp = netdev_priv(dev); in tc35815_close() local
1832 napi_disable(&lp->napi); in tc35815_close()
1835 cancel_work_sync(&lp->restart_work); in tc35815_close()
1864 struct tc35815_local *lp = netdev_priv(dev); in tc35815_set_cam_entry() local
1873 if (netif_msg_hw(lp)) in tc35815_set_cam_entry()
1919 struct tc35815_local *lp = netdev_priv(dev); in tc35815_set_multicast_list() local
1921 if (!lp->link) in tc35815_set_multicast_list()
1954 struct tc35815_local *lp = netdev_priv(dev); in tc35815_get_drvinfo() local
1958 strlcpy(info->bus_info, pci_name(lp->pci_dev), sizeof(info->bus_info)); in tc35815_get_drvinfo()
1963 struct tc35815_local *lp = netdev_priv(dev); in tc35815_get_msglevel() local
1964 return lp->msg_enable; in tc35815_get_msglevel()
1969 struct tc35815_local *lp = netdev_priv(dev); in tc35815_set_msglevel() local
1970 lp->msg_enable = datum; in tc35815_set_msglevel()
1975 struct tc35815_local *lp = netdev_priv(dev); in tc35815_get_sset_count() local
1979 return sizeof(lp->lstats) / sizeof(int); in tc35815_get_sset_count()
1987 struct tc35815_local *lp = netdev_priv(dev); in tc35815_get_ethtool_stats() local
1988 data[0] = lp->lstats.max_tx_qlen; in tc35815_get_ethtool_stats()
1989 data[1] = lp->lstats.tx_ints; in tc35815_get_ethtool_stats()
1990 data[2] = lp->lstats.rx_ints; in tc35815_get_ethtool_stats()
1991 data[3] = lp->lstats.tx_underrun; in tc35815_get_ethtool_stats()
2064 struct tc35815_local *lp = netdev_priv(dev); in tc35815_chip_init() local
2077 if (HAVE_DMA_RXALIGN(lp)) in tc35815_chip_init()
2086 tc_writel(fd_virt_to_bus(lp, lp->rfd_base), &tr->FDA_Bas); in tc35815_chip_init()
2087 tc_writel((unsigned long)lp->rfd_limit - (unsigned long)lp->rfd_base, in tc35815_chip_init()
2094 tc_writel(fd_virt_to_bus(lp, lp->fbl_ptr), &tr->BLFrmPtr); /* start DMA receiver */ in tc35815_chip_init()
2099 if (lp->chiptype == TC35815_TX4939) in tc35815_chip_init()
2102 if (!dev->phydev || !lp->link || lp->duplex == DUPLEX_FULL) in tc35815_chip_init()
2111 struct tc35815_local *lp = netdev_priv(dev); in tc35815_suspend() local
2120 spin_lock_irqsave(&lp->lock, flags); in tc35815_suspend()
2122 spin_unlock_irqrestore(&lp->lock, flags); in tc35815_suspend()