Re: [PATCH v4] mmc: sdhci-msm: Enable ICE support for non-cmdq eMMC devices
From: Eric Biggers
Date: Thu Nov 13 2025 - 12:36:42 EST
On Thu, Nov 13, 2025 at 12:41:28PM +0530, Md Sadre Alam wrote:
> > > + 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?
> Thank you for highlighting this. After revisiting the code paths, I believe
> 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.
- Eric