From: Eric Biggers <ebiggers@kernel.org>
To: Neeraj Soni <neeraj.soni@oss.qualcomm.com>
Cc: 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, ram.gupta@oss.qualcomm.com,
linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH v5 2/4] mmc: sdhci-msm: Reprogram crypto keys during host hardware initialization
Date: Thu, 30 Jul 2026 23:12:46 -0700 [thread overview]
Message-ID: <20260731061246.GB57540@sol> (raw)
In-Reply-To: <6c795412-ab63-22f9-0b64-8bc746fc2773@oss.qualcomm.com>
On Fri, Jul 31, 2026 at 11:37:44AM +0530, Neeraj Soni wrote:
>
>
> On 7/31/2026 12:48 AM, Eric Biggers wrote:
> > On Thu, Jul 30, 2026 at 07:38:20PM +0530, Neeraj Soni wrote:
> >> Host looses the Inline Crypto Engine (ICE) keys during hardware reset.
> >> Re-program the keys while intializing ICE to ensure that ICE is available
> >> in the same state as before the hardware reset.
> >>
> >> Also set MMC_CAP2_CRYPTO_NO_REPROG to indicate that re-program of ICE keys
> >> is not needed during MMC runtime suspend/resume.
> >>
> >> Signed-off-by: Seshu Madhavi Puppala <quic_spuppala@quicinc.com>
> >> Co-developed-by: Ram Prakash Gupta <quic_rampraka@quicinc.com>
> >> Signed-off-by: Ram Prakash Gupta <quic_rampraka@quicinc.com>
> >> Co-developed-by: Sarthak Garg <quic_sartgarg@quicinc.com>
> >> Signed-off-by: Sarthak Garg <quic_sartgarg@quicinc.com>
> >> Signed-off-by: Debraj Mukhopadhyay <quic_dmukhopa@quicinc.com>
> >> Signed-off-by: Neeraj Soni <neeraj.soni@oss.qualcomm.com>
> >> ---
> >> drivers/mmc/host/sdhci-msm.c | 3 +++
> >> 1 file changed, 3 insertions(+)
> >>
> >> diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
> >> index 4aff965f0e2e..7d71dc6f388d 100644
> >> --- a/drivers/mmc/host/sdhci-msm.c
> >> +++ b/drivers/mmc/host/sdhci-msm.c
> >> @@ -1958,7 +1958,10 @@ static int sdhci_msm_ice_init(struct sdhci_msm_host *msm_host,
> >> cap.sdus_mask * 512;
> >> }
> >>
> >> + blk_crypto_reprogram_all_keys(&mmc->crypto_profile);
> >> +
> >
> > This still does nothing. The crypto profile was just initialized, so no
> > keyslots are in-use and blk_crypto_reprogram_all_keys() does nothing.
> >
> This is needed to address those scenarios where device is running in a
> stable state and only the host hardware goes for a reset, for example,
> to recover from an error state or stall.
Nope. Please check the actual code. This is called only at driver
probe time. Again, the crypto profile was just initialized, and no
keyslots are in-use. It is a no-op. Maybe you intended it to do
something else, but that is not what it actually does.
- Eric
next prev parent reply other threads:[~2026-07-31 6:14 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-30 14:08 [PATCH v5 0/4] mmc: Avoid reprogram all keys to Inline Crypto Engine for MMC runtime suspend resume Neeraj Soni
2026-07-30 14:08 ` [PATCH v5 1/4] mmc: Allow host driver to control the re-programming of Crypto keys Neeraj Soni
2026-07-30 19:03 ` Eric Biggers
2026-07-31 5:52 ` Neeraj Soni
2026-07-30 14:08 ` [PATCH v5 2/4] mmc: sdhci-msm: Reprogram crypto keys during host hardware initialization Neeraj Soni
2026-07-30 19:18 ` Eric Biggers
2026-07-31 6:07 ` Neeraj Soni
2026-07-31 6:07 ` Neeraj Soni
2026-07-31 6:12 ` Eric Biggers [this message]
2026-07-30 14:08 ` [PATCH v5 3/4] mmc: sdhci-msm: Use pm ops instead of macro to restore crypto keys Neeraj Soni
2026-07-30 19:23 ` Eric Biggers
2026-07-31 9:53 ` Neeraj Soni
2026-07-30 14:08 ` [PATCH v5 4/4] mmc: mtk-sd: Protect crypto capability with crypto config Neeraj Soni
2026-07-30 19:10 ` Eric Biggers
2026-07-31 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=20260731061246.GB57540@sol \
--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=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=ram.gupta@oss.qualcomm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.