Lines Matching defs:txr
1431 struct fbnic_ring *txr)
1433 struct fbnic_queue_stats *stats = &txr->stats;
1464 struct fbnic_ring *txr)
1466 if (!(txr->flags & FBNIC_RING_F_STATS))
1469 fbnic_aggregate_ring_tx_counters(fbn, txr);
1472 WARN_ON(fbn->tx[txr->q_idx] && fbn->tx[txr->q_idx] != txr);
1473 fbn->tx[txr->q_idx] = NULL;
1830 struct fbnic_ring *txr)
1836 size = ALIGN(array_size(sizeof(*txr->desc), fbn->txq_size), 4096);
1838 txr->desc = dma_alloc_coherent(dev, size, &txr->dma,
1840 if (!txr->desc)
1844 txr->size_mask = fbn->txq_size - 1;
1845 txr->size = size;
1850 static int fbnic_alloc_tx_ring_buffer(struct fbnic_ring *txr)
1852 size_t size = array_size(sizeof(*txr->tx_buf), txr->size_mask + 1);
1854 txr->tx_buf = kvzalloc(size, GFP_KERNEL | __GFP_NOWARN);
1856 return txr->tx_buf ? 0 : -ENOMEM;
1860 struct fbnic_ring *txr)
1865 if (txr->flags & FBNIC_RING_F_DISABLED)
1868 err = fbnic_alloc_tx_ring_desc(fbn, txr);
1872 if (!(txr->flags & FBNIC_RING_F_CTX))
1875 err = fbnic_alloc_tx_ring_buffer(txr);
1882 fbnic_free_ring_resources(dev, txr);
2179 static void fbnic_disable_twq0(struct fbnic_ring *txr)
2181 u32 twq_ctl = fbnic_ring_rd32(txr, FBNIC_QUEUE_TWQ0_CTL);
2185 fbnic_ring_wr32(txr, FBNIC_QUEUE_TWQ0_CTL, twq_ctl);
2188 static void fbnic_disable_twq1(struct fbnic_ring *txr)
2190 u32 twq_ctl = fbnic_ring_rd32(txr, FBNIC_QUEUE_TWQ1_CTL);
2194 fbnic_ring_wr32(txr, FBNIC_QUEUE_TWQ1_CTL, twq_ctl);
2197 static void fbnic_disable_tcq(struct fbnic_ring *txr)
2199 fbnic_ring_wr32(txr, FBNIC_QUEUE_TCQ_CTL, 0);
2200 fbnic_ring_wr32(txr, FBNIC_QUEUE_TIM_MASK, FBNIC_QUEUE_TIM_MASK_MASK);