mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 20:33:58 -04:00
Merge "scsi: ufs: Make crypto updates on QTI ufs"
This commit is contained in:
commit
f542d726be
3 changed files with 8 additions and 3 deletions
|
|
@ -171,7 +171,7 @@ config SCSI_UFS_BSG
|
|||
|
||||
config SCSI_UFS_CRYPTO
|
||||
bool "UFS Crypto Engine Support"
|
||||
depends on SCSI_UFSHCD && BLK_INLINE_ENCRYPTION
|
||||
depends on (SCSI_UFSHCD || SCSI_UFSHCD_QTI) && BLK_INLINE_ENCRYPTION
|
||||
help
|
||||
Enable Crypto Engine Support in UFS.
|
||||
Enabling this makes it possible for the kernel to use the crypto
|
||||
|
|
|
|||
|
|
@ -15,3 +15,4 @@ obj-$(CONFIG_SCSI_UFSHCD_QTI) += ufshcd-qti-core.o
|
|||
ufshcd-qti-core-y += ufshcd-qti.o ufs-sysfs.o
|
||||
ufshcd-qti-core-$(CONFIG_SCSI_UFS_BSG) += ufs_bsg.o
|
||||
ufshcd-core-$(CONFIG_SCSI_UFS_CRYPTO) += ufshcd-crypto.o
|
||||
ufshcd-qti-core-$(CONFIG_SCSI_UFS_CRYPTO) += ufshcd-crypto.o
|
||||
|
|
|
|||
|
|
@ -2890,12 +2890,14 @@ static int ufshcd_prepare_req_desc_hdr(struct ufshcd_lrb *lrbp,
|
|||
|
||||
/* Transfer request descriptor header fields */
|
||||
if (lrbp->crypto_enable) {
|
||||
#if IS_ENABLED(CONFIG_SCSI_UFS_CRYPTO)
|
||||
dword_0 |= UTP_REQ_DESC_CRYPTO_ENABLE_CMD;
|
||||
dword_0 |= lrbp->crypto_key_slot;
|
||||
req_desc->header.dword_1 =
|
||||
cpu_to_le32((u32)lrbp->data_unit_num);
|
||||
cpu_to_le32(lower_32_bits(lrbp->data_unit_num));
|
||||
req_desc->header.dword_3 =
|
||||
cpu_to_le32((u32)(lrbp->data_unit_num >> 32));
|
||||
cpu_to_le32(upper_32_bits(lrbp->data_unit_num));
|
||||
#endif /* CONFIG_SCSI_UFS_CRYPTO */
|
||||
} else {
|
||||
/* dword_1 and dword_3 are reserved, hence they are set to 0 */
|
||||
req_desc->header.dword_1 = 0;
|
||||
|
|
@ -3309,7 +3311,9 @@ static int ufshcd_compose_dev_cmd(struct ufs_hba *hba,
|
|||
lrbp->task_tag = tag;
|
||||
lrbp->lun = 0; /* device management cmd is not specific to any LUN */
|
||||
lrbp->intr_cmd = true; /* No interrupt aggregation */
|
||||
#if IS_ENABLED(CONFIG_SCSI_UFS_CRYPTO)
|
||||
lrbp->crypto_enable = false; /* No crypto operations */
|
||||
#endif
|
||||
hba->dev_cmd.type = cmd_type;
|
||||
|
||||
return ufshcd_comp_devman_upiu(hba, lrbp);
|
||||
|
|
|
|||
Loading…
Reference in a new issue