Lines Matching refs:tx_ring
326 static int xgene_enet_setup_tx_desc(struct xgene_enet_desc_ring *tx_ring, in xgene_enet_setup_tx_desc() argument
329 struct device *dev = ndev_to_dev(tx_ring->ndev); in xgene_enet_setup_tx_desc()
330 struct xgene_enet_pdata *pdata = netdev_priv(tx_ring->ndev); in xgene_enet_setup_tx_desc()
335 u16 tail = tx_ring->tail; in xgene_enet_setup_tx_desc()
344 raw_desc = &tx_ring->raw_desc[tail]; in xgene_enet_setup_tx_desc()
345 tail = (tail + 1) & (tx_ring->slots - 1); in xgene_enet_setup_tx_desc()
352 raw_desc->m3 = cpu_to_le64(SET_VAL(HENQNUM, tx_ring->dst_ring_num) | in xgene_enet_setup_tx_desc()
360 netdev_err(tx_ring->ndev, "DMA mapping error\n"); in xgene_enet_setup_tx_desc()
374 exp_desc = (void *)&tx_ring->raw_desc[tail]; in xgene_enet_setup_tx_desc()
375 tail = (tail + 1) & (tx_ring->slots - 1); in xgene_enet_setup_tx_desc()
382 frag_dma_addr = xgene_get_frag_dma_array(tx_ring); in xgene_enet_setup_tx_desc()
421 exp_bufs = xgene_enet_get_exp_bufs(tx_ring); in xgene_enet_setup_tx_desc()
461 SET_VAL(USERINFO, tx_ring->tail)); in xgene_enet_setup_tx_desc()
462 tx_ring->cp_ring->cp_skb[tx_ring->tail] = skb; in xgene_enet_setup_tx_desc()
463 pdata->tx_level[tx_ring->cp_ring->index] += count; in xgene_enet_setup_tx_desc()
464 tx_ring->tail = tail; in xgene_enet_setup_tx_desc()
473 struct xgene_enet_desc_ring *tx_ring; in xgene_enet_start_xmit() local
478 tx_ring = pdata->tx_ring[index]; in xgene_enet_start_xmit()
490 count = xgene_enet_setup_tx_desc(tx_ring, skb); in xgene_enet_start_xmit()
501 tx_ring->tx_packets++; in xgene_enet_start_xmit()
502 tx_ring->tx_bytes += skb->len; in xgene_enet_start_xmit()
504 pdata->ring_ops->wr_cmd(tx_ring, count); in xgene_enet_start_xmit()
701 ring = pdata->tx_ring[i]->cp_ring; in xgene_enet_set_irq_name()
727 ring = pdata->tx_ring[i]->cp_ring; in xgene_enet_register_irq()
757 ring = pdata->tx_ring[i]->cp_ring; in xgene_enet_free_irq()
774 napi = &pdata->tx_ring[i]->cp_ring->napi; in xgene_enet_napi_enable()
790 napi = &pdata->tx_ring[i]->cp_ring->napi; in xgene_enet_napi_disable()
869 ring = pdata->tx_ring[i]; in xgene_enet_delete_desc_rings()
875 pdata->tx_ring[i] = NULL; in xgene_enet_delete_desc_rings()
946 ring = pdata->tx_ring[i]; in xgene_enet_free_desc_rings()
1083 struct xgene_enet_desc_ring *rx_ring, *tx_ring, *cp_ring; in xgene_enet_create_desc_rings() local
1140 tx_ring = xgene_enet_create_desc_ring(ndev, ring_num++, in xgene_enet_create_desc_rings()
1143 if (!tx_ring) { in xgene_enet_create_desc_rings()
1148 size = (tx_ring->slots / 2) * sizeof(__le64) * MAX_EXP_BUFFS; in xgene_enet_create_desc_rings()
1155 tx_ring->exp_bufs = exp_bufs; in xgene_enet_create_desc_rings()
1157 pdata->tx_ring[i] = tx_ring; in xgene_enet_create_desc_rings()
1177 cp_ring->cp_skb = devm_kcalloc(dev, tx_ring->slots, in xgene_enet_create_desc_rings()
1186 cp_ring->frag_dma_addr = devm_kcalloc(dev, tx_ring->slots, in xgene_enet_create_desc_rings()
1194 tx_ring->cp_ring = cp_ring; in xgene_enet_create_desc_rings()
1195 tx_ring->dst_ring_num = xgene_enet_dst_ring_num(cp_ring); in xgene_enet_create_desc_rings()
1199 pdata->ring_ops->coalesce(pdata->tx_ring[0]); in xgene_enet_create_desc_rings()
1200 pdata->tx_qcnt_hi = pdata->tx_ring[0]->slots - 128; in xgene_enet_create_desc_rings()
1220 ring = pdata->tx_ring[i]; in xgene_enet_get_stats64()
1677 napi = &pdata->tx_ring[i]->cp_ring->napi; in xgene_enet_napi_add()