From: Eric Biggers <ebiggers@kernel.org>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: linux-mmc@vger.kernel.org, linux-arm-msm@vger.kernel.org,
devicetree@vger.kernel.org, linux-fscrypt@vger.kernel.org,
Satya Tangirala <satyat@google.com>,
Ulf Hansson <ulf.hansson@linaro.org>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Ritesh Harjani <riteshh@codeaurora.org>,
Asutosh Das <asutoshd@codeaurora.org>,
Rob Herring <robh+dt@kernel.org>,
Neeraj Soni <neersoni@codeaurora.org>,
Barani Muthukumaran <bmuthuku@codeaurora.org>,
Peng Zhou <peng.zhou@mediatek.com>,
Stanley Chu <stanley.chu@mediatek.com>,
Konrad Dybcio <konradybcio@gmail.com>
Subject: Re: [PATCH 3/8] mmc: cqhci: add support for inline encryption
Date: Wed, 2 Dec 2020 17:17:27 -0800 [thread overview]
Message-ID: <X8g8px5KaEyrbcmK@sol.localdomain> (raw)
In-Reply-To: <48269904-d031-c2fd-59c5-78f7948b032a@intel.com>
On Wed, Dec 02, 2020 at 03:14:25PM +0200, Adrian Hunter wrote:
> > static void cqhci_prep_task_desc(struct mmc_request *mrq,
> > - u64 *data, bool intr)
> > + struct cqhci_host *cq_host, int tag)
>
> It would be neater if the changes to cqhci_prep_task_desc() parameters could
> be a separate patch.
>
I'll move it to a separate patch
"mmc: cqhci: initialize upper 64 bits of 128-bit task descriptors".
> > @@ -709,6 +724,27 @@ static void cqhci_error_irq(struct mmc_host *mmc, u32 status, int cmd_error,
> > }
> > }
> >
> > + /*
> > + * Handle "Invalid Crypto Configuration Error". This should never
> > + * happen, since the block layer ensures that all crypto-enabled I/O
> > + * requests have a valid keyslot before they reach the driver.
> > + */
> > + if (status & CQHCI_IS_ICCE) {
> > + tdpe = cqhci_readl(cq_host, CQHCI_TDPE);
> > + WARN_ONCE(1,
> > + "%s: cqhci: invalid crypto configuration error. IRQ status: 0x%08x TDPE: 0x%08x\n",
> > + mmc_hostname(mmc), status, tdpe);
> > + while (tdpe != 0) {
> > + tag = __ffs(tdpe);
> > + tdpe &= ~(1 << tag);
> > + slot = &cq_host->slot[tag];
> > + if (!slot->mrq)
> > + continue;
> > + slot->flags = cqhci_error_flags(data_error, cmd_error);
> > + cqhci_recovery_needed(mmc, slot->mrq, true);
> > + }
> > + }
> > +
>
> What about GCE?
I don't think anything more is needed for GCE (General Crypto Error). As per
the eMMC specification, GCE occurs during the execution of a task, and task
error information is stored in the TERRI register -- just like some of the
non-crypto related errors. This patch already updates cqhci_irq() to call
cqhci_error_irq() if the GCE bit is set, and cqhci_error_irq() already handles
task errors by checking the TERRI register. Also, cqhci_irq() already
acknowledges all interrupts, including GCE.
So I think GCE is handled correctly, though I don't currently have a way to
actually test it.
- Eric
next prev parent reply other threads:[~2020-12-03 1:18 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-12 19:40 [PATCH 0/8] eMMC inline encryption support Eric Biggers
2020-11-12 19:40 ` [PATCH 1/8] mmc: add basic support for inline encryption Eric Biggers
2020-12-02 14:25 ` Adrian Hunter
2020-11-12 19:40 ` [PATCH 2/8] mmc: cqhci: rename cqhci.c to cqhci-core.c Eric Biggers
2020-12-02 13:33 ` Adrian Hunter
2020-11-12 19:40 ` [PATCH 3/8] mmc: cqhci: add support for inline encryption Eric Biggers
2020-12-02 13:14 ` Adrian Hunter
2020-12-03 1:17 ` Eric Biggers [this message]
2020-11-12 19:40 ` [PATCH 4/8] mmc: cqhci: add cqhci_host_ops::program_key Eric Biggers
2020-12-02 13:34 ` Adrian Hunter
2020-11-12 19:40 ` [PATCH 5/8] firmware: qcom_scm: update comment for ICE-related functions Eric Biggers
2020-11-12 19:40 ` [PATCH 6/8] dt-bindings: mmc: sdhci-msm: add ICE registers and clock Eric Biggers
2020-11-12 19:40 ` [PATCH 7/8] arm64: dts: qcom: sdm630: add ICE registers and clocks Eric Biggers
2020-11-12 19:40 ` [PATCH 8/8] mmc: sdhci-msm: add Inline Crypto Engine support Eric Biggers
2020-11-13 12:04 ` kernel test robot
2020-11-14 0:40 ` Eric Biggers
2020-12-02 13:56 ` Adrian Hunter
2020-12-03 1:18 ` Eric Biggers
2020-11-20 18:54 ` [PATCH 0/8] eMMC inline encryption support Eric Biggers
2020-11-20 19:29 ` Adrian Hunter
2020-11-20 19:44 ` Eric Biggers
2020-11-23 7:04 ` Adrian Hunter
2020-11-24 2:01 ` Eric Biggers
2020-11-25 9:03 ` Stanley Chu
[not found] ` <1608196892.11508.0.camel@mbjsdccf07>
2020-12-17 18:20 ` Eric Biggers
[not found] ` <1608248441.2255.5.camel@mbjsdccf07>
2020-12-18 2:52 ` Eric Biggers
2020-11-25 9:56 ` Ulf Hansson
2021-01-04 20:46 ` Eric Biggers
2021-01-07 10:15 ` Ulf Hansson
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=X8g8px5KaEyrbcmK@sol.localdomain \
--to=ebiggers@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=agross@kernel.org \
--cc=asutoshd@codeaurora.org \
--cc=bjorn.andersson@linaro.org \
--cc=bmuthuku@codeaurora.org \
--cc=devicetree@vger.kernel.org \
--cc=konradybcio@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-fscrypt@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=neersoni@codeaurora.org \
--cc=peng.zhou@mediatek.com \
--cc=riteshh@codeaurora.org \
--cc=robh+dt@kernel.org \
--cc=satyat@google.com \
--cc=stanley.chu@mediatek.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.