Re: [PATCH v4] mmc: sdhci-msm: Enable ICE support for non-cmdq eMMC devices
From: Md Sadre Alam
Date: Mon Nov 17 2025 - 02:22:00 EST
Hi,
On 11/13/2025 11:05 PM, Eric Biggers wrote:
On Thu, Nov 13, 2025 at 12:41:28PM +0530, Md Sadre Alam wrote:You are absolutely correct. After reviewing the code paths more carefully, I see that sdhci_msm_cqe_enable() is indeed called per-resume (via cqhci_resume() → cqhci_enable() → sdhci_msm_cqe_enable()).
Thank you for highlighting this. After revisiting the code paths, I believe+ if (mrq->crypto_ctx) {
+ if (!msm_host->ice_init_done) {
+ sdhci_msm_non_cqe_ice_init(host);
+ msm_host->ice_init_done = true;
+ }
This means sdhci_msm_ice_enable() is called only once per host
controller. It looks like the existing call to sdhci_msm_ice_enable()
happens each time after the host controller is resumed. So there seems
to be an inconsistency there. Which way is correct?
the behavior is consistent across both CQE and non-CQE modes.
ICE is re-enabled on every resume via the common sdhci_msm_runtime_resume()
→ sdhci_msm_ice_resume() → qcom_ice_resume() → sdhci_msm_ice_enable() path.
The ice_init_done flag only governs one-time initialization in
sdhci_msm_ice_cfg() and doesn’t interfere with the resume logic.
In summary:
CQE mode: ICE enabled during sdhci_msm_cqe_enable() + every resume
Non-CQE mode: ICE enabled on first crypto request + every resume
I was looking at sdhci_msm_cqe_enable(). Based on the caller, it seems
to be a per-resume thing too. So it doesn't seem consistent.
So For consistency, I Will remove the sdhci_msm_ice_enable() call from sdhci_msm_non_cqe_ice_init() ? since ICE is already enabled on every resume through the runtime PM path.
Thanks,
Alam.