OSDN Git Service

scsi: ufs: core: Remove ufshcd_map_desc_id_to_length()
authorArthur Simchaev <Arthur.Simchaev@wdc.com>
Sun, 11 Dec 2022 13:05:11 +0000 (15:05 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 30 Dec 2022 21:48:37 +0000 (21:48 +0000)
commit16ed9d312b42180242476d159dd2fab05129029a
treef9e1730db33421c7d2d77c45d35940ccc3739174
parent01a0d515b7d93f6f5259c0333e48ac0ed8f0aa92
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>
drivers/ufs/core/ufs_bsg.c
drivers/ufs/core/ufshcd.c