scsi: ufs: Factor out ufshcd_read_desc_param
authorPotomski, MichalX <michalx.potomski@intel.com>
Thu, 23 Feb 2017 09:05:30 +0000 (09:05 +0000)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 2 Mar 2017 02:43:22 +0000 (21:43 -0500)
commita4b0e8a4e92b1baa860e744847fbdb84a50a5071
tree1115dc2408e1ce9264b07c22a7c296849ef45aae
parent6f8830f5bbab16e54f261de187f3df4644a5b977
scsi: ufs: Factor out ufshcd_read_desc_param

Since in UFS 2.1 specification some of the descriptor lengths differs
from 2.0 specification and some devices, which are reporting spec
version 2.0 have different descriptor lengths we can not rely on
hardcoded values taken from 2.0 specification. This patch introduces
reading these lengths per each device from descriptor headers at probe
time to ensure their correctness.

Signed-off-by: Michal' Potomski <michalx.potomski@intel.com>
Reviewed-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/ufs/ufs.h
drivers/scsi/ufs/ufshcd.c
drivers/scsi/ufs/ufshcd.h