Revert "ANDROID: scsi: ufs: allow overriding the blk_crypto_profile"

This reverts the changes from
ANDROID-scsi-ufs-allow-overriding-the-blk_crypto_profile.patch.

Equivalent functionality was upstreamed in v6.11.

Bug: 162257402
Change-Id: I642e4c5bd01023c61f1177faaabcc57f474527f0
Signed-off-by: Eric Biggers <ebiggers@google.com>
This commit is contained in:
Eric Biggers
2024-07-19 19:05:01 +00:00
committed by William McVicker
parent ac296de933
commit d8ddb5c0c9
2 changed files with 3 additions and 23 deletions
+3 -7
View File
@@ -159,9 +159,6 @@ int ufshcd_hba_init_crypto_capabilities(struct ufs_hba *hba)
int err = 0;
enum blk_crypto_mode_num blk_mode_num;
if (hba->android_quirks & UFSHCD_ANDROID_QUIRK_CUSTOM_CRYPTO_PROFILE)
return 0;
/*
* Don't use crypto if either the hardware doesn't advertise the
* standard crypto capability bit *or* if the vendor specific driver
@@ -232,10 +229,9 @@ void ufshcd_init_crypto(struct ufs_hba *hba)
if (!(hba->caps & UFSHCD_CAP_CRYPTO))
return;
/* Clear all keyslots */
for (slot = 0; slot < hba->crypto_profile.num_slots; slot++)
hba->crypto_profile.ll_ops.keyslot_evict(&hba->crypto_profile,
NULL, slot);
/* Clear all keyslots - the number of keyslots is (CFGC + 1) */
for (slot = 0; slot < hba->crypto_capabilities.config_count + 1; slot++)
ufshcd_clear_keyslot(hba, slot);
}
void ufshcd_crypto_register(struct ufs_hba *hba, struct request_queue *q)
-16
View File
@@ -645,20 +645,6 @@ enum ufshcd_quirks {
UFSHCD_QUIRK_MCQ_BROKEN_RTC = 1 << 21,
};
enum ufshcd_android_quirks {
/*
* IMPORTANT: set this in hba->android_quirks, not hba->quirks!
*
* This quirk needs to be enabled if the host controller supports inline
* encryption, but it needs to initialize the crypto capabilities in a
* nonstandard way and/or it needs to override blk_crypto_ll_ops. If
* enabled, the standard code won't initialize the blk_crypto_profile;
* ufs_hba_variant_ops::init() must do it instead.
*/
UFSHCD_ANDROID_QUIRK_CUSTOM_CRYPTO_PROFILE = 1 << 0,
};
enum ufshcd_caps {
/* Allow dynamic clk gating */
UFSHCD_CAP_CLK_GATING = 1 << 0,
@@ -987,8 +973,6 @@ struct ufs_hba {
unsigned int quirks; /* Deviations from standard UFSHCI spec. */
unsigned int android_quirks; /* for UFSHCD_ANDROID_QUIRK_* flags */
/* Device deviations from standard UFS device spec. */
unsigned int dev_quirks;