From: Eric Biggers <ebiggers@kernel.org>
To: Neeraj Soni <neeraj.soni@oss.qualcomm.com>
Cc: Jie Gan <jie.gan@oss.qualcomm.com>,
ulf.hansson@linaro.org, adrian.hunter@intel.com,
quic_dmukhopa@quicinc.com, quic_rampraka@quicinc.com,
quic_nitirawa@quicinc.com, quic_sachgupt@quicinc.com,
quic_bhaskarv@quicinc.com, quic_gaurkash@quicinc.com,
quic_sartgarg@quicinc.com, linux-mmc@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH RESEND v4] mmc: Avoid reprogram all keys to Inline Crypto Engine for MMC runtime suspend resume
Date: Thu, 23 Jul 2026 23:01:04 +0000 [thread overview]
Message-ID: <20260723230104.GA662946@google.com> (raw)
In-Reply-To: <66caaafd-cea4-b624-57a1-f2cd04d109b9@oss.qualcomm.com>
On Fri, May 29, 2026 at 04:05:52PM +0530, Neeraj Soni wrote:
> Yes for cold boot this is true and Crypto reprogram is not needed. This patch addreses the use cases like
> runtime suspend resume, deep sleep / Quick boot (DS/QB) and suspend to disk (aka hibernation) use cases
> where the runtime context is preserved either in dynamic memory (DS/QB) or in secondry memory (hibernation).
> This is tested internally on SAR1250P chipset for hibernation and DS/QB.
But sdhci_msm_gcc_reset() is called only from the driver probe function
(sdhci_msm_probe()), before MMC_CAP2_CRYPTO is set. So Jie's comment is
correct: the new key reprogramming path is dead code. And as per the
following comment, key reprogramming is still needed in some cases
(https://lore.kernel.org/linux-mmc/42797330-868a-bfcd-e0bb-b5f0dd3eeb16@oss.qualcomm.com/).
So doesn't this patch break the sdhci-msm driver?
I'm also skeptical of the following change, which seems unrelated to the
rest of the patch:
> -#ifdef CONFIG_MMC_CRYPTO
> #define MMC_CAP2_CRYPTO (1 << 27) /* Host supports inline encryption */
> -#else
> -#define MMC_CAP2_CRYPTO 0
> -#endif
Because of that, mtk-sd sets MMC_CAP2_CRYPTO even when
CONFIG_MMC_CRYPTO=n. That makes CQHCI_CRYPTO_GENERAL_ENABLE be used
even when CONFIG_MMC_CRYPTO=n.
- Eric
next prev parent reply other threads:[~2026-07-23 23:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-29 9:26 Neeraj Soni
2026-05-29 10:19 ` Jie Gan
2026-05-29 10:35 ` Neeraj Soni
2026-07-23 23:01 ` Eric Biggers [this message]
2026-07-28 6:01 ` Neeraj Soni
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=20260723230104.GA662946@google.com \
--to=ebiggers@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=jie.gan@oss.qualcomm.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=neeraj.soni@oss.qualcomm.com \
--cc=quic_bhaskarv@quicinc.com \
--cc=quic_dmukhopa@quicinc.com \
--cc=quic_gaurkash@quicinc.com \
--cc=quic_nitirawa@quicinc.com \
--cc=quic_rampraka@quicinc.com \
--cc=quic_sachgupt@quicinc.com \
--cc=quic_sartgarg@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
Powered by JetHome