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. And future descriptors no longer follow this assumption. So remove this as preparation of introducing the FBO descriptor. Signed-off-by: lijiaming3 <lijiaming3@xxxxxxxxxx> --- 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