From: Kim Phillips <kim.phillips@freescale.com>
To: linux-crypto@vger.kernel.org
Cc: linuxppc-dev@ozlabs.org, herbert@gondor.apana.org.au
Subject: [PATCH 3/4] crypto/talitos: fix premature done handling
Date: Mon, 16 Jun 2008 11:10:50 -0500 [thread overview]
Message-ID: <20080616111050.596c245b.kim.phillips@freescale.com> (raw)
Since the h/w doesn't support out-of-order processing within a channel,
abort channel flush processing in the no-done-bits-and-no-error case
so as to not allow premature passthrough to the callback (and thus
dropped packets).
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
---
drivers/crypto/talitos.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c
index ce4787e..64ddad2 100644
--- a/drivers/crypto/talitos.c
+++ b/drivers/crypto/talitos.c
@@ -307,8 +307,13 @@ static void flush_channel(struct device *dev, int ch, int error, int reset_ch)
/* descriptors with their done bits set don't get the error */
rmb();
- status = ((request->desc->hdr & DESC_HDR_DONE)
- == DESC_HDR_DONE) ? 0 : error;
+ if ((request->desc->hdr & DESC_HDR_DONE) == DESC_HDR_DONE)
+ status = 0;
+ else
+ if (!error)
+ break;
+ else
+ status = error;
dma_unmap_single(dev, request->dma_desc,
sizeof(struct talitos_desc), DMA_BIDIRECTIONAL);
--
1.5.6.rc2.26.g8c37
reply other threads:[~2008-06-16 16:11 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20080616111050.596c245b.kim.phillips@freescale.com \
--to=kim.phillips@freescale.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.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;
as well as URLs for NNTP newsgroup(s).