Displaying 1 result from an estimated 1 matches for "vhost_buf_to_lun".
2020 Sep 23
0
[PATCH 5/8] vhost scsi: add lun parser helper
...; diff --git a/drivers/vhost/scsi.c b/drivers/vhost/scsi.c
> index 26d0f75..736ce19 100644
> --- a/drivers/vhost/scsi.c
> +++ b/drivers/vhost/scsi.c
> @@ -899,6 +899,11 @@ static void vhost_scsi_submission_work(struct work_struct *work)
> return ret;
> }
>
> +static u16 vhost_buf_to_lun(u8 *lun_buf)
> +{
> + return ((lun_buf[2] << 8) | lun_buf[3]) & 0x3FFF;
> +}
> +
> static void
> vhost_scsi_handle_vq(struct vhost_scsi *vs, struct vhost_virtqueue *vq)
> {
> @@ -1037,12 +1042,12 @@ static void vhost_scsi_submission_work(struct work_struct *work...