From: Nicholas Bellinger Date: Tue, 10 Jun 2014 08:19:38 +0000 (-0700) Subject: vhost-scsi: Include prot_bytes into expected data transfer length X-Git-Tag: v4.9.8~6240^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9f977ef7b671f6169eca78bf40f230fe84b7c7e5;p=platform%2Fkernel%2Flinux-rpi3.git vhost-scsi: Include prot_bytes into expected data transfer length This patch updates vhost_scsi_get_tag() to accept the combined expected data transfer length + T10 PI bytes as the value passed into target_submit_cmd(). This is required now that target-core logic in commit 14ef9200 expects to subtract se_cmd->prot_length from se_cmd->data_length. Cc: Paolo Bonzini Cc: Michael S. Tsirkin Cc: Martin K. Petersen Cc: Sagi Grimberg Signed-off-by: Nicholas Bellinger --- diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c index 667e72d..03e484f 100644 --- a/drivers/vhost/scsi.c +++ b/drivers/vhost/scsi.c @@ -1144,7 +1144,8 @@ vhost_scsi_handle_vq(struct vhost_scsi *vs, struct vhost_virtqueue *vq) } cmd = vhost_scsi_get_tag(vq, tpg, cdb, tag, lun, task_attr, - exp_data_len, data_direction); + exp_data_len + prot_bytes, + data_direction); if (IS_ERR(cmd)) { vq_err(vq, "vhost_scsi_get_tag failed %ld\n", PTR_ERR(cmd));