From 70297a8ac7a7a4a3284c2eb20fefefbe72dab338 Mon Sep 17 00:00:00 2001 From: Satya Tangirala Date: Mon, 6 Jul 2020 20:04:13 +0000 Subject: scsi: ufs: UFS crypto API Introduce functions to manipulate UFS inline encryption hardware in line with the JEDEC UFSHCI v2.1 specification and to work with the block keyslot manager. The UFS crypto API will assume by default that a vendor driver doesn't support UFS crypto, even if the hardware advertises the capability, because a lot of hardware requires some special handling that's not specified in the aforementioned JEDEC spec. Each vendor driver must explicitly set hba->caps |= UFSHCD_CAP_CRYPTO before ufshcd_hba_init_crypto_capabilities() is called to opt-in to UFS crypto support. Link: https://lore.kernel.org/r/20200706200414.2027450-3-satyat@google.com Reviewed-by: Eric Biggers Reviewed-by: Stanley Chu Reviewed-by: Alim Akhtar Signed-off-by: Satya Tangirala Signed-off-by: Martin K. Petersen --- drivers/scsi/ufs/Kconfig | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'drivers/scsi/ufs/Kconfig') diff --git a/drivers/scsi/ufs/Kconfig b/drivers/scsi/ufs/Kconfig index 3188a50dfb51..46a4542f37eb 100644 --- a/drivers/scsi/ufs/Kconfig +++ b/drivers/scsi/ufs/Kconfig @@ -172,3 +172,12 @@ config SCSI_UFS_EXYNOS Select this if you have UFS host controller on EXYNOS chipset. If unsure, say N. + +config SCSI_UFS_CRYPTO + bool "UFS Crypto Engine Support" + depends on SCSI_UFSHCD && BLK_INLINE_ENCRYPTION + help + Enable Crypto Engine Support in UFS. + Enabling this makes it possible for the kernel to use the crypto + capabilities of the UFS device (if present) to perform crypto + operations on data being transferred to/from the device. -- cgit