RE: [RESEND PATCH 1/4] scsi:ufs:remove sanity check

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

 



> From: lijiaming3 <lijiaming3@xxxxxxxxxx>
> 
> UFS descriptors assumed to have a 2 bytes header:
>  - Offset 0 - descriptor size
>  - Offset 1 - descriptor id
> However, the ufs spec does not mandates this, and as a matter of fact,
> QUERY_DESC_DESC_TYPE_OFFSET is not being used anymore now.
So maybe remove it from ufs.h as well?

> And future descriptors no longer follow this assumption. So remove this as
> preparation of introducing the FBO descriptor.
> 
> Signed-off-by: lijiaming3 <lijiaming3@xxxxxxxxxx>
other than the nit above:
Reviewed-by: Avri Altman <avri.altman@xxxxxxx>

> ---
>  drivers/ufs/core/ufshcd.c | 8 --------
>  1 file changed, 8 deletions(-)
> 
> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c index
> b1f59a5fe632..4bc5b8563a62 100644
> --- a/drivers/ufs/core/ufshcd.c
> +++ b/drivers/ufs/core/ufshcd.c
> @@ -3458,14 +3458,6 @@ int ufshcd_read_desc_param(struct ufs_hba
> *hba,
>                 goto out;
>         }
> 
> -       /* Sanity check */
> -       if (desc_buf[QUERY_DESC_DESC_TYPE_OFFSET] != desc_id) {
> -               dev_err(hba->dev, "%s: invalid desc_id %d in descriptor header\n",
> -                       __func__, desc_buf[QUERY_DESC_DESC_TYPE_OFFSET]);
> -               ret = -EINVAL;
> -               goto out;
> -       }
> -
>         /* Update descriptor length */
>         buff_len = desc_buf[QUERY_DESC_LENGTH_OFFSET];
>         ufshcd_update_desc_length(hba, desc_id, desc_index, buff_len);
> --
> 2.38.1





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux