diff --git a/drivers/scsi/ufs/ufshcd-crypto.c b/drivers/scsi/ufs/ufshcd-crypto.c index 1cfd9a327049..2c88398b03c7 100644 --- a/drivers/scsi/ufs/ufshcd-crypto.c +++ b/drivers/scsi/ufs/ufshcd-crypto.c @@ -37,9 +37,9 @@ static size_t get_keysize_bytes(enum ufs_crypto_key_size size) } } -static int ufshcd_crypto_cap_find(struct ufs_hba *hba, - enum blk_crypto_mode_num crypto_mode, - unsigned int data_unit_size) +int ufshcd_crypto_cap_find(struct ufs_hba *hba, + enum blk_crypto_mode_num crypto_mode, + unsigned int data_unit_size) { enum ufs_crypto_alg ufs_alg; u8 data_unit_mask; @@ -71,6 +71,7 @@ static int ufshcd_crypto_cap_find(struct ufs_hba *hba, return -EINVAL; } +EXPORT_SYMBOL(ufshcd_crypto_cap_find); /** * ufshcd_crypto_cfg_entry_write_key - Write a key into a crypto_cfg_entry diff --git a/drivers/scsi/ufs/ufshcd-crypto.h b/drivers/scsi/ufs/ufshcd-crypto.h index 24a587c7a94e..95f37c9f7672 100644 --- a/drivers/scsi/ufs/ufshcd-crypto.h +++ b/drivers/scsi/ufs/ufshcd-crypto.h @@ -36,6 +36,10 @@ static inline bool ufshcd_is_crypto_enabled(struct ufs_hba *hba) } /* Functions implementing UFSHCI v2.1 specification behaviour */ +int ufshcd_crypto_cap_find(struct ufs_hba *hba, + enum blk_crypto_mode_num crypto_mode, + unsigned int data_unit_size); + int ufshcd_prepare_lrbp_crypto_spec(struct ufs_hba *hba, struct scsi_cmnd *cmd, struct ufshcd_lrb *lrbp);