On Fri, 2017-02-03 at 14:40 -0800, Himanshu Madhani wrote:
> +     /* Response code and sense key */
> +     ((uint32_t *)ctio->u.status1.sense_data)[0] =
> +         cpu_to_le32((0x70 << 24) | (sense_key << 8));
> +     /* Additional sense length */
> +     ((uint32_t *)ctio->u.status1.sense_data)[1] = cpu_to_le32(0x0a);
> +     /* ASC and ASCQ */
> +     ((uint32_t *)ctio->u.status1.sense_data)[3] =
> +         cpu_to_le32((asc << 24) | (ascq << 16));

Please use put_unaligned_le32() instead of open-coding it.

>  struct qla_tgt_cmd {
> @@ -885,11 +895,25 @@ struct qla_tgt_cmd {
>       struct list_head cmd_list;
>  
>       struct atio_from_isp atio;
> -     /* t10dif */
> +
> +     /* T10-DIF */
> +#define DIF_ERR_NONE 0
> +#define DIF_ERR_GRD 1
> +#define DIF_ERR_REF 2
> +#define DIF_ERR_APP 3
> +     int8_t dif_err_code;
>       struct scatterlist *prot_sg;
>       uint32_t prot_sg_cnt;
> -     uint32_t blk_sz;
> +     uint32_t blk_sz, num_blks;
> +     uint8_t scsi_status, sense_key, asc, ascq;
> +
>       struct crc_context *ctx;
> +     uint32_t        prot_op;
> +     uint32_t        prot_type;
> +     uint8_t         *cdb;
> +     uint64_t        lba;
> +     uint16_t        a_guard, e_guard, a_app_tag, e_app_tag;
> +     uint32_t        a_ref_tag, e_ref_tag;
>  
>       uint64_t jiffies_at_alloc;
>       uint64_t jiffies_at_free;

There are already equivalents of prot_op, prot_type, cdb and lba in struct
se_cmd. I think a few weeks ago Christoph had asked you not to duplicate
se_cmd fields into struct qla_tgt_cmd?

Bart.

Reply via email to