public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Jiaming Li <lijiaming3@xiaomi.corp-partner.google.com>
To: alim.akhtar@samsung.com, avri.altman@wdc.com, bvanassche@acm.org
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	lijiaming3 <lijiaming3@xiaomi.com>
Subject: [RESEND PATCH 1/4] scsi:ufs:remove sanity check
Date: Wed,  2 Nov 2022 13:30:55 +0800	[thread overview]
Message-ID: <20221102053058.21021-2-lijiaming3@xiaomi.corp-partner.google.com> (raw)
In-Reply-To: <20221102053058.21021-1-lijiaming3@xiaomi.corp-partner.google.com>

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

Signed-off-by: lijiaming3 <lijiaming3@xiaomi.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


  reply	other threads:[~2022-11-02  5:31 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-02  5:30 [RESEND PATCH 0/4] Implement File-Based optimization functionality Jiaming Li
2022-11-02  5:30 ` Jiaming Li [this message]
2022-11-02  7:23   ` [RESEND PATCH 1/4] scsi:ufs:remove sanity check Avri Altman
2022-11-02  5:30 ` [RESEND PATCH 2/4] scsi:ufs:add File-Based Optimization descriptor Jiaming Li
2022-11-02  7:46   ` Avri Altman
2022-11-02  5:30 ` [RESEND PATCH 3/4] scsi:ufs:add FBO module Jiaming Li
2022-11-02  8:11   ` Avri Altman
2022-11-14 21:21   ` kernel test robot
2022-11-02  5:30 ` [RESEND PATCH 4/4] scsi:ufs:add fbo functionality Jiaming Li
2022-11-02  8:53   ` Avri Altman
2022-11-02 20:26   ` kernel test robot
2022-11-02  8:47 ` [RESEND PATCH 0/4] Implement File-Based optimization functionality Christoph Hellwig
2022-11-03  6:11   ` Juhyung Park
2022-11-04 12:37     ` Matias Bjørling
2022-11-05  5:22       ` Juhyung Park
2022-11-09 12:31     ` Christoph Hellwig
2022-11-02 15:24 ` Bart Van Assche

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221102053058.21021-2-lijiaming3@xiaomi.corp-partner.google.com \
    --to=lijiaming3@xiaomi.corp-partner.google.com \
    --cc=alim.akhtar@samsung.com \
    --cc=avri.altman@wdc.com \
    --cc=bvanassche@acm.org \
    --cc=lijiaming3@xiaomi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox