aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mmc/core.h
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2021-07-21 08:47:38 -0700
committerUlf Hansson <ulf.hansson@linaro.org>2021-08-24 10:15:32 +0200
commit86c639ce08266ed521974038f0592739fec1c11a (patch)
treebf0c3a8be814881e6174f402df9ee521de7b72d4 /include/linux/mmc/core.h
parentmmc: sdhci-esdhc-imx: Remove unneeded mmc-esdhc-imx.h header (diff)
downloadlinux-dev-86c639ce08266ed521974038f0592739fec1c11a.tar.xz
linux-dev-86c639ce08266ed521974038f0592739fec1c11a.zip
mmc: core: Store pointer to bio_crypt_ctx in mmc_request
Make 'struct mmc_request' contain a pointer to the request's 'struct bio_crypt_ctx' directly, instead of extracting a 32-bit DUN from it which is a cqhci-crypto specific detail. This keeps the cqhci crypto specific details in the cqhci module, and it makes mmc_core and mmc_block ready for MMC crypto hardware that accepts the DUN and/or key in a way that is more flexible than that which will be specified by the eMMC v5.2 standard. Exynos SoCs are an example of such hardware, as their inline encryption hardware takes keys directly (it has no concept of keyslots) and supports 128-bit DUNs. Note that the 32-bit DUN length specified by the standard is very restrictive, so it is likely that more hardware will support longer DUNs despite it not following the standard. Thus, limiting the scope of the 32-bit DUN assumption to the place that actually needs it is warranted. Signed-off-by: Eric Biggers <ebiggers@google.com> Link: https://lore.kernel.org/r/20210721154738.3966463-1-ebiggers@kernel.org Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'include/linux/mmc/core.h')
-rw-r--r--include/linux/mmc/core.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h
index ab19245e9945..71101d1ec825 100644
--- a/include/linux/mmc/core.h
+++ b/include/linux/mmc/core.h
@@ -164,9 +164,8 @@ struct mmc_request {
int tag;
#ifdef CONFIG_MMC_CRYPTO
- bool crypto_enabled;
+ const struct bio_crypt_ctx *crypto_ctx;
int crypto_key_slot;
- u32 data_unit_num;
#endif
};