Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/opencrypto Pull up `done' flag for crypto operations fro...



details:   https://anonhg.NetBSD.org/src/rev/ce2e8fc6b988
branches:  trunk
changeset: 550788:ce2e8fc6b988
user:      jonathan <jonathan%NetBSD.org@localhost>
date:      Thu Aug 21 16:08:05 2003 +0000

description:
Pull up `done' flag for crypto operations from FreeBSD. FreeBSD deltas:
  cryptodev.c: 1.4.2.3 -> 1.4.2.4
  cryptodev.h: 1.4.2.4 -> 1.4.2.5

diffstat:

 sys/opencrypto/cryptodev.c |  9 ++++-----
 sys/opencrypto/cryptodev.h |  5 +++--
 2 files changed, 7 insertions(+), 7 deletions(-)

diffs (50 lines):

diff -r 783726ea6fa9 -r ce2e8fc6b988 sys/opencrypto/cryptodev.c
--- a/sys/opencrypto/cryptodev.c        Thu Aug 21 16:02:32 2003 +0000
+++ b/sys/opencrypto/cryptodev.c        Thu Aug 21 16:08:05 2003 +0000
@@ -1,5 +1,5 @@
-/*     $NetBSD: cryptodev.c,v 1.3 2003/07/30 18:20:15 jonathan Exp $ */
-/*     $FreeBSD: src/sys/opencrypto/cryptodev.c,v 1.4.2.3 2003/02/26 00:14:05 sam Exp $        */
+/*     $NetBSD: cryptodev.c,v 1.4 2003/08/21 16:08:05 jonathan Exp $ */
+/*     $FreeBSD: src/sys/opencrypto/cryptodev.c,v 1.4.2.4 2003/06/03 00:09:02 sam Exp $        */
 /*     $OpenBSD: cryptodev.c,v 1.53 2002/07/10 22:21:30 mickey Exp $   */
 
 /*
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cryptodev.c,v 1.3 2003/07/30 18:20:15 jonathan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cryptodev.c,v 1.4 2003/08/21 16:08:05 jonathan Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -449,9 +449,8 @@
 
        s = splcrypto();        /* NB: only needed with CRYPTO_F_CBIMM */
        error = crypto_dispatch(crp);
-       if (error == 0) {
+       if (error == 0 && (crp->crp_flags & CRYPTO_F_DONE) == 0)
                error = tsleep(crp, PSOCK, "crydev", 0);
-       }
        splx(s);
        if (error) {
                goto bail;
diff -r 783726ea6fa9 -r ce2e8fc6b988 sys/opencrypto/cryptodev.h
--- a/sys/opencrypto/cryptodev.h        Thu Aug 21 16:02:32 2003 +0000
+++ b/sys/opencrypto/cryptodev.h        Thu Aug 21 16:08:05 2003 +0000
@@ -1,5 +1,5 @@
-/*     $NetBSD: cryptodev.h,v 1.3 2003/07/30 18:45:31 jonathan Exp $ */
-/*     $FreeBSD: src/sys/opencrypto/cryptodev.h,v 1.2.2.4 2003/02/26 00:14:05 sam Exp $        */
+/*     $NetBSD: cryptodev.h,v 1.4 2003/08/21 16:08:05 jonathan Exp $ */
+/*     $FreeBSD: src/sys/opencrypto/cryptodev.h,v 1.2.2.5 2003/06/03 00:09:02 sam Exp $        */
 /*     $OpenBSD: cryptodev.h,v 1.33 2002/07/17 23:52:39 art Exp $      */
 
 /*
@@ -265,6 +265,7 @@
 #define CRYPTO_F_REL   0x0004  /* Must return data in same place */
 #define        CRYPTO_F_BATCH  0x0008  /* Batch op if possible possible */
 #define        CRYPTO_F_CBIMM  0x0010  /* Do callback immediately */
+#define        CRYPTO_F_DONE   0x0020  /* Operation completed */
 
        caddr_t         crp_buf;        /* Data to be processed */
        caddr_t         crp_opaque;     /* Opaque pointer, passed along */



Home | Main Index | Thread Index | Old Index