Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: t-kristo@ti.com (Tero Kristo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/8] crypto: omap-sham: add context export/import stubs
Date: Mon, 19 Sep 2016 18:22:12 +0300	[thread overview]
Message-ID: <1474298539-23897-2-git-send-email-t-kristo@ti.com> (raw)
In-Reply-To: <1474298539-23897-1-git-send-email-t-kristo@ti.com>

Initially these just return -ENOTSUPP to indicate that they don't
really do anything yet. Some sort of implementation is required
for the driver to at least probe.

Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
 drivers/crypto/omap-sham.c | 19 +++++++++++++++++--
 1 file changed, 17 insertions(+), 2 deletions(-)

diff --git a/drivers/crypto/omap-sham.c b/drivers/crypto/omap-sham.c
index cf9f617c..74653c9 100644
--- a/drivers/crypto/omap-sham.c
+++ b/drivers/crypto/omap-sham.c
@@ -1340,6 +1340,16 @@ static void omap_sham_cra_exit(struct crypto_tfm *tfm)
 	}
 }
 
+static int omap_sham_export(struct ahash_request *req, void *out)
+{
+	return -ENOTSUPP;
+}
+
+static int omap_sham_import(struct ahash_request *req, const void *in)
+{
+	return -ENOTSUPP;
+}
+
 static struct ahash_alg algs_sha1_md5[] = {
 {
 	.init		= omap_sham_init,
@@ -1998,8 +2008,13 @@ static int omap_sham_probe(struct platform_device *pdev)
 
 	for (i = 0; i < dd->pdata->algs_info_size; i++) {
 		for (j = 0; j < dd->pdata->algs_info[i].size; j++) {
-			err = crypto_register_ahash(
-					&dd->pdata->algs_info[i].algs_list[j]);
+			struct ahash_alg *alg;
+
+			alg = &dd->pdata->algs_info[i].algs_list[j];
+			alg->export = omap_sham_export;
+			alg->import = omap_sham_import;
+			alg->halg.statesize = sizeof(struct omap_sham_reqctx);
+			err = crypto_register_ahash(alg);
 			if (err)
 				goto err_algs;
 
-- 
1.9.1

  reply	other threads:[~2016-09-19 15:22 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-19 15:22 [PATCH 0/8] crypto: omap-sham: convert to sg based data engine Tero Kristo
2016-09-19 15:22 ` Tero Kristo [this message]
2016-09-19 15:22 ` [PATCH 2/8] crypto: omap-sham: align algorithms on word offset Tero Kristo
2016-09-19 15:22 ` [PATCH 3/8] crypto: omap-sham: rename sgl to sgl_tmp for deprecation Tero Kristo
2016-09-19 15:22 ` [PATCH 4/8] crypto: omap-sham: add support functions for sg based data handling Tero Kristo
2016-09-19 15:22 ` [PATCH 5/8] crypto: omap-sham: change the DMA threshold value to a define Tero Kristo
2016-09-19 15:22 ` [PATCH 6/8] crypto: omap-sham: convert driver logic to use sgs for data xmit Tero Kristo
2016-09-19 15:22 ` [PATCH 7/8] crypto: omap-sham: add support for export/import Tero Kristo
2016-09-19 15:22 ` [PATCH 8/8] crypto: omap-sham: shrink the internal buffer size Tero Kristo
2016-09-22 10:46 ` [PATCH 0/8] crypto: omap-sham: convert to sg based data engine Herbert Xu

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=1474298539-23897-2-git-send-email-t-kristo@ti.com \
    --to=t-kristo@ti.com \
    --cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox