From: Zhi Yong Wu <wuzhy@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Zhi Yong Wu <wuzhy@xxxxxxxxxxxxxxxxxx>
---
drivers/target/tcm_vhost/tcm_vhost_scsi.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/target/tcm_vhost/tcm_vhost_scsi.c b/drivers/target/tcm_vhost/tcm_vhost_scsi.c
index dbe1baa..cd8ff54 100644
--- a/drivers/target/tcm_vhost/tcm_vhost_scsi.c
+++ b/drivers/target/tcm_vhost/tcm_vhost_scsi.c
@@ -391,9 +391,10 @@ static void vhost_scsi_handle_vq(struct vhost_scsi *vs)
scsi_command_size(tv_cmd->tvc_cdb), TCM_VHOST_MAX_CDB_SIZE);
break; /* TODO */
}
- lun = scsilun_to_int((struct scsi_lun *)&v_req.lun[0]);
- printk("vhost_scsi got command opcode: %#02x, lun: %d\n",
+ lun = ((v_req.lun[2] << 8) | v_req.lun[3]) & 0x3FFF;
+
+ pr_err("vhost_scsi got command opcode: %#02x, lun: %d\n",
tv_cmd->tvc_cdb[0], lun);
if (data_direction != DMA_NONE) {
--
1.7.6
--
To unsubscribe from this list: send the line "unsubscribe target-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Linux SCSI]
[Kernel Newbies]
[Linux SCSI Target Infrastructure]
[Share Photos]
[IDE]
[Security]
[Git]
[Netfilter]
[Bugtraq]
[Photos]
[Yosemite]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Linux ATA RAID]
[Linux IIO]
[Samba]
[Video 4 Linux]
[Device Mapper]
[Linux Resources]