Re: [PATCH 3/5] tcm_vhost: fix the way to calc lun number

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Il 18/04/2012 09:06, zwu.kernel@xxxxxxxxx ha scritto:
> 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) {

Reviewed-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>


--
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


[Index of Archives]     [Linux SCSI]     [Kernel Newbies]     [Linux SCSI Target Infrastructure]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Device Mapper]

  Powered by Linux