Lines Matching refs:txq
109 static void btintel_pcie_prepare_tx(struct txq *txq, u16 tfd_index, in btintel_pcie_prepare_tx() argument
115 tfd = &txq->tfds[tfd_index]; in btintel_pcie_prepare_tx()
118 buf = &txq->bufs[tfd_index]; in btintel_pcie_prepare_tx()
132 struct txq *txq = &data->txq; in btintel_pcie_send_sync() local
136 if (tfd_index > txq->count) in btintel_pcie_send_sync()
142 btintel_pcie_prepare_tx(txq, tfd_index, skb); in btintel_pcie_send_sync()
144 tfd_index = (tfd_index + 1) % txq->count; in btintel_pcie_send_sync()
341 struct txq *txq; in btintel_pcie_msix_tx_handle() local
350 txq = &data->txq; in btintel_pcie_msix_tx_handle()
356 urbd0 = &txq->urbd0s[cr_tia]; in btintel_pcie_msix_tx_handle()
358 if (urbd0->tfd_index > txq->count) in btintel_pcie_msix_tx_handle()
361 cr_tia = (cr_tia + 1) % txq->count; in btintel_pcie_msix_tx_handle()
767 ci->addr_urbdq0 = data->txq.urbd0s_p_addr; in btintel_pcie_init_ci()
768 ci->addr_tfdq = data->txq.tfds_p_addr; in btintel_pcie_init_ci()
769 ci->num_tfdq = data->txq.count; in btintel_pcie_init_ci()
770 ci->num_urbdq0 = data->txq.count; in btintel_pcie_init_ci()
783 struct txq *txq) in btintel_pcie_free_txq_bufs() argument
786 dma_free_coherent(&data->pdev->dev, txq->count * BTINTEL_PCIE_BUFFER_SIZE, in btintel_pcie_free_txq_bufs()
787 txq->buf_v_addr, txq->buf_p_addr); in btintel_pcie_free_txq_bufs()
788 kfree(txq->bufs); in btintel_pcie_free_txq_bufs()
792 struct txq *txq) in btintel_pcie_setup_txq_bufs() argument
798 txq->bufs = kmalloc_array(txq->count, sizeof(*buf), GFP_KERNEL); in btintel_pcie_setup_txq_bufs()
799 if (!txq->bufs) in btintel_pcie_setup_txq_bufs()
805 txq->buf_v_addr = dma_alloc_coherent(&data->pdev->dev, in btintel_pcie_setup_txq_bufs()
806 txq->count * BTINTEL_PCIE_BUFFER_SIZE, in btintel_pcie_setup_txq_bufs()
807 &txq->buf_p_addr, in btintel_pcie_setup_txq_bufs()
809 if (!txq->buf_v_addr) { in btintel_pcie_setup_txq_bufs()
810 kfree(txq->bufs); in btintel_pcie_setup_txq_bufs()
817 for (i = 0; i < txq->count; i++) { in btintel_pcie_setup_txq_bufs()
818 buf = &txq->bufs[i]; in btintel_pcie_setup_txq_bufs()
819 buf->data_p_addr = txq->buf_p_addr + (i * BTINTEL_PCIE_BUFFER_SIZE); in btintel_pcie_setup_txq_bufs()
820 buf->data = txq->buf_v_addr + (i * BTINTEL_PCIE_BUFFER_SIZE); in btintel_pcie_setup_txq_bufs()
894 btintel_pcie_free_txq_bufs(data, &data->txq); in btintel_pcie_free()
948 data->txq.count = BTINTEL_DESCS_COUNT; in btintel_pcie_alloc()
952 data->txq.tfds_p_addr = p_addr; in btintel_pcie_alloc()
953 data->txq.tfds = v_addr; in btintel_pcie_alloc()
959 data->txq.urbd0s_p_addr = p_addr; in btintel_pcie_alloc()
960 data->txq.urbd0s = v_addr; in btintel_pcie_alloc()
980 err = btintel_pcie_setup_txq_bufs(data, &data->txq); in btintel_pcie_alloc()
1005 btintel_pcie_free_txq_bufs(data, &data->txq); in btintel_pcie_alloc()