[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BL0PR04MB65648BD218A08A3D55A6D12BFC399@BL0PR04MB6564.namprd04.prod.outlook.com>
Date: Wed, 2 Nov 2022 07:23:27 +0000
From: Avri Altman <Avri.Altman@....com>
To: Jiaming Li <lijiaming3@...omi.corp-partner.google.com>,
"alim.akhtar@...sung.com" <alim.akhtar@...sung.com>,
"bvanassche@....org" <bvanassche@....org>
CC: "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
lijiaming3 <lijiaming3@...omi.com>
Subject: RE: [RESEND PATCH 1/4] scsi:ufs:remove sanity check
> From: lijiaming3 <lijiaming3@...omi.com>
>
> 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@...omi.com>
other than the nit above:
Reviewed-by: Avri Altman <avri.altman@....com>
> ---
> 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
Powered by blists - more mailing lists