From: T Pratham <t-pratham@ti.com>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: "David S. Miller" <davem@davemloft.net>,
Kamlesh Gurudasani <kamlesh@ti.com>,
Praneeth Bajjuri <praneeth@ti.com>,
Vignesh Raghavendra <vigneshr@ti.com>,
Manorit Chawdhry <m-chawdhry@ti.com>,
<linux-kernel@vger.kernel.org>, <linux-crypto@vger.kernel.org>
Subject: Re: [PATCH v2 2/2] crypto: ti: Add driver for DTHE V2 AES Engine (ECB, CBC)
Date: Wed, 16 Apr 2025 13:57:39 +0530 [thread overview]
Message-ID: <860d48a5-b61f-495f-86e1-ae56187a8dc8@ti.com> (raw)
In-Reply-To: <Z_9WPwz-xVdVDMMw@gondor.apana.org.au>
On 16/04/25 12:33, Herbert Xu wrote:
> On Fri, Apr 11, 2025 at 02:43:22PM +0530, T Pratham wrote:
>> + // Need to do a timeout to ensure mutex gets unlocked if DMA callback fails for any reason
>> + ret = wait_for_completion_timeout(&actx->aes_compl, msecs_to_jiffies(DTHE_DMA_TIMEOUT_MS));
> You cannot wait here. The preferred method of indicating completion
> is through an interrupt. If you hardware can't do that, then you need
> to use crypto_engine and poll in that thread.
Sure, will change the strategy and update this.
>> +static int dthe_aes_crypt(struct skcipher_request *req, int enc)
>> +{
>> + struct dthe_tfm_ctx *ctx = crypto_skcipher_ctx(crypto_skcipher_reqtfm(req));
>> +
>> + /*
>> + * If data is not a multiple of AES_BLOCK_SIZE, need to return -EINVAL
>> + * If data length input is zero, no need to do any operation.
>> + */
>> + if (req->cryptlen % AES_BLOCK_SIZE) {
>> + skcipher_request_complete(req, -EINVAL);
> The completion function must not be called unless you first
> returned EINPROGRESS.
>
> PS Please set the bit KERN_DRIVER_ONLY in cra_flags.
KERN_DRIVER_ONLY bit is set.
>
> Cheers,
Thanks.
Regards
T Pratham <t-pratham@ti.com>
prev parent reply other threads:[~2025-04-16 8:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-11 9:13 [PATCH v2 0/2] Add support for Texas Instruments DTHE V2 crypto accelerator T Pratham
2025-04-11 9:13 ` [PATCH v2 1/2] dt-bindings: crypto: Add binding for TI DTHE V2 T Pratham
2025-04-11 10:23 ` Rob Herring (Arm)
2025-04-11 9:13 ` [PATCH v2 2/2] crypto: ti: Add driver for DTHE V2 AES Engine (ECB, CBC) T Pratham
2025-04-16 7:03 ` Herbert Xu
2025-04-16 8:27 ` T Pratham [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=860d48a5-b61f-495f-86e1-ae56187a8dc8@ti.com \
--to=t-pratham@ti.com \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=kamlesh@ti.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=m-chawdhry@ti.com \
--cc=praneeth@ti.com \
--cc=vigneshr@ti.com \
/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
all inboxes | Powered by JetHome®