Lines Matching refs:tv_cmd
343 struct vhost_scsi_cmd *tv_cmd = container_of(se_cmd,
345 struct vhost_scsi_virtqueue *svq = container_of(tv_cmd->tvc_vq,
347 struct vhost_scsi_inflight *inflight = tv_cmd->inflight;
350 if (tv_cmd->tvc_sgl_count) {
351 for (i = 0; i < tv_cmd->tvc_sgl_count; i++)
352 put_page(sg_page(&tv_cmd->tvc_sgl[i]));
354 if (tv_cmd->tvc_prot_sgl_count) {
355 for (i = 0; i < tv_cmd->tvc_prot_sgl_count; i++)
356 put_page(sg_page(&tv_cmd->tvc_prot_sgl[i]));
565 pr_debug("%s tv_cmd %p resid %u status %#02x\n", __func__,
1485 struct vhost_scsi_cmd *tv_cmd;
1492 tv_cmd = &svq->scsi_cmds[i];
1494 kfree(tv_cmd->tvc_sgl);
1495 kfree(tv_cmd->tvc_prot_sgl);
1496 kfree(tv_cmd->tvc_upages);
1508 struct vhost_scsi_cmd *tv_cmd;
1519 svq->scsi_cmds = kcalloc(max_cmds, sizeof(*tv_cmd), GFP_KERNEL);
1526 tv_cmd = &svq->scsi_cmds[i];
1528 tv_cmd->tvc_sgl = kcalloc(VHOST_SCSI_PREALLOC_SGLS,
1531 if (!tv_cmd->tvc_sgl) {
1532 pr_err("Unable to allocate tv_cmd->tvc_sgl\n");
1536 tv_cmd->tvc_upages = kcalloc(VHOST_SCSI_PREALLOC_UPAGES,
1539 if (!tv_cmd->tvc_upages) {
1540 pr_err("Unable to allocate tv_cmd->tvc_upages\n");
1544 tv_cmd->tvc_prot_sgl = kcalloc(VHOST_SCSI_PREALLOC_PROT_SGLS,
1547 if (!tv_cmd->tvc_prot_sgl) {
1548 pr_err("Unable to allocate tv_cmd->tvc_prot_sgl\n");