Lines Matching refs: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()
768 struct tc35815_local *lp; in tc35815_init_one() local
785 dev = alloc_etherdev(sizeof(*lp)); in tc35815_init_one()
790 lp = netdev_priv(dev); in tc35815_init_one()
791 lp->dev = dev; in tc35815_init_one()
807 netif_napi_add_weight(dev, &lp->napi, tc35815_poll, NAPI_WEIGHT); in tc35815_init_one()
812 INIT_WORK(&lp->restart_work, tc35815_restart_work); in tc35815_init_one()
813 spin_lock_init(&lp->lock); in tc35815_init_one()
814 spin_lock_init(&lp->rx_lock); in tc35815_init_one()
815 lp->pci_dev = pdev; in tc35815_init_one()
816 lp->chiptype = ent->driver_data; in tc35815_init_one()
818 lp->msg_enable = NETIF_MSG_TX_ERR | NETIF_MSG_HW | NETIF_MSG_DRV | NETIF_MSG_LINK; in tc35815_init_one()
858 struct tc35815_local *lp = netdev_priv(dev); in tc35815_remove_one() local
861 mdiobus_unregister(lp->mii_bus); in tc35815_remove_one()
862 mdiobus_free(lp->mii_bus); in tc35815_remove_one()
870 struct tc35815_local *lp = netdev_priv(dev); in tc35815_init_queues() local
874 if (!lp->fd_buf) { in tc35815_init_queues()
881 lp->fd_buf = dma_alloc_coherent(&lp->pci_dev->dev, in tc35815_init_queues()
883 &lp->fd_buf_dma, GFP_ATOMIC); in tc35815_init_queues()
884 if (!lp->fd_buf) in tc35815_init_queues()
887 lp->rx_skbs[i].skb = in tc35815_init_queues()
888 alloc_rxbuf_skb(dev, lp->pci_dev, in tc35815_init_queues()
889 &lp->rx_skbs[i].skb_dma); in tc35815_init_queues()
890 if (!lp->rx_skbs[i].skb) { in tc35815_init_queues()
892 free_rxbuf_skb(lp->pci_dev, in tc35815_init_queues()
893 lp->rx_skbs[i].skb, in tc35815_init_queues()
894 lp->rx_skbs[i].skb_dma); in tc35815_init_queues()
895 lp->rx_skbs[i].skb = NULL; in tc35815_init_queues()
897 dma_free_coherent(&lp->pci_dev->dev, in tc35815_init_queues()
899 lp->fd_buf, lp->fd_buf_dma); in tc35815_init_queues()
900 lp->fd_buf = NULL; in tc35815_init_queues()
905 dev->name, lp->fd_buf); in tc35815_init_queues()
909 clear_page((void *)((unsigned long)lp->fd_buf + in tc35815_init_queues()
912 fd_addr = (unsigned long)lp->fd_buf; in tc35815_init_queues()
915 lp->rfd_base = (struct RxFD *)fd_addr; in tc35815_init_queues()
918 lp->rfd_base[i].fd.FDCtl = cpu_to_le32(FD_CownsFD); in tc35815_init_queues()
919 lp->rfd_cur = lp->rfd_base; in tc35815_init_queues()
920 lp->rfd_limit = (struct RxFD *)fd_addr - (RX_FD_RESERVE + 1); in tc35815_init_queues()
923 lp->tfd_base = (struct TxFD *)fd_addr; in tc35815_init_queues()
926 lp->tfd_base[i].fd.FDNext = cpu_to_le32(fd_virt_to_bus(lp, &lp->tfd_base[i+1])); in tc35815_init_queues()
927 lp->tfd_base[i].fd.FDSystem = cpu_to_le32(0xffffffff); in tc35815_init_queues()
928 lp->tfd_base[i].fd.FDCtl = cpu_to_le32(0); in tc35815_init_queues()
930 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()
931 lp->tfd_start = 0; in tc35815_init_queues()
932 lp->tfd_end = 0; in tc35815_init_queues()
935 lp->fbl_ptr = (struct FrFD *)fd_addr; in tc35815_init_queues()
936 lp->fbl_ptr->fd.FDNext = cpu_to_le32(fd_virt_to_bus(lp, lp->fbl_ptr)); in tc35815_init_queues()
937 lp->fbl_ptr->fd.FDCtl = cpu_to_le32(RX_BUF_NUM | FD_CownsFD); in tc35815_init_queues()
943 lp->fbl_count = 0; in tc35815_init_queues()
945 if (lp->rx_skbs[i].skb) { in tc35815_init_queues()
946 if (i != lp->fbl_count) { in tc35815_init_queues()
947 lp->rx_skbs[lp->fbl_count].skb = in tc35815_init_queues()
948 lp->rx_skbs[i].skb; in tc35815_init_queues()
949 lp->rx_skbs[lp->fbl_count].skb_dma = in tc35815_init_queues()
950 lp->rx_skbs[i].skb_dma; in tc35815_init_queues()
952 lp->fbl_count++; in tc35815_init_queues()
956 if (i >= lp->fbl_count) { in tc35815_init_queues()
957 lp->fbl_ptr->bd[i].BuffData = 0; in tc35815_init_queues()
958 lp->fbl_ptr->bd[i].BDCtl = 0; in tc35815_init_queues()
961 lp->fbl_ptr->bd[i].BuffData = in tc35815_init_queues()
962 cpu_to_le32(lp->rx_skbs[i].skb_dma); in tc35815_init_queues()
964 lp->fbl_ptr->bd[i].BDCtl = in tc35815_init_queues()
970 dev->name, lp->tfd_base, lp->rfd_base, lp->fbl_ptr); in tc35815_init_queues()
977 struct tc35815_local *lp = netdev_priv(dev); in tc35815_clear_queues() local
981 u32 fdsystem = le32_to_cpu(lp->tfd_base[i].fd.FDSystem); in tc35815_clear_queues()
984 lp->tx_skbs[fdsystem].skb : NULL; in tc35815_clear_queues()
986 if (lp->tx_skbs[i].skb != skb) { in tc35815_clear_queues()
991 BUG_ON(lp->tx_skbs[i].skb != skb); in tc35815_clear_queues()
994 dma_unmap_single(&lp->pci_dev->dev, in tc35815_clear_queues()
995 lp->tx_skbs[i].skb_dma, skb->len, in tc35815_clear_queues()
997 lp->tx_skbs[i].skb = NULL; in tc35815_clear_queues()
998 lp->tx_skbs[i].skb_dma = 0; in tc35815_clear_queues()
1001 lp->tfd_base[i].fd.FDSystem = cpu_to_le32(0xffffffff); in tc35815_clear_queues()
1010 struct tc35815_local *lp = netdev_priv(dev); in tc35815_free_queues() local
1013 if (lp->tfd_base) { in tc35815_free_queues()
1015 u32 fdsystem = le32_to_cpu(lp->tfd_base[i].fd.FDSystem); in tc35815_free_queues()
1018 lp->tx_skbs[fdsystem].skb : NULL; in tc35815_free_queues()
1020 if (lp->tx_skbs[i].skb != skb) { in tc35815_free_queues()
1025 BUG_ON(lp->tx_skbs[i].skb != skb); in tc35815_free_queues()
1028 dma_unmap_single(&lp->pci_dev->dev, in tc35815_free_queues()
1029 lp->tx_skbs[i].skb_dma, in tc35815_free_queues()
1032 lp->tx_skbs[i].skb = NULL; in tc35815_free_queues()
1033 lp->tx_skbs[i].skb_dma = 0; in tc35815_free_queues()
1035 lp->tfd_base[i].fd.FDSystem = cpu_to_le32(0xffffffff); in tc35815_free_queues()
1039 lp->rfd_base = NULL; in tc35815_free_queues()
1040 lp->rfd_limit = NULL; in tc35815_free_queues()
1041 lp->rfd_cur = NULL; in tc35815_free_queues()
1042 lp->fbl_ptr = NULL; in tc35815_free_queues()
1045 if (lp->rx_skbs[i].skb) { in tc35815_free_queues()
1046 free_rxbuf_skb(lp->pci_dev, lp->rx_skbs[i].skb, in tc35815_free_queues()
1047 lp->rx_skbs[i].skb_dma); in tc35815_free_queues()
1048 lp->rx_skbs[i].skb = NULL; in tc35815_free_queues()
1051 if (lp->fd_buf) { in tc35815_free_queues()
1052 dma_free_coherent(&lp->pci_dev->dev, PAGE_SIZE * FD_PAGE_NUM, in tc35815_free_queues()
1053 lp->fd_buf, lp->fd_buf_dma); in tc35815_free_queues()
1054 lp->fd_buf = NULL; in tc35815_free_queues()
1116 struct tc35815_local *lp = netdev_priv(dev); in panic_queues() local
1120 lp->tfd_base, lp->tfd_start, lp->tfd_end); in panic_queues()
1122 lp->rfd_base, lp->rfd_limit, lp->rfd_cur); in panic_queues()
1123 printk("FrFD %p\n", lp->fbl_ptr); in panic_queues()
1125 dump_txfd(&lp->tfd_base[i]); in panic_queues()
1127 int bd_count = dump_rxfd(&lp->rfd_base[i]); in panic_queues()
1130 dump_frfd(lp->fbl_ptr); in panic_queues()
1144 struct tc35815_local *lp = netdev_priv(dev); in tc35815_tx_full() local
1145 return (lp->tfd_start + 1) % TX_FD_NUM == lp->tfd_end; in tc35815_tx_full()
1150 struct tc35815_local *lp = netdev_priv(dev); in tc35815_restart() local
1159 spin_lock_bh(&lp->rx_lock); in tc35815_restart()
1160 spin_lock_irq(&lp->lock); in tc35815_restart()
1166 spin_unlock_irq(&lp->lock); in tc35815_restart()
1167 spin_unlock_bh(&lp->rx_lock); in tc35815_restart()
1174 struct tc35815_local *lp = in tc35815_restart_work() local
1176 struct net_device *dev = lp->dev; in tc35815_restart_work()
1183 struct tc35815_local *lp = netdev_priv(dev); in tc35815_schedule_restart() local
1189 spin_lock_irqsave(&lp->lock, flags); in tc35815_schedule_restart()
1192 schedule_work(&lp->restart_work); in tc35815_schedule_restart()
1193 spin_unlock_irqrestore(&lp->lock, flags); in tc35815_schedule_restart()
1220 struct tc35815_local *lp = netdev_priv(dev); in tc35815_open() local
1237 napi_enable(&lp->napi); in tc35815_open()
1240 spin_lock_irq(&lp->lock); in tc35815_open()
1242 spin_unlock_irq(&lp->lock); in tc35815_open()
1264 struct tc35815_local *lp = netdev_priv(dev); in tc35815_send_packet() local
1282 spin_lock_irqsave(&lp->lock, flags); in tc35815_send_packet()
1285 if ((lp->tfd_start + TX_FD_NUM - lp->tfd_end) % TX_FD_NUM > in tc35815_send_packet()
1289 if (netif_msg_pktdata(lp)) in tc35815_send_packet()
1292 if (lp->tx_skbs[lp->tfd_start].skb) { in tc35815_send_packet()
1297 BUG_ON(lp->tx_skbs[lp->tfd_start].skb); in tc35815_send_packet()
1299 lp->tx_skbs[lp->tfd_start].skb = skb; in tc35815_send_packet()
1300 lp->tx_skbs[lp->tfd_start].skb_dma = dma_map_single(&lp->pci_dev->dev, in tc35815_send_packet()
1306 txfd = &lp->tfd_base[lp->tfd_start]; in tc35815_send_packet()
1307 txfd->bd.BuffData = cpu_to_le32(lp->tx_skbs[lp->tfd_start].skb_dma); in tc35815_send_packet()
1309 txfd->fd.FDSystem = cpu_to_le32(lp->tfd_start); in tc35815_send_packet()
1312 if (lp->tfd_start == lp->tfd_end) { in tc35815_send_packet()
1318 if (netif_msg_tx_queued(lp)) { in tc35815_send_packet()
1322 tc_writel(fd_virt_to_bus(lp, txfd), &tr->TxFrmPtr); in tc35815_send_packet()
1325 if (netif_msg_tx_queued(lp)) { in tc35815_send_packet()
1330 lp->tfd_start = (lp->tfd_start + 1) % TX_FD_NUM; in tc35815_send_packet()
1337 if (netif_msg_tx_queued(lp)) in tc35815_send_packet()
1346 spin_unlock_irqrestore(&lp->lock, flags); in tc35815_send_packet()
1373 struct tc35815_local *lp = netdev_priv(dev); in tc35815_do_interrupt() local
1383 if (netif_msg_rx_err(lp)) in tc35815_do_interrupt()
1391 if (netif_msg_rx_err(lp)) in tc35815_do_interrupt()
1399 if (netif_msg_rx_err(lp)) in tc35815_do_interrupt()
1411 lp->lstats.rx_ints++; in tc35815_do_interrupt()
1415 lp->lstats.tx_ints++; in tc35815_do_interrupt()
1416 spin_lock_irq(&lp->lock); in tc35815_do_interrupt()
1418 spin_unlock_irq(&lp->lock); in tc35815_do_interrupt()
1432 struct tc35815_local *lp = netdev_priv(dev); in tc35815_interrupt() local
1440 if (napi_schedule_prep(&lp->napi)) in tc35815_interrupt()
1441 __napi_schedule(&lp->napi); in tc35815_interrupt()
1466 struct tc35815_local *lp = netdev_priv(dev); in tc35815_rx() local
1471 while (!((fdctl = le32_to_cpu(lp->rfd_cur->fd.FDCtl)) & FD_CownsFD)) { in tc35815_rx()
1472 int status = le32_to_cpu(lp->rfd_cur->fd.FDStat); in tc35815_rx()
1482 if (netif_msg_rx_status(lp)) in tc35815_rx()
1483 dump_rxfd(lp->rfd_cur); in tc35815_rx()
1492 cur_bd = (le32_to_cpu(lp->rfd_cur->bd[0].BDCtl) in tc35815_rx()
1499 BUG_ON(lp->rx_skbs[cur_bd].skb_dma != in tc35815_rx()
1500 (le32_to_cpu(lp->rfd_cur->bd[0].BuffData) & ~3)); in tc35815_rx()
1501 if (!lp->rx_skbs[cur_bd].skb) { in tc35815_rx()
1508 skb = lp->rx_skbs[cur_bd].skb; in tc35815_rx()
1510 lp->rx_skbs[cur_bd].skb = NULL; in tc35815_rx()
1511 dma_unmap_single(&lp->pci_dev->dev, in tc35815_rx()
1512 lp->rx_skbs[cur_bd].skb_dma, in tc35815_rx()
1514 if (!HAVE_DMA_RXALIGN(lp) && NET_IP_ALIGN != 0) in tc35815_rx()
1518 if (netif_msg_pktdata(lp)) in tc35815_rx()
1527 if (netif_msg_rx_err(lp)) in tc35815_rx()
1547 int bdctl = le32_to_cpu(lp->rfd_cur->bd[bd_count - 1].BDCtl); in tc35815_rx()
1559 lp->fbl_count--; in tc35815_rx()
1560 while (lp->fbl_count < RX_BUF_NUM) in tc35815_rx()
1563 (id + 1 + lp->fbl_count) % RX_BUF_NUM; in tc35815_rx()
1564 struct BDesc *bd = &lp->fbl_ptr->bd[curid]; in tc35815_rx()
1574 if (!lp->rx_skbs[curid].skb) { in tc35815_rx()
1575 lp->rx_skbs[curid].skb = in tc35815_rx()
1577 lp->pci_dev, in tc35815_rx()
1578 &lp->rx_skbs[curid].skb_dma); in tc35815_rx()
1579 if (!lp->rx_skbs[curid].skb) in tc35815_rx()
1581 bd->BuffData = cpu_to_le32(lp->rx_skbs[curid].skb_dma); in tc35815_rx()
1587 lp->fbl_count++; in tc35815_rx()
1593 next_rfd = fd_bus_to_virt(lp, in tc35815_rx()
1594 le32_to_cpu(lp->rfd_cur->fd.FDNext)); in tc35815_rx()
1595 if (next_rfd < lp->rfd_base || next_rfd > lp->rfd_limit) { in tc35815_rx()
1603 lp->rfd_cur->fd.FDNext = cpu_to_le32(0xdeaddead); in tc35815_rx()
1605 lp->rfd_cur->fd.FDNext = cpu_to_le32(FD_Next_EOL); in tc35815_rx()
1607 lp->rfd_cur->fd.FDCtl = cpu_to_le32(FD_CownsFD); in tc35815_rx()
1608 lp->rfd_cur++; in tc35815_rx()
1610 if (lp->rfd_cur > lp->rfd_limit) in tc35815_rx()
1611 lp->rfd_cur = lp->rfd_base; in tc35815_rx()
1613 if (lp->rfd_cur != next_rfd) in tc35815_rx()
1615 lp->rfd_cur, next_rfd); in tc35815_rx()
1624 struct tc35815_local *lp = container_of(napi, struct tc35815_local, napi); in tc35815_poll() local
1625 struct net_device *dev = lp->dev; in tc35815_poll()
1634 spin_lock(&lp->rx_lock); in tc35815_poll()
1652 spin_unlock(&lp->rx_lock); in tc35815_poll()
1667 struct tc35815_local *lp = netdev_priv(dev); in tc35815_check_tx_stat() local
1677 if (lp->chiptype == TC35815_TX4939) in tc35815_check_tx_stat()
1680 if (!lp->link || lp->duplex == DUPLEX_FULL) in tc35815_check_tx_stat()
1697 if (lp->lstats.tx_underrun < TX_THRESHOLD_KEEP_LIMIT) { in tc35815_check_tx_stat()
1698 lp->lstats.tx_underrun++; in tc35815_check_tx_stat()
1699 if (lp->lstats.tx_underrun >= TX_THRESHOLD_KEEP_LIMIT) { in tc35815_check_tx_stat()
1727 if (msg && netif_msg_tx_err(lp)) in tc35815_check_tx_stat()
1737 struct tc35815_local *lp = netdev_priv(dev); in tc35815_txdone() local
1741 txfd = &lp->tfd_base[lp->tfd_end]; in tc35815_txdone()
1742 while (lp->tfd_start != lp->tfd_end && in tc35815_txdone()
1749 if (netif_msg_tx_done(lp)) { in tc35815_txdone()
1756 lp->tx_skbs[fdsystem].skb : NULL; in tc35815_txdone()
1758 if (lp->tx_skbs[lp->tfd_end].skb != skb) { in tc35815_txdone()
1763 BUG_ON(lp->tx_skbs[lp->tfd_end].skb != skb); in tc35815_txdone()
1767 dma_unmap_single(&lp->pci_dev->dev, in tc35815_txdone()
1768 lp->tx_skbs[lp->tfd_end].skb_dma, in tc35815_txdone()
1770 lp->tx_skbs[lp->tfd_end].skb = NULL; in tc35815_txdone()
1771 lp->tx_skbs[lp->tfd_end].skb_dma = 0; in tc35815_txdone()
1776 lp->tfd_end = (lp->tfd_end + 1) % TX_FD_NUM; in tc35815_txdone()
1777 txfd = &lp->tfd_base[lp->tfd_end]; in tc35815_txdone()
1779 if ((fdnext & ~FD_Next_EOL) != fd_virt_to_bus(lp, txfd)) { in tc35815_txdone()
1786 if (lp->tfd_end != lp->tfd_start) { in tc35815_txdone()
1789 int head = (lp->tfd_start + TX_FD_NUM - 1) % TX_FD_NUM; in tc35815_txdone()
1790 struct TxFD *txhead = &lp->tfd_base[head]; in tc35815_txdone()
1791 int qlen = (lp->tfd_start + TX_FD_NUM in tc35815_txdone()
1792 - lp->tfd_end) % TX_FD_NUM; in tc35815_txdone()
1801 if (lp->lstats.max_tx_qlen < qlen) in tc35815_txdone()
1802 lp->lstats.max_tx_qlen = qlen; in tc35815_txdone()
1808 if (netif_msg_tx_queued(lp)) { in tc35815_txdone()
1813 tc_writel(fd_virt_to_bus(lp, txfd), &tr->TxFrmPtr); in tc35815_txdone()
1831 struct tc35815_local *lp = netdev_priv(dev); in tc35815_close() local
1834 napi_disable(&lp->napi); in tc35815_close()
1837 cancel_work_sync(&lp->restart_work); in tc35815_close()
1867 struct tc35815_local *lp = netdev_priv(dev); in tc35815_set_cam_entry() local
1876 if (netif_msg_hw(lp)) in tc35815_set_cam_entry()
1922 struct tc35815_local *lp = netdev_priv(dev); in tc35815_set_multicast_list() local
1924 if (!lp->link) in tc35815_set_multicast_list()
1957 struct tc35815_local *lp = netdev_priv(dev); in tc35815_get_drvinfo() local
1961 strscpy(info->bus_info, pci_name(lp->pci_dev), sizeof(info->bus_info)); in tc35815_get_drvinfo()
1966 struct tc35815_local *lp = netdev_priv(dev); in tc35815_get_msglevel() local
1967 return lp->msg_enable; in tc35815_get_msglevel()
1972 struct tc35815_local *lp = netdev_priv(dev); in tc35815_set_msglevel() local
1973 lp->msg_enable = datum; in tc35815_set_msglevel()
1978 struct tc35815_local *lp = netdev_priv(dev); in tc35815_get_sset_count() local
1982 return sizeof(lp->lstats) / sizeof(int); in tc35815_get_sset_count()
1990 struct tc35815_local *lp = netdev_priv(dev); in tc35815_get_ethtool_stats() local
1991 data[0] = lp->lstats.max_tx_qlen; in tc35815_get_ethtool_stats()
1992 data[1] = lp->lstats.tx_ints; in tc35815_get_ethtool_stats()
1993 data[2] = lp->lstats.rx_ints; in tc35815_get_ethtool_stats()
1994 data[3] = lp->lstats.tx_underrun; in tc35815_get_ethtool_stats()
2067 struct tc35815_local *lp = netdev_priv(dev); in tc35815_chip_init() local
2080 if (HAVE_DMA_RXALIGN(lp)) in tc35815_chip_init()
2089 tc_writel(fd_virt_to_bus(lp, lp->rfd_base), &tr->FDA_Bas); in tc35815_chip_init()
2090 tc_writel((unsigned long)lp->rfd_limit - (unsigned long)lp->rfd_base, in tc35815_chip_init()
2097 tc_writel(fd_virt_to_bus(lp, lp->fbl_ptr), &tr->BLFrmPtr); /* start DMA receiver */ in tc35815_chip_init()
2102 if (lp->chiptype == TC35815_TX4939) in tc35815_chip_init()
2105 if (!dev->phydev || !lp->link || lp->duplex == DUPLEX_FULL) in tc35815_chip_init()
2114 struct tc35815_local *lp = netdev_priv(dev); in tc35815_suspend() local
2123 spin_lock_irqsave(&lp->lock, flags); in tc35815_suspend()
2125 spin_unlock_irqrestore(&lp->lock, flags); in tc35815_suspend()