Lines Matching refs:dma_buf

206 	struct csio_dma_buf *dma_buf;  in csio_scsi_init_cmd_wr()  local
222 dma_buf = &req->dma_buf; in csio_scsi_init_cmd_wr()
225 wr->rsp_dmalen = cpu_to_be32(dma_buf->len); in csio_scsi_init_cmd_wr()
226 wr->rsp_dmaaddr = cpu_to_be64(dma_buf->paddr); in csio_scsi_init_cmd_wr()
298 struct csio_dma_buf *dma_buf; in csio_scsi_init_ultptx_dsgl() local
329 dma_buf = (struct csio_dma_buf *)tmp; in csio_scsi_init_ultptx_dsgl()
331 sgl->addr0 = cpu_to_be64(dma_buf->paddr); in csio_scsi_init_ultptx_dsgl()
333 min(xfer_len, dma_buf->len)); in csio_scsi_init_ultptx_dsgl()
336 sge_pair->addr[1] = cpu_to_be64(dma_buf->paddr); in csio_scsi_init_ultptx_dsgl()
338 min(xfer_len, dma_buf->len)); in csio_scsi_init_ultptx_dsgl()
341 sge_pair->addr[0] = cpu_to_be64(dma_buf->paddr); in csio_scsi_init_ultptx_dsgl()
343 min(xfer_len, dma_buf->len)); in csio_scsi_init_ultptx_dsgl()
345 xfer_len -= min(xfer_len, dma_buf->len); in csio_scsi_init_ultptx_dsgl()
366 struct csio_dma_buf *dma_buf; in csio_scsi_init_read_wr() local
381 dma_buf = &req->dma_buf; in csio_scsi_init_read_wr()
384 wr->rsp_dmalen = cpu_to_be32(dma_buf->len); in csio_scsi_init_read_wr()
385 wr->rsp_dmaaddr = cpu_to_be64(dma_buf->paddr); in csio_scsi_init_read_wr()
419 struct csio_dma_buf *dma_buf; in csio_scsi_init_write_wr() local
434 dma_buf = &req->dma_buf; in csio_scsi_init_write_wr()
437 wr->rsp_dmalen = cpu_to_be32(dma_buf->len); in csio_scsi_init_write_wr()
438 wr->rsp_dmaaddr = cpu_to_be64(dma_buf->paddr); in csio_scsi_init_write_wr()
563 struct csio_dma_buf *dma_buf = NULL; in csio_setup_ddp() local
613 dma_buf = csio_get_scsi_ddp(scsim); in csio_setup_ddp()
614 if (dma_buf == NULL || i > scsim->max_sge) { in csio_setup_ddp()
618 alloc_len += dma_buf->len; in csio_setup_ddp()
620 list_add_tail(&dma_buf->list, &req->gen_list); in csio_setup_ddp()
1504 struct csio_dma_buf *dma_buf; in csio_scsi_copy_to_sgl() local
1508 dma_buf = (struct csio_dma_buf *)csio_list_next(&req->gen_list); in csio_scsi_copy_to_sgl()
1511 while (bytes_left > 0 && sg && dma_buf) { in csio_scsi_copy_to_sgl()
1512 if (buf_off >= dma_buf->len) { in csio_scsi_copy_to_sgl()
1514 dma_buf = (struct csio_dma_buf *) in csio_scsi_copy_to_sgl()
1515 csio_list_next(dma_buf); in csio_scsi_copy_to_sgl()
1525 buf_addr = dma_buf->vaddr + buf_off; in csio_scsi_copy_to_sgl()
1527 bytes_copy = min((dma_buf->len - buf_off), in csio_scsi_copy_to_sgl()
1568 struct csio_dma_buf *dma_buf; in csio_scsi_err_handler() local
1585 dma_buf = &req->dma_buf; in csio_scsi_err_handler()
1586 fcp_resp = (struct fcp_resp_with_ext *)dma_buf->vaddr; in csio_scsi_err_handler()
2020 struct csio_dma_buf *dma_buf; in csio_tm_cbfn() local
2043 dma_buf = &req->dma_buf; in csio_tm_cbfn()
2044 fcp_resp = (struct fcp_resp_with_ext *)dma_buf->vaddr; in csio_tm_cbfn()
2420 struct csio_dma_buf *dma_buf; in csio_scsim_init() local
2446 dma_buf = &ioreq->dma_buf; in csio_scsim_init()
2447 dma_buf->vaddr = dma_pool_alloc(hw->scsi_dma_pool, GFP_KERNEL, in csio_scsim_init()
2448 &dma_buf->paddr); in csio_scsim_init()
2449 if (!dma_buf->vaddr) { in csio_scsim_init()
2457 dma_buf->len = scm->proto_rsp_len; in csio_scsim_init()
2486 dma_buf = &ioreq->dma_buf; in csio_scsim_init()
2487 dma_pool_free(hw->scsi_dma_pool, dma_buf->vaddr, in csio_scsim_init()
2488 dma_buf->paddr); in csio_scsim_init()
2507 struct csio_dma_buf *dma_buf; in csio_scsim_exit() local
2517 dma_buf = &ioreq->dma_buf; in csio_scsim_exit()
2518 dma_pool_free(scm->hw->scsi_dma_pool, dma_buf->vaddr, in csio_scsim_exit()
2519 dma_buf->paddr); in csio_scsim_exit()