Lines Matching refs:tv_cmd
343 struct vhost_scsi_cmd *tv_cmd = container_of(se_cmd, in vhost_scsi_release_cmd_res() local
345 struct vhost_scsi_virtqueue *svq = container_of(tv_cmd->tvc_vq, in vhost_scsi_release_cmd_res()
347 struct vhost_scsi_inflight *inflight = tv_cmd->inflight; in vhost_scsi_release_cmd_res()
350 if (tv_cmd->tvc_sgl_count) { in vhost_scsi_release_cmd_res()
351 for (i = 0; i < tv_cmd->tvc_sgl_count; i++) in vhost_scsi_release_cmd_res()
352 put_page(sg_page(&tv_cmd->tvc_sgl[i])); in vhost_scsi_release_cmd_res()
354 if (tv_cmd->tvc_prot_sgl_count) { in vhost_scsi_release_cmd_res()
355 for (i = 0; i < tv_cmd->tvc_prot_sgl_count; i++) in vhost_scsi_release_cmd_res()
356 put_page(sg_page(&tv_cmd->tvc_prot_sgl[i])); in vhost_scsi_release_cmd_res()
1485 struct vhost_scsi_cmd *tv_cmd; in vhost_scsi_destroy_vq_cmds() local
1492 tv_cmd = &svq->scsi_cmds[i]; in vhost_scsi_destroy_vq_cmds()
1494 kfree(tv_cmd->tvc_sgl); in vhost_scsi_destroy_vq_cmds()
1495 kfree(tv_cmd->tvc_prot_sgl); in vhost_scsi_destroy_vq_cmds()
1496 kfree(tv_cmd->tvc_upages); in vhost_scsi_destroy_vq_cmds()
1508 struct vhost_scsi_cmd *tv_cmd; in vhost_scsi_setup_vq_cmds() local
1519 svq->scsi_cmds = kcalloc(max_cmds, sizeof(*tv_cmd), GFP_KERNEL); in vhost_scsi_setup_vq_cmds()
1526 tv_cmd = &svq->scsi_cmds[i]; in vhost_scsi_setup_vq_cmds()
1528 tv_cmd->tvc_sgl = kcalloc(VHOST_SCSI_PREALLOC_SGLS, in vhost_scsi_setup_vq_cmds()
1531 if (!tv_cmd->tvc_sgl) { in vhost_scsi_setup_vq_cmds()
1536 tv_cmd->tvc_upages = kcalloc(VHOST_SCSI_PREALLOC_UPAGES, in vhost_scsi_setup_vq_cmds()
1539 if (!tv_cmd->tvc_upages) { in vhost_scsi_setup_vq_cmds()
1544 tv_cmd->tvc_prot_sgl = kcalloc(VHOST_SCSI_PREALLOC_PROT_SGLS, in vhost_scsi_setup_vq_cmds()
1547 if (!tv_cmd->tvc_prot_sgl) { in vhost_scsi_setup_vq_cmds()