[PATCH v2] mmc: host: sdhci-msm: Fix the wrapped key handling

Neeraj Soni posted 1 patch 2 months ago
drivers/mmc/host/sdhci-msm.c | 5 -----
1 file changed, 5 deletions(-)
[PATCH v2] mmc: host: sdhci-msm: Fix the wrapped key handling
Posted by Neeraj Soni 2 months ago
Inline Crypto Engine (ICE) supports wrapped key generation.
While registering crypto profile the supported key types are queried
from ICE driver. So the explicit check for RAW key is not needed.

Fixes: fd78e2b582a0 ("mmc: sdhci-msm: Add support for wrapped keys")
Signed-off-by: Neeraj Soni <neeraj.soni@oss.qualcomm.com>

---
The patch series "mmc: host: sdhci-msm: Add support for wrapped keys"
was originally discussed here: https://lore.kernel.org/all/CAPDyKFqRG1_1aYavfrA0Ss85B0kcTnjVBeqLgq8PUJUcSx5LUg@mail.gmail.com/

Changes in v2:
- Updated the commit message.
- Added the "Fixes:" tag.

Changes in v1:
- Initial changes to fix wrapped key support.
- Link to v1 https://lore.kernel.org/all/20260403105949.1007447-1-neeraj.soni@oss.qualcomm.com/
---
 drivers/mmc/host/sdhci-msm.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
index da356627d9de..df0a038269d4 100644
--- a/drivers/mmc/host/sdhci-msm.c
+++ b/drivers/mmc/host/sdhci-msm.c
@@ -1926,11 +1926,6 @@ static int sdhci_msm_ice_init(struct sdhci_msm_host *msm_host,
 	if (IS_ERR_OR_NULL(ice))
 		return PTR_ERR_OR_ZERO(ice);
 
-	if (qcom_ice_get_supported_key_type(ice) != BLK_CRYPTO_KEY_TYPE_RAW) {
-		dev_warn(dev, "Wrapped keys not supported. Disabling inline encryption support.\n");
-		return 0;
-	}
-
 	msm_host->ice = ice;
 
 	/* Initialize the blk_crypto_profile */
-- 
2.34.1
Re: [PATCH v2] mmc: host: sdhci-msm: Fix the wrapped key handling
Posted by Ulf Hansson 2 months ago
On Fri, 10 Apr 2026 at 08:58, Neeraj Soni <neeraj.soni@oss.qualcomm.com> wrote:
>
> Inline Crypto Engine (ICE) supports wrapped key generation.
> While registering crypto profile the supported key types are queried
> from ICE driver. So the explicit check for RAW key is not needed.
>
> Fixes: fd78e2b582a0 ("mmc: sdhci-msm: Add support for wrapped keys")
> Signed-off-by: Neeraj Soni <neeraj.soni@oss.qualcomm.com>

Applied for next, thanks!

Kind regards
Uffe


>
> ---
> The patch series "mmc: host: sdhci-msm: Add support for wrapped keys"
> was originally discussed here: https://lore.kernel.org/all/CAPDyKFqRG1_1aYavfrA0Ss85B0kcTnjVBeqLgq8PUJUcSx5LUg@mail.gmail.com/
>
> Changes in v2:
> - Updated the commit message.
> - Added the "Fixes:" tag.
>
> Changes in v1:
> - Initial changes to fix wrapped key support.
> - Link to v1 https://lore.kernel.org/all/20260403105949.1007447-1-neeraj.soni@oss.qualcomm.com/
> ---
>  drivers/mmc/host/sdhci-msm.c | 5 -----
>  1 file changed, 5 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
> index da356627d9de..df0a038269d4 100644
> --- a/drivers/mmc/host/sdhci-msm.c
> +++ b/drivers/mmc/host/sdhci-msm.c
> @@ -1926,11 +1926,6 @@ static int sdhci_msm_ice_init(struct sdhci_msm_host *msm_host,
>         if (IS_ERR_OR_NULL(ice))
>                 return PTR_ERR_OR_ZERO(ice);
>
> -       if (qcom_ice_get_supported_key_type(ice) != BLK_CRYPTO_KEY_TYPE_RAW) {
> -               dev_warn(dev, "Wrapped keys not supported. Disabling inline encryption support.\n");
> -               return 0;
> -       }
> -
>         msm_host->ice = ice;
>
>         /* Initialize the blk_crypto_profile */
> --
> 2.34.1
>