Lines Matching refs:tv_cmd
328 struct vhost_scsi_cmd *tv_cmd = container_of(se_cmd, in vhost_scsi_release_cmd_res() local
330 struct vhost_scsi_virtqueue *svq = container_of(tv_cmd->tvc_vq, in vhost_scsi_release_cmd_res()
332 struct vhost_scsi_inflight *inflight = tv_cmd->inflight; in vhost_scsi_release_cmd_res()
335 if (tv_cmd->tvc_sgl_count) { in vhost_scsi_release_cmd_res()
336 for (i = 0; i < tv_cmd->tvc_sgl_count; i++) { in vhost_scsi_release_cmd_res()
337 if (tv_cmd->copied_iov) in vhost_scsi_release_cmd_res()
338 __free_page(sg_page(&tv_cmd->tvc_sgl[i])); in vhost_scsi_release_cmd_res()
340 put_page(sg_page(&tv_cmd->tvc_sgl[i])); in vhost_scsi_release_cmd_res()
342 kfree(tv_cmd->saved_iter_addr); in vhost_scsi_release_cmd_res()
344 if (tv_cmd->tvc_prot_sgl_count) { in vhost_scsi_release_cmd_res()
345 for (i = 0; i < tv_cmd->tvc_prot_sgl_count; i++) in vhost_scsi_release_cmd_res()
346 put_page(sg_page(&tv_cmd->tvc_prot_sgl[i])); in vhost_scsi_release_cmd_res()
1579 struct vhost_scsi_cmd *tv_cmd; in vhost_scsi_destroy_vq_cmds() local
1586 tv_cmd = &svq->scsi_cmds[i]; in vhost_scsi_destroy_vq_cmds()
1588 kfree(tv_cmd->tvc_sgl); in vhost_scsi_destroy_vq_cmds()
1589 kfree(tv_cmd->tvc_prot_sgl); in vhost_scsi_destroy_vq_cmds()
1590 kfree(tv_cmd->tvc_upages); in vhost_scsi_destroy_vq_cmds()
1591 kfree(tv_cmd->tvc_resp_iov); in vhost_scsi_destroy_vq_cmds()
1603 struct vhost_scsi_cmd *tv_cmd; in vhost_scsi_setup_vq_cmds() local
1614 svq->scsi_cmds = kcalloc(max_cmds, sizeof(*tv_cmd), GFP_KERNEL); in vhost_scsi_setup_vq_cmds()
1621 tv_cmd = &svq->scsi_cmds[i]; in vhost_scsi_setup_vq_cmds()
1623 tv_cmd->tvc_sgl = kcalloc(VHOST_SCSI_PREALLOC_SGLS, in vhost_scsi_setup_vq_cmds()
1626 if (!tv_cmd->tvc_sgl) { in vhost_scsi_setup_vq_cmds()
1631 tv_cmd->tvc_upages = kcalloc(VHOST_SCSI_PREALLOC_UPAGES, in vhost_scsi_setup_vq_cmds()
1634 if (!tv_cmd->tvc_upages) { in vhost_scsi_setup_vq_cmds()
1639 tv_cmd->tvc_resp_iov = kcalloc(UIO_MAXIOV, in vhost_scsi_setup_vq_cmds()
1642 if (!tv_cmd->tvc_resp_iov) { in vhost_scsi_setup_vq_cmds()
1647 tv_cmd->tvc_prot_sgl = kcalloc(VHOST_SCSI_PREALLOC_PROT_SGLS, in vhost_scsi_setup_vq_cmds()
1650 if (!tv_cmd->tvc_prot_sgl) { in vhost_scsi_setup_vq_cmds()