[PATCH v2 0/2] Fix MMC/UFS sequence for ICE calls

From: Kuldeep Singh

Date: Thu Nov 12 2026 - 09:12:11 EST


This series fixes ICE initialization sequence where ICE is modeled as a
standalone device and referenced by storage controllers through
qcom,ice.

Currently, ICE driver enables clocks during probe and keeps them
prepared after probe completes. This keeps the ICE clock voted and
hence, any key programming call from blk-crypto succeed even when
storage driver don't have valid ice instance.

This exposes serious bug in sequencing but it works as of now because
ice clocks are voted. Storage controller should not rely on ice clock
state and rather ensure valid ice handle is available before any crypto
call is triggered.

Fixing this issue require ice instance at early ufs/emmc probe so that
correct sequence is established and ice is ready to accept key program
calls from blk-crypto or any explicit storage operation.

Validation:
Tested on shikra-evk, kodiak rb3-gen2 and sm8750-mtp.

Signed-off-by: Kuldeep Singh <kuldeep.singh@xxxxxxxxxxxxxxxx>
---
Changes in v2:
- Drop patch 3/3 and post separately once 1/2 and 2/2 are merged.
- Tag stable kernel for storage fixes.
- Link to v1: https://patch.msgid.link/20261022-qcom_ice_pm_enable-v1-0-f7a84086c651@xxxxxxxxxxxxxxxx

To: Adrian Hunter <adrian.hunter@xxxxxxxxx>
To: Ulf Hansson <ulfh@xxxxxxxxxx>
To: Abel Vesa <abelvesa@xxxxxxxxxx>
To: Manivannan Sadhasivam <mani@xxxxxxxxxx>
To: "James E.J. Bottomley" <James.Bottomley@xxxxxxxxxxxxxxxxxxxxx>
To: "Martin K. Petersen" <mkp@xxxxxxxxxx>
To: Eric Biggers <ebiggers@xxxxxxxxxx>
Cc: linux-mmc@xxxxxxxxxxxxxxx
Cc: linux-arm-msm@xxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx
Cc: linux-scsi@xxxxxxxxxxxxxxx

---
Kuldeep Singh (2):
mmc: sdhci-msm: Enable ICE before enabling crypto support
ufs: ufs-qcom: Enable ICE before enabling crypto support

drivers/mmc/host/sdhci-msm.c | 21 ++++++---------------
drivers/ufs/host/ufs-qcom.c | 29 ++++++++++++++++++++---------
2 files changed, 26 insertions(+), 24 deletions(-)
---
base-commit: aaa2f954c21b205a0bcd0961e5b2be4e82e58455
change-id: 20261022-qcom_ice_pm_enable-3c5d21b99e42

Best regards,
--
Kuldeep Singh <kuldeep.singh@xxxxxxxxxxxxxxxx>