FROMGIT: 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> Change-Id: I7933da0b7ec3771b9faccb2c8fe05bb83f741162 Signed-off-by:
Arthur Simchaev <Arthur.Simchaev@wdc.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com> Bug: 258234315 (cherry picked from commit 16ed9d31 git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next) Signed-off-by:
Bart Van Assche <bvanassche@google.com>
Loading
Please sign in to comment