From: Neeraj Soni <neeraj.soni@oss.qualcomm.com>
To: Eric Biggers <ebiggers@kernel.org>,
Ram Prakash Gupta <ram.gupta@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, linux-mmc@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH v7 2/2] mmc: sdhci-msm: Use pm ops instead of macro to restore crypto keys
Date: Wed, 19 Aug 2026 16:20:26 +0530 [thread overview]
Message-ID: <7ed514be-080d-ec2a-0803-9c884c69f4fc@oss.qualcomm.com> (raw)
In-Reply-To: <20260818171227.GA2249@quark>
On 8/18/2026 10:42 PM, Eric Biggers wrote:
> On Tue, Aug 18, 2026 at 01:00:21PM +0530, Ram Prakash Gupta wrote:
>>
>>
>> On 8/12/2026 12:38 AM, Eric Biggers wrote:
>>> On Tue, Aug 11, 2026 at 08:47:59PM +0530, Neeraj Soni wrote:
>>>> From: Ram Prakash Gupta <ram.gupta@oss.qualcomm.com>
>>>>
>>>> Inline Crypto Engine (ICE) keys are lost after hibernation entry and this
>>>> needs to be restored when hibernation exits. ICE keys are re-programmed
>>>> during sdhci_msm_ice_init() but it may not cover cases where the
>>>> hibernation image is already restored.
>>>>
>>>> Unwrap the pm ops and use directly in driver to add the call to restore
>>>> Inline Crypto Engine (ICE) keys. This ensures that ICE is brought into
>>>> same state as before hibernation.
>>>>
>>>> Also set MMC_CAP2_CRYPTO_NO_REPROG to indicate that re-programming of ICE
>>>> keys is not needed during MMC runtime suspend/resume.
>>>>
>>>> Signed-off-by: Ram Prakash Gupta <ram.gupta@oss.qualcomm.com>
>>>> 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 | 32 +++++++++++++++++++++++++++++++-
>>>> 1 file changed, 31 insertions(+), 1 deletion(-)
>>>
>>> So with this patch, resume from hibernation will be the *only* time that
>>> ICE keys are reprogrammed. Are you absolutely sure that is enough on
>>> every SoC this driver supports? What about resume from suspend-to-RAM?
>>> CQE error recovery? What if the hibernation image fails to be created?
>>>
>>> - Eric
>>
>> Hi Eric,
>>
>> There are two scenarios where key would be required to reprogram, first is when
>> rail powering the ICE goes off or SDCC does BCR reset.
>>
>> now during suspend-to-RAM, rail powering the ice wont go off, so key would not
>> be required to reprogram. During CQE recovery, key would be only lost when BCR
>> reset is performed but that is not happening right now, to be taken up once its
>> fixed as part of recovery flow. And in case hibernation image fails to create
>> then device boots from normal flow where there is no need to reprogram the keys.
>>
>
> Okay this patch should be okay then. Seems that the commit message
> needs some work though to properly explain this.
>
Ack. Will update and post v8.
> - Eric
>
Regards,
Neeraj
prev parent reply other threads:[~2026-08-19 10:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-11 15:17 [PATCH v7 0/2] mmc: Avoid reprogram all keys to Inline Crypto Engine for MMC runtime suspend resume Neeraj Soni
2026-08-11 15:17 ` [PATCH v7 1/2] mmc: Allow host driver to control the re-programming of crypto keys Neeraj Soni
2026-08-11 15:17 ` [PATCH v7 2/2] mmc: sdhci-msm: Use pm ops instead of macro to restore " Neeraj Soni
2026-08-11 19:08 ` Eric Biggers
2026-08-18 7:30 ` Ram Prakash Gupta
2026-08-18 17:12 ` Eric Biggers
2026-08-19 10:50 ` Neeraj Soni [this message]
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=7ed514be-080d-ec2a-0803-9c884c69f4fc@oss.qualcomm.com \
--to=neeraj.soni@oss.qualcomm.com \
--cc=adrian.hunter@intel.com \
--cc=ebiggers@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--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.