Lines Matching refs:gpd

81 static void t7xx_cldma_gpd_set_data_ptr(struct cldma_gpd *gpd, dma_addr_t data_ptr)  in t7xx_cldma_gpd_set_data_ptr()  argument
83 gpd->data_buff_bd_ptr_h = cpu_to_le32(upper_32_bits(data_ptr)); in t7xx_cldma_gpd_set_data_ptr()
84 gpd->data_buff_bd_ptr_l = cpu_to_le32(lower_32_bits(data_ptr)); in t7xx_cldma_gpd_set_data_ptr()
87 static void t7xx_cldma_gpd_set_next_ptr(struct cldma_gpd *gpd, dma_addr_t next_ptr) in t7xx_cldma_gpd_set_next_ptr() argument
89 gpd->next_gpd_ptr_h = cpu_to_le32(upper_32_bits(next_ptr)); in t7xx_cldma_gpd_set_next_ptr()
90 gpd->next_gpd_ptr_l = cpu_to_le32(lower_32_bits(next_ptr)); in t7xx_cldma_gpd_set_next_ptr()
125 struct cldma_gpd *gpd; in t7xx_cldma_gpd_rx_from_q() local
133 gpd = req->gpd; in t7xx_cldma_gpd_rx_from_q()
134 if ((gpd->flags & GPD_FLAGS_HWO) || !req->skb) { in t7xx_cldma_gpd_rx_from_q()
162 skb_put(skb, le16_to_cpu(gpd->data_buff_len)); in t7xx_cldma_gpd_rx_from_q()
170 t7xx_cldma_gpd_set_data_ptr(gpd, 0); in t7xx_cldma_gpd_rx_from_q()
181 gpd = req->gpd; in t7xx_cldma_gpd_rx_from_q()
182 t7xx_cldma_gpd_set_data_ptr(gpd, req->mapped_buff); in t7xx_cldma_gpd_rx_from_q()
183 gpd->data_buff_len = 0; in t7xx_cldma_gpd_rx_from_q()
184 gpd->flags = GPD_FLAGS_IOC | GPD_FLAGS_HWO; in t7xx_cldma_gpd_rx_from_q()
263 struct cldma_gpd *gpd; in t7xx_cldma_gpd_tx_collect() local
275 gpd = req->gpd; in t7xx_cldma_gpd_tx_collect()
276 if ((gpd->flags & GPD_FLAGS_HWO) || !req->skb) { in t7xx_cldma_gpd_tx_collect()
282 dma_len = le16_to_cpu(gpd->data_buff_len); in t7xx_cldma_gpd_tx_collect()
314 pending_gpd = (req->gpd->flags & GPD_FLAGS_HWO) && req->skb; in t7xx_cldma_txq_empty_hndl()
384 if (req_cur->gpd) in t7xx_cldma_ring_free()
385 dma_pool_free(md_ctrl->gpd_dmapool, req_cur->gpd, req_cur->gpd_addr); in t7xx_cldma_ring_free()
401 req->gpd = dma_pool_zalloc(md_ctrl->gpd_dmapool, GFP_KERNEL, &req->gpd_addr); in t7xx_alloc_rx_request()
402 if (!req->gpd) in t7xx_alloc_rx_request()
412 dma_pool_free(md_ctrl->gpd_dmapool, req->gpd, req->gpd_addr); in t7xx_alloc_rx_request()
423 struct cldma_gpd *gpd; in t7xx_cldma_rx_ring_init() local
436 gpd = req->gpd; in t7xx_cldma_rx_ring_init()
437 t7xx_cldma_gpd_set_data_ptr(gpd, req->mapped_buff); in t7xx_cldma_rx_ring_init()
438 gpd->rx_data_allow_len = cpu_to_le16(ring->pkt_size); in t7xx_cldma_rx_ring_init()
439 gpd->flags = GPD_FLAGS_IOC | GPD_FLAGS_HWO; in t7xx_cldma_rx_ring_init()
446 t7xx_cldma_gpd_set_next_ptr(gpd, req->gpd_addr); in t7xx_cldma_rx_ring_init()
447 gpd = req->gpd; in t7xx_cldma_rx_ring_init()
461 req->gpd = dma_pool_zalloc(md_ctrl->gpd_dmapool, GFP_KERNEL, &req->gpd_addr); in t7xx_alloc_tx_request()
462 if (!req->gpd) { in t7xx_alloc_tx_request()
473 struct cldma_gpd *gpd; in t7xx_cldma_tx_ring_init() local
486 gpd = req->gpd; in t7xx_cldma_tx_ring_init()
487 gpd->flags = GPD_FLAGS_IOC; in t7xx_cldma_tx_ring_init()
494 t7xx_cldma_gpd_set_next_ptr(gpd, req->gpd_addr); in t7xx_cldma_tx_ring_init()
495 gpd = req->gpd; in t7xx_cldma_tx_ring_init()
763 struct cldma_gpd *gpd; in t7xx_cldma_clear_txq() local
769 gpd = req->gpd; in t7xx_cldma_clear_txq()
770 gpd->flags &= ~GPD_FLAGS_HWO; in t7xx_cldma_clear_txq()
771 t7xx_cldma_gpd_set_data_ptr(gpd, 0); in t7xx_cldma_clear_txq()
772 gpd->data_buff_len = 0; in t7xx_cldma_clear_txq()
783 struct cldma_gpd *gpd; in t7xx_cldma_clear_rxq() local
790 gpd = req->gpd; in t7xx_cldma_clear_rxq()
791 gpd->flags = GPD_FLAGS_IOC | GPD_FLAGS_HWO; in t7xx_cldma_clear_rxq()
792 gpd->data_buff_len = 0; in t7xx_cldma_clear_rxq()
808 t7xx_cldma_gpd_set_data_ptr(req->gpd, req->mapped_buff); in t7xx_cldma_clear_rxq()
848 struct cldma_gpd *gpd = tx_req->gpd; in t7xx_cldma_gpd_handle_tx_request() local
859 t7xx_cldma_gpd_set_data_ptr(gpd, tx_req->mapped_buff); in t7xx_cldma_gpd_handle_tx_request()
860 gpd->data_buff_len = cpu_to_le16(skb->len); in t7xx_cldma_gpd_handle_tx_request()
867 gpd->flags |= GPD_FLAGS_HWO; in t7xx_cldma_gpd_handle_tx_request()