Loading drivers/scsi/ufs/Kconfig +1 −1 Original line number Diff line number Diff line Loading @@ -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 Loading drivers/scsi/ufs/Makefile +1 −0 Original line number Diff line number Diff line Loading @@ -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 drivers/scsi/ufs/ufshcd-qti.c +6 −2 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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 Loading
drivers/scsi/ufs/Kconfig +1 −1 Original line number Diff line number Diff line Loading @@ -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 Loading
drivers/scsi/ufs/Makefile +1 −0 Original line number Diff line number Diff line Loading @@ -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
drivers/scsi/ufs/ufshcd-qti.c +6 −2 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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