Lines Matching refs:ndesc

743 	int ndesc;  member
1411 while (q->queued < q->ndesc - 1) { in airoha_qdma_fill_rx_queue()
1423 q->head = (q->head + 1) % q->ndesc; in airoha_qdma_fill_rx_queue()
1498 q->tail = (q->tail + 1) % q->ndesc; in airoha_qdma_rx_process()
1554 struct airoha_qdma *qdma, int ndesc) in airoha_qdma_init_rx_queue() argument
1571 q->ndesc = ndesc; in airoha_qdma_init_rx_queue()
1574 q->entry = devm_kzalloc(eth->dev, q->ndesc * sizeof(*q->entry), in airoha_qdma_init_rx_queue()
1587 q->desc = dmam_alloc_coherent(eth->dev, q->ndesc * sizeof(*q->desc), in airoha_qdma_init_rx_queue()
1597 FIELD_PREP(RX_RING_SIZE_MASK, ndesc)); in airoha_qdma_init_rx_queue()
1599 thr = clamp(ndesc >> 3, 1, 32); in airoha_qdma_init_rx_queue()
1621 q->tail = (q->tail + 1) % q->ndesc; in airoha_qdma_cleanup_rx_queue()
1678 if (!q->ndesc) in airoha_qdma_tx_napi_poll()
1694 q->tail = (q->tail + 1) % q->ndesc; in airoha_qdma_tx_napi_poll()
1708 q->ndesc - q->queued >= q->free_thr) in airoha_qdma_tx_napi_poll()
1747 q->ndesc = size; in airoha_qdma_init_tx_queue()
1751 q->entry = devm_kzalloc(eth->dev, q->ndesc * sizeof(*q->entry), in airoha_qdma_init_tx_queue()
1756 q->desc = dmam_alloc_coherent(eth->dev, q->ndesc * sizeof(*q->desc), in airoha_qdma_init_tx_queue()
1761 for (i = 0; i < q->ndesc; i++) { in airoha_qdma_init_tx_queue()
1838 q->tail = (q->tail + 1) % q->ndesc; in airoha_qdma_cleanup_tx_queue()
1949 if (!qdma->q_tx[i].ndesc) in airoha_qdma_hw_init()
1975 if (!qdma->q_rx[i].ndesc) in airoha_qdma_hw_init()
2008 if (!qdma->q_rx[i].ndesc) in airoha_irq_handler()
2123 if (!qdma->q_rx[i].ndesc) in airoha_hw_cleanup()
2139 if (!qdma->q_tx[i].ndesc) in airoha_hw_cleanup()
2154 if (!qdma->q_rx[i].ndesc) in airoha_qdma_start_napi()
2431 if (WARN_ON_ONCE(!q->ndesc)) in airoha_dev_xmit()
2437 if (q->queued + nr_frags > q->ndesc) { in airoha_dev_xmit()
2457 index = (index + 1) % q->ndesc; in airoha_dev_xmit()
2487 if (q->ndesc - q->queued < q->free_thr) in airoha_dev_xmit()
2496 index = (q->head + i) % q->ndesc; in airoha_dev_xmit()