Lines Matching full:sg
52 if (unlikely(!buf->sg[0].data)) in mlx5_fpga_conn_map_buf()
56 buf->sg[0].dma_addr = dma_map_single(dma_device, buf->sg[0].data, in mlx5_fpga_conn_map_buf()
57 buf->sg[0].size, buf->dma_dir); in mlx5_fpga_conn_map_buf()
58 err = dma_mapping_error(dma_device, buf->sg[0].dma_addr); in mlx5_fpga_conn_map_buf()
60 mlx5_fpga_warn(conn->fdev, "DMA error on sg 0: %d\n", err); in mlx5_fpga_conn_map_buf()
65 if (!buf->sg[1].data) in mlx5_fpga_conn_map_buf()
68 buf->sg[1].dma_addr = dma_map_single(dma_device, buf->sg[1].data, in mlx5_fpga_conn_map_buf()
69 buf->sg[1].size, buf->dma_dir); in mlx5_fpga_conn_map_buf()
70 err = dma_mapping_error(dma_device, buf->sg[1].dma_addr); in mlx5_fpga_conn_map_buf()
72 mlx5_fpga_warn(conn->fdev, "DMA error on sg 1: %d\n", err); in mlx5_fpga_conn_map_buf()
73 dma_unmap_single(dma_device, buf->sg[0].dma_addr, in mlx5_fpga_conn_map_buf()
74 buf->sg[0].size, buf->dma_dir); in mlx5_fpga_conn_map_buf()
88 if (buf->sg[1].data) in mlx5_fpga_conn_unmap_buf()
89 dma_unmap_single(dma_device, buf->sg[1].dma_addr, in mlx5_fpga_conn_unmap_buf()
90 buf->sg[1].size, buf->dma_dir); in mlx5_fpga_conn_unmap_buf()
92 if (likely(buf->sg[0].data)) in mlx5_fpga_conn_unmap_buf()
93 dma_unmap_single(dma_device, buf->sg[0].dma_addr, in mlx5_fpga_conn_unmap_buf()
94 buf->sg[0].size, buf->dma_dir); in mlx5_fpga_conn_unmap_buf()
115 data->byte_count = cpu_to_be32(buf->sg[0].size); in mlx5_fpga_conn_post_recv()
117 data->addr = cpu_to_be64(buf->sg[0].dma_addr); in mlx5_fpga_conn_post_recv()
152 for (sgi = 0; sgi < ARRAY_SIZE(buf->sg); sgi++) { in mlx5_fpga_conn_post_send()
153 if (!buf->sg[sgi].data) in mlx5_fpga_conn_post_send()
155 data->byte_count = cpu_to_be32(buf->sg[sgi].size); in mlx5_fpga_conn_post_send()
157 data->addr = cpu_to_be64(buf->sg[sgi].dma_addr); in mlx5_fpga_conn_post_send()
209 buf->sg[0].data = (void *)(buf + 1); in mlx5_fpga_conn_post_recv_buf()
210 buf->sg[0].size = MLX5_FPGA_RECV_SIZE; in mlx5_fpga_conn_post_recv_buf()
257 buf->sg[0].size = be32_to_cpu(cqe->byte_cnt); in mlx5_fpga_conn_rq_cqe()
276 buf->sg[0].size); in mlx5_fpga_conn_rq_cqe()
279 buf->sg[0].size = MLX5_FPGA_RECV_SIZE; in mlx5_fpga_conn_rq_cqe()