Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1402832 > unrolled thread
| Started by | LABBE Corentin <clabbe.montjoie@gmail.com> |
|---|---|
| First post | 2016-05-18 11:30 +0200 |
| Last post | 2016-05-30 15:40 +0200 |
| Articles | 4 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH 0/2] crypto: engine: permit to enqueue ashash_request LABBE Corentin <clabbe.montjoie@gmail.com> - 2016-05-18 11:30 +0200
[PATCH 2/2] crypto: omap: convert to the new cryptoengine API LABBE Corentin <clabbe.montjoie@gmail.com> - 2016-05-18 11:30 +0200
Re: [PATCH 2/2] crypto: omap: convert to the new cryptoengine API Baolin Wang <baolin.wang@linaro.org> - 2016-05-30 04:30 +0200
Re: [PATCH 2/2] crypto: omap: convert to the new cryptoengine API LABBE Corentin <clabbe.montjoie@gmail.com> - 2016-05-30 15:40 +0200
| From | LABBE Corentin <clabbe.montjoie@gmail.com> |
|---|---|
| Date | 2016-05-18 11:30 +0200 |
| Subject | [PATCH 0/2] crypto: engine: permit to enqueue ashash_request |
| Message-ID | <rA5XH-aM-3@gated-at.bofh.it> |
Hello I wanted to use the crypto engine for my Allwinner crypto driver but something prevented me to use it: it cannot enqueue hash requests. The first patch convert crypto engine to permit enqueuing of ahash_requests. The second patch convert the only driver using crypto engine. The second patch was only compile tested but the crypto engine with hash support was tested on two different offtree driver (sun4i-ss and sun8i-ce) Regards LABBE Corentin (2): crypto: engine: permit to enqueue ashash_request crypto: omap: convert to the new cryptoengine API crypto/crypto_engine.c | 17 +++++++---------- drivers/crypto/omap-aes.c | 10 ++++++---- include/crypto/algapi.h | 14 +++++++------- 3 files changed, 20 insertions(+), 21 deletions(-) -- 2.7.3
[toc] | [next] | [standalone]
| From | LABBE Corentin <clabbe.montjoie@gmail.com> |
|---|---|
| Date | 2016-05-18 11:30 +0200 |
| Subject | [PATCH 2/2] crypto: omap: convert to the new cryptoengine API |
| Message-ID | <rA5XI-aM-15@gated-at.bofh.it> |
| In reply to | #1402832 |
Since the crypto engine has been converted to use crypto_async_request
instead of ablkcipher_request, minor changes are needed to use it.
Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
---
drivers/crypto/omap-aes.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c
index d420ec7..1368ab1 100644
--- a/drivers/crypto/omap-aes.c
+++ b/drivers/crypto/omap-aes.c
@@ -530,7 +530,7 @@ static void omap_aes_finish_req(struct omap_aes_dev *dd, int err)
pr_debug("err: %d\n", err);
- crypto_finalize_request(dd->engine, req, err);
+ crypto_finalize_request(dd->engine, &req->base, err);
}
static int omap_aes_crypt_dma_stop(struct omap_aes_dev *dd)
@@ -603,14 +603,15 @@ static int omap_aes_handle_queue(struct omap_aes_dev *dd,
struct ablkcipher_request *req)
{
if (req)
- return crypto_transfer_request_to_engine(dd->engine, req);
+ return crypto_transfer_request_to_engine(dd->engine, &req->base);
return 0;
}
static int omap_aes_prepare_req(struct crypto_engine *engine,
- struct ablkcipher_request *req)
+ struct crypto_async_request *areq)
{
+ struct ablkcipher_request *req = ablkcipher_request_cast(areq);
struct omap_aes_ctx *ctx = crypto_ablkcipher_ctx(
crypto_ablkcipher_reqtfm(req));
struct omap_aes_dev *dd = omap_aes_find_dev(ctx);
@@ -653,8 +654,9 @@ static int omap_aes_prepare_req(struct crypto_engine *engine,
}
static int omap_aes_crypt_req(struct crypto_engine *engine,
- struct ablkcipher_request *req)
+ struct crypto_async_request *areq)
{
+ struct ablkcipher_request *req = ablkcipher_request_cast(areq);
struct omap_aes_ctx *ctx = crypto_ablkcipher_ctx(
crypto_ablkcipher_reqtfm(req));
struct omap_aes_dev *dd = omap_aes_find_dev(ctx);
--
2.7.3
[toc] | [prev] | [next] | [standalone]
| From | Baolin Wang <baolin.wang@linaro.org> |
|---|---|
| Date | 2016-05-30 04:30 +0200 |
| Subject | Re: [PATCH 2/2] crypto: omap: convert to the new cryptoengine API |
| Message-ID | <rEl7Q-6uD-7@gated-at.bofh.it> |
| In reply to | #1402834 |
On 18 May 2016 at 17:21, LABBE Corentin <clabbe.montjoie@gmail.com> wrote:
> Since the crypto engine has been converted to use crypto_async_request
> instead of ablkcipher_request, minor changes are needed to use it.
I think you missed the conversion for omap des driver, please rebase
your patch. Beyond that I think you did a good job for crypto engine
if Herbert applied it.
>
> Signed-off-by: LABBE Corentin <clabbe.montjoie@gmail.com>
> ---
> drivers/crypto/omap-aes.c | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/crypto/omap-aes.c b/drivers/crypto/omap-aes.c
> index d420ec7..1368ab1 100644
> --- a/drivers/crypto/omap-aes.c
> +++ b/drivers/crypto/omap-aes.c
> @@ -530,7 +530,7 @@ static void omap_aes_finish_req(struct omap_aes_dev *dd, int err)
>
> pr_debug("err: %d\n", err);
>
> - crypto_finalize_request(dd->engine, req, err);
> + crypto_finalize_request(dd->engine, &req->base, err);
> }
>
> static int omap_aes_crypt_dma_stop(struct omap_aes_dev *dd)
> @@ -603,14 +603,15 @@ static int omap_aes_handle_queue(struct omap_aes_dev *dd,
> struct ablkcipher_request *req)
> {
> if (req)
> - return crypto_transfer_request_to_engine(dd->engine, req);
> + return crypto_transfer_request_to_engine(dd->engine, &req->base);
>
> return 0;
> }
>
> static int omap_aes_prepare_req(struct crypto_engine *engine,
> - struct ablkcipher_request *req)
> + struct crypto_async_request *areq)
> {
> + struct ablkcipher_request *req = ablkcipher_request_cast(areq);
> struct omap_aes_ctx *ctx = crypto_ablkcipher_ctx(
> crypto_ablkcipher_reqtfm(req));
> struct omap_aes_dev *dd = omap_aes_find_dev(ctx);
> @@ -653,8 +654,9 @@ static int omap_aes_prepare_req(struct crypto_engine *engine,
> }
>
> static int omap_aes_crypt_req(struct crypto_engine *engine,
> - struct ablkcipher_request *req)
> + struct crypto_async_request *areq)
> {
> + struct ablkcipher_request *req = ablkcipher_request_cast(areq);
> struct omap_aes_ctx *ctx = crypto_ablkcipher_ctx(
> crypto_ablkcipher_reqtfm(req));
> struct omap_aes_dev *dd = omap_aes_find_dev(ctx);
> --
> 2.7.3
>
--
Baolin.wang
Best Regards
[toc] | [prev] | [next] | [standalone]
| From | LABBE Corentin <clabbe.montjoie@gmail.com> |
|---|---|
| Date | 2016-05-30 15:40 +0200 |
| Subject | Re: [PATCH 2/2] crypto: omap: convert to the new cryptoengine API |
| Message-ID | <rEvAf-4Ni-61@gated-at.bofh.it> |
| In reply to | #1408727 |
On Mon, May 30, 2016 at 10:20:01AM +0800, Baolin Wang wrote: > On 18 May 2016 at 17:21, LABBE Corentin <clabbe.montjoie@gmail.com> wrote: > > Since the crypto engine has been converted to use crypto_async_request > > instead of ablkcipher_request, minor changes are needed to use it. > > I think you missed the conversion for omap des driver, please rebase > your patch. Beyond that I think you did a good job for crypto engine > if Herbert applied it. > Thanks I have just rebased it and added omap-des to the list of changes. Regards
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web