summary refs log tree commit diff
path: root/drivers/scsi/ufs/ufs.h
diff options
context:
space:
mode:
authorBean Huo <beanhuo@micron.com>2020-06-03 11:19:59 +0200
committerMartin K. Petersen <martin.petersen@oracle.com>2020-06-15 23:17:49 -0400
commit72fb690eece12a344e6ce5a7c192a304fd37e04e (patch)
treeacfd9ba9177d23502d8d99707b7972e853cc30fd /drivers/scsi/ufs/ufs.h
parent7a0bf85b5e1859bfd40a07279d20edd847265702 (diff)
downloadlinux-72fb690eece12a344e6ce5a7c192a304fd37e04e.tar.gz
scsi: ufs: Add compatibility with 3.1 UFS unit descriptor length
For UFS 3.1, the normal unit descriptor is 10 bytes larger than the RPMB
unit. However, both descriptors share the same desc_idn, to cover both unit
descriptors with one length, we choose the normal unit descriptor length by
desc_index.

Link: https://lore.kernel.org/r/20200603091959.27618-6-huobean@gmail.com
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Signed-off-by: Bean Huo <beanhuo@micron.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/ufs/ufs.h')
-rw-r--r--drivers/scsi/ufs/ufs.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/scsi/ufs/ufs.h b/drivers/scsi/ufs/ufs.h
index 8770255b5dc0..250e1a905a14 100644
--- a/drivers/scsi/ufs/ufs.h
+++ b/drivers/scsi/ufs/ufs.h
@@ -63,6 +63,7 @@
 #define UFS_UPIU_MAX_UNIT_NUM_ID	0x7F
 #define UFS_MAX_LUNS		(SCSI_W_LUN_BASE + UFS_UPIU_MAX_UNIT_NUM_ID)
 #define UFS_UPIU_WLUN_ID	(1 << 7)
+#define UFS_RPMB_UNIT		0xC4
 
 /* WriteBooster buffer is available only for the logical unit from 0 to 7 */
 #define UFS_UPIU_MAX_WB_LUN_ID	8