Skip to content

Commit f2d3630

Browse files
committed
mmc: Merge branch fixes into next
Merge the mmc fixes for v6.13-rc[n] into the next branch, to allow them to get tested together with the new mmc changes that are targeted for v6.14. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2 parents 6ee5233 + 8d90a86 commit f2d3630

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

drivers/mmc/host/sdhci-msm.c

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1867,20 +1867,20 @@ static int sdhci_msm_program_key(struct cqhci_host *cq_host,
18671867
struct sdhci_msm_host *msm_host = sdhci_pltfm_priv(pltfm_host);
18681868
union cqhci_crypto_cap_entry cap;
18691869

1870+
if (!(cfg->config_enable & CQHCI_CRYPTO_CONFIGURATION_ENABLE))
1871+
return qcom_ice_evict_key(msm_host->ice, slot);
1872+
18701873
/* Only AES-256-XTS has been tested so far. */
18711874
cap = cq_host->crypto_cap_array[cfg->crypto_cap_idx];
18721875
if (cap.algorithm_id != CQHCI_CRYPTO_ALG_AES_XTS ||
18731876
cap.key_size != CQHCI_CRYPTO_KEY_SIZE_256)
18741877
return -EINVAL;
18751878

1876-
if (cfg->config_enable & CQHCI_CRYPTO_CONFIGURATION_ENABLE)
1877-
return qcom_ice_program_key(msm_host->ice,
1878-
QCOM_ICE_CRYPTO_ALG_AES_XTS,
1879-
QCOM_ICE_CRYPTO_KEY_SIZE_256,
1880-
cfg->crypto_key,
1881-
cfg->data_unit_size, slot);
1882-
else
1883-
return qcom_ice_evict_key(msm_host->ice, slot);
1879+
return qcom_ice_program_key(msm_host->ice,
1880+
QCOM_ICE_CRYPTO_ALG_AES_XTS,
1881+
QCOM_ICE_CRYPTO_KEY_SIZE_256,
1882+
cfg->crypto_key,
1883+
cfg->data_unit_size, slot);
18841884
}
18851885

18861886
#else /* CONFIG_MMC_CRYPTO */

0 commit comments

Comments
 (0)