mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
Revert "ONHOLD: ANDROID: scsi: ufs: allow overriding the blk_keyslot_manager"
This temporarily reverts ONHOLD-ANDROID-scsi-ufs-allow-overriding-the-blk_keyslot_manager.patch because it needs to be reworked due to upstream refactoring. Bug: 162257402 Change-Id: Ieef7e8388d0332f32b921cbce80f4001a9aa4148 Signed-off-by: Eric Biggers <ebiggers@google.com>
This commit is contained in:
@@ -120,8 +120,7 @@ bool ufshcd_crypto_enable(struct ufs_hba *hba)
|
||||
return false;
|
||||
|
||||
/* Reset might clear all keys, so reprogram all the keys. */
|
||||
if (hba->ksm.num_slots)
|
||||
blk_ksm_reprogram_all_keys(&hba->ksm);
|
||||
blk_ksm_reprogram_all_keys(&hba->ksm);
|
||||
|
||||
if (hba->quirks & UFSHCD_QUIRK_BROKEN_CRYPTO_ENABLE)
|
||||
return false;
|
||||
@@ -162,9 +161,6 @@ int ufshcd_hba_init_crypto_capabilities(struct ufs_hba *hba)
|
||||
int err = 0;
|
||||
enum blk_crypto_mode_num blk_mode_num;
|
||||
|
||||
if (hba->quirks & UFSHCD_QUIRK_CUSTOM_KEYSLOT_MANAGER)
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* Don't use crypto if either the hardware doesn't advertise the
|
||||
* standard crypto capability bit *or* if the vendor specific driver
|
||||
@@ -233,9 +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->ksm.num_slots; slot++)
|
||||
hba->ksm.ksm_ll_ops.keyslot_evict(&hba->ksm, 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_setup_rq_keyslot_manager(struct ufs_hba *hba,
|
||||
|
||||
@@ -589,15 +589,6 @@ enum ufshcd_quirks {
|
||||
*/
|
||||
UFSHCD_QUIRK_ALIGN_SG_WITH_PAGE_SIZE = 1 << 14,
|
||||
|
||||
/*
|
||||
* 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_ksm_ll_ops. If
|
||||
* enabled, the standard code won't initialize the blk_keyslot_manager;
|
||||
* ufs_hba_variant_ops::init() must do it instead.
|
||||
*/
|
||||
UFSHCD_QUIRK_CUSTOM_KEYSLOT_MANAGER = 1 << 20,
|
||||
|
||||
/*
|
||||
* This quirk needs to be enabled if the host controller supports inline
|
||||
* encryption, but the CRYPTO_GENERAL_ENABLE bit is not implemented and
|
||||
|
||||
Reference in New Issue
Block a user