ANDROID: ufshcd-crypto: export cap find API
Export symbol ufshcd_crypto_cap_find to find the crypto capabilities from the crypto engine in the storage controller. This is used to validate that the crypto_mode and data_unit_size provided is supported by the inline encryption hardware. This can be used by all vops Bug: 147209885 Change-Id: I42de2d4f645adb2e4f688716434fd2884ff043bc Signed-off-by: Barani Muthukumaran <bmuthuku@codeaurora.org> Signed-off-by: Eric Biggers <ebiggers@google.com>
This commit is contained in:
committed by
Todd Kjos
parent
ba9b4932d4
commit
bb7f6203fb
@@ -37,7 +37,7 @@ static size_t get_keysize_bytes(enum ufs_crypto_key_size size)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ufshcd_crypto_cap_find(struct ufs_hba *hba,
|
int ufshcd_crypto_cap_find(struct ufs_hba *hba,
|
||||||
enum blk_crypto_mode_num crypto_mode,
|
enum blk_crypto_mode_num crypto_mode,
|
||||||
unsigned int data_unit_size)
|
unsigned int data_unit_size)
|
||||||
{
|
{
|
||||||
@@ -71,6 +71,7 @@ static int ufshcd_crypto_cap_find(struct ufs_hba *hba,
|
|||||||
|
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
EXPORT_SYMBOL(ufshcd_crypto_cap_find);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ufshcd_crypto_cfg_entry_write_key - Write a key into a crypto_cfg_entry
|
* ufshcd_crypto_cfg_entry_write_key - Write a key into a crypto_cfg_entry
|
||||||
|
|||||||
@@ -36,6 +36,10 @@ static inline bool ufshcd_is_crypto_enabled(struct ufs_hba *hba)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Functions implementing UFSHCI v2.1 specification behaviour */
|
/* 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,
|
int ufshcd_prepare_lrbp_crypto_spec(struct ufs_hba *hba,
|
||||||
struct scsi_cmnd *cmd,
|
struct scsi_cmnd *cmd,
|
||||||
struct ufshcd_lrb *lrbp);
|
struct ufshcd_lrb *lrbp);
|
||||||
|
|||||||
Reference in New Issue
Block a user