Linux MultiMedia Card development
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Md Sadre Alam <quic_mdalam@quicinc.com>
Cc: adrian.hunter@intel.com, quic_asutoshd@quicinc.com,
	ulf.hansson@linaro.org, linux-mmc@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH] mmc: sdhci-msm: Add quirk to disable CQE for ICE legacy mode
Date: Sun, 28 Dec 2025 12:20:57 -0800	[thread overview]
Message-ID: <20251228202057.GB2431@quark> (raw)
In-Reply-To: <20251224101050.3497746-1-quic_mdalam@quicinc.com>

On Wed, Dec 24, 2025 at 03:40:50PM +0530, Md Sadre Alam wrote:
> Some hosts require Inline Crypto Engine (ICE) to operate in legacy mode
> instead of Command Queue Engine (CQE) mode for platform-specific
> requirements or compatibility reasons. Introduce a host-level quirk
> `host_disable_cqe` to forcefully disable CQE negotiation and allow ICE
> to function through the legacy request path.
> 
> When the device tree omits the "supports-cqe" property, the driver sets
> `host_disable_cqe = true` and avoids enabling MMC_CAP2_CQE during card
> initialization. This ensures that even CQE-capable hardware falls back
> to legacy SDHCI request handling. A minimal `cqhci_disable_ops` is
> provided with `.cqe_enable = cqhci_host_disable` returning -EINVAL to
> force the fallback. Other ops are left NULL for safe defaults.
> 
> For builds without CONFIG_MMC_CRYPTO, the driver uses standard
> sdhci_add_host() to avoid unnecessary CQE infrastructure initialization.
> 
> This allows platforms to forcefully opt out of CQE usage and ensure ICE
> operates reliably in legacy mode, providing stable crypto operations
> without command queuing complexity.
> 
> Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com>

I'm confused.  If CQE isn't supported by the hardware, surely it would
make more sense for the driver to not advertise the host as being
CQE-capable at all?  This patch seems to introduce an ambiguous middle
ground, where the host is CQE-capable but not really.

- Eric

  parent reply	other threads:[~2025-12-28 20:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-24 10:10 [PATCH] mmc: sdhci-msm: Add quirk to disable CQE for ICE legacy mode Md Sadre Alam
2025-12-25  3:17 ` kernel test robot
2025-12-25  4:30 ` kernel test robot
2025-12-28 20:20 ` Eric Biggers [this message]
2025-12-29  5:57   ` Md Sadre Alam
2026-01-05 15:01 ` Adrian Hunter
2026-01-07 11:55   ` Md Sadre Alam
2026-01-07 14:03     ` Adrian Hunter
2026-01-08 11:00       ` Md Sadre Alam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251228202057.GB2431@quark \
    --to=ebiggers@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=quic_asutoshd@quicinc.com \
    --cc=quic_mdalam@quicinc.com \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox