All of lore.kernel.org
 help / color / mirror / Atom feed
From: Evgeniy Polyakov <zbr@ioremap.net>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: linux-crypto@vger.kernel.org, Patrick McHardy <kaber@trash.net>,
	Evgeniy Polyakov <zbr@ioremap.net>
Subject: [PATCH] Move command descriptor setup to seperate function as preparation
Date: Wed, 19 Nov 2008 17:03:26 +0300	[thread overview]
Message-ID: <12271034132587-git-send-email-zbr@ioremap.net> (raw)
In-Reply-To: <12271034133347-git-send-email-zbr@ioremap.net>

From: Patrick McHardy <kaber@trash.net>

Note 1: also fix a harmless typo while moving it: sa_idx is initialized
	to dma->resi instead of dma->cmdi.

Note 2: errors from command descriptor setup are not propagated back,
	anymore, they can't be handled anyway and all conditions leading
	to errors should be checked earlier.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
---
 drivers/crypto/hifn_795x.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/crypto/hifn_795x.c b/drivers/crypto/hifn_795x.c
index 4d22b21..320d08d 100644
--- a/drivers/crypto/hifn_795x.c
+++ b/drivers/crypto/hifn_795x.c
@@ -1296,7 +1296,7 @@ static int hifn_setup_src_desc(struct hifn_device *dev, struct page *page,
 
 	dma->srcr[idx].p = __cpu_to_le32(addr);
 	dma->srcr[idx].l = __cpu_to_le32(size | HIFN_D_VALID |
-			HIFN_D_MASKDONEIRQ | HIFN_D_LAST);
+			HIFN_D_MASKDONEIRQ | HIFN_D_NOINVALID | HIFN_D_LAST);
 
 	if (++idx == HIFN_D_SRC_RSIZE) {
 		dma->srcr[idx].l = __cpu_to_le32(HIFN_D_VALID |
@@ -1324,7 +1324,7 @@ static void hifn_setup_res_desc(struct hifn_device *dev)
 			HIFN_D_VALID | HIFN_D_LAST);
 	/*
 	 * dma->resr[dma->resi].l = __cpu_to_le32(HIFN_MAX_RESULT | HIFN_D_VALID |
-	 *					HIFN_D_LAST);
+	 *					HIFN_D_LAST | HIFN_D_NOINVALID);
 	 */
 
 	if (++dma->resi == HIFN_D_RES_RSIZE) {
@@ -1353,12 +1353,12 @@ static void hifn_setup_dst_desc(struct hifn_device *dev, struct page *page,
 	idx = dma->dsti;
 	dma->dstr[idx].p = __cpu_to_le32(addr);
 	dma->dstr[idx].l = __cpu_to_le32(size |	HIFN_D_VALID |
-			HIFN_D_MASKDONEIRQ | HIFN_D_LAST);
+			HIFN_D_MASKDONEIRQ | HIFN_D_NOINVALID | HIFN_D_LAST);
 
 	if (++idx == HIFN_D_DST_RSIZE) {
 		dma->dstr[idx].l = __cpu_to_le32(HIFN_D_VALID |
 				HIFN_D_JUMP | HIFN_D_MASKDONEIRQ |
-				HIFN_D_LAST);
+				HIFN_D_LAST | HIFN_D_NOINVALID);
 		idx = 0;
 	}
 	dma->dsti = idx;
-- 
1.5.2.5


  reply	other threads:[~2008-11-19 14:07 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-19 14:03 [HIFN] Bugfix series Evgeniy Polyakov
2008-11-19 14:03 ` Evgeniy Polyakov [this message]
2008-11-19 14:03   ` [PATCH] Have HW invalidate src and dest descriptors after processing Evgeniy Polyakov
2008-11-19 14:03     ` [PATCH] Fix DMA setup Evgeniy Polyakov
2008-11-19 14:03       ` [PATCH] Don't copy src sg list Evgeniy Polyakov
2008-11-19 14:03         ` [PATCH] Fix request context corruption Evgeniy Polyakov
2008-11-19 14:03           ` [PATCH] Fix queue processing Evgeniy Polyakov
2008-11-19 14:03             ` [PATCH] Remove some unused cruft Evgeniy Polyakov
2008-11-19 14:03               ` [PATCH] Fix queue management Evgeniy Polyakov
2008-11-20  2:26           ` [PATCH] short benchmarks Andreas Gerlich
2008-11-20 13:27             ` Herbert Xu
2008-11-20 14:25               ` Evgeniy Polyakov
2008-11-20 14:33                 ` Herbert Xu
2008-11-24 13:53     ` [PATCH] Have HW invalidate src and dest descriptors after processing Herbert Xu
2008-11-24 14:00       ` Patrick McHardy
2008-11-24 14:09         ` Herbert Xu
2008-11-24 14:23           ` Evgeniy Polyakov
2008-11-24 14:34             ` Herbert Xu
2008-11-24 14:53               ` Evgeniy Polyakov
2008-11-24 14:05 ` [HIFN] Bugfix series Herbert Xu
2008-11-24 14:52   ` [HIFN] Use softirq kernel mapping in bh context Evgeniy Polyakov
2008-11-25 15:17     ` 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=12271034132587-git-send-email-zbr@ioremap.net \
    --to=zbr@ioremap.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=kaber@trash.net \
    --cc=linux-crypto@vger.kernel.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.