diff options
author | Arthur Simchaev <Arthur.Simchaev@wdc.com> | 2022-12-11 16:05:11 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2022-12-31 00:48:37 +0300 |
commit | 16ed9d312b42180242476d159dd2fab05129029a (patch) | |
tree | f9e1730db33421c7d2d77c45d35940ccc3739174 /drivers/ufs/core/ufs_bsg.c | |
parent | 01a0d515b7d93f6f5259c0333e48ac0ed8f0aa92 (diff) | |
download | linux-16ed9d312b42180242476d159dd2fab05129029a.tar.xz |
scsi: ufs: core: Remove ufshcd_map_desc_id_to_length()
There shouldn't be any restriction of the descriptor size (not the
descriptor id for that matter) up to QUERY_DESC_MAX_SIZE. According to the
spec, the caller can use any descriptor size, and it is up to the device to
return the actual size. Therefore there shouldn't be any sizes hardcoded
in the kernel, nor any need to cache it, hence the
ufshcd_map_desc_id_to_length() function is redundant. Always read the
descriptors with QUERY_DESC_MAX_SIZE size.
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Bean Huo <beanhuo@micron.com>
Suggested-by: Bean Huo <beanhuo@micron.com>
Signed-off-by: Arthur Simchaev <Arthur.Simchaev@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/ufs/core/ufs_bsg.c')
-rw-r--r-- | drivers/ufs/core/ufs_bsg.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/ufs/core/ufs_bsg.c b/drivers/ufs/core/ufs_bsg.c index 7eec38c63d9f..dc441ac8e2c4 100644 --- a/drivers/ufs/core/ufs_bsg.c +++ b/drivers/ufs/core/ufs_bsg.c @@ -16,7 +16,6 @@ static int ufs_bsg_get_query_desc_size(struct ufs_hba *hba, int *desc_len, struct utp_upiu_query *qr) { int desc_size = be16_to_cpu(qr->length); - int desc_id = qr->idn; if (desc_size <= 0) return -EINVAL; |