Index: share/man/man9/crypto_request.9 =================================================================== --- share/man/man9/crypto_request.9 +++ share/man/man9/crypto_request.9 @@ -473,17 +473,6 @@ .Fn crypto_done . .It Fa crp_flags A bitmask of flags. -The following flags are available in addition to flags discussed previously: -.Bl -tag -width CRYPTO_F_DONE -.It Dv CRYPTO_F_DONE -Set by -.Fa crypto_done -before calling -.Fa crp_callback . -This flag is not very useful and will likely be removed in the future. -It can only be safely checked from the callback routine at which point -it is always set. -.El .It Fa crp_cipher_key Pointer to a request-specific encryption key. If this value is not set, Index: sys/contrib/openzfs/module/os/freebsd/zfs/crypto_os.c =================================================================== --- sys/contrib/openzfs/module/os/freebsd/zfs/crypto_os.c +++ sys/contrib/openzfs/module/os/freebsd/zfs/crypto_os.c @@ -198,7 +198,6 @@ break; } crp->crp_etype = 0; - crp->crp_flags &= ~CRYPTO_F_DONE; session->fs_done = false; #if __FreeBSD_version < 1300087 /* Index: sys/opencrypto/crypto.c =================================================================== --- sys/opencrypto/crypto.c +++ sys/opencrypto/crypto.c @@ -1273,8 +1273,6 @@ crp->crp_obuf.cb_type <= CRYPTO_BUF_LAST, ("incoming crp with invalid output buffer type")); KASSERT(crp->crp_etype == 0, ("incoming crp with error")); - KASSERT(!(crp->crp_flags & CRYPTO_F_DONE), - ("incoming crp already done")); csp = &crp->crp_session->csp; cb_sanity(&crp->crp_buf, "input"); @@ -1669,7 +1667,6 @@ { struct cryptop *new; - MPASS((crp->crp_flags & CRYPTO_F_DONE) == 0); new = crypto_getreq(cses, how); if (new == NULL) return (NULL); @@ -1685,9 +1682,6 @@ void crypto_done(struct cryptop *crp) { - KASSERT((crp->crp_flags & CRYPTO_F_DONE) == 0, - ("crypto_done: op already done, flags 0x%x", crp->crp_flags)); - crp->crp_flags |= CRYPTO_F_DONE; if (crp->crp_etype != 0) CRYPTOSTAT_INC(cs_errs); Index: sys/opencrypto/cryptodev.h =================================================================== --- sys/opencrypto/cryptodev.h +++ sys/opencrypto/cryptodev.h @@ -434,7 +434,7 @@ int crp_flags; #define CRYPTO_F_CBIMM 0x0010 /* Do callback immediately */ -#define CRYPTO_F_DONE 0x0020 /* Operation completed */ +#define CRYPTO_F_DONE 0x0020 /* Deprecated, do not use */ #define CRYPTO_F_CBIFSYNC 0x0040 /* Do CBIMM if op is synchronous */ #define CRYPTO_F_ASYNC_ORDERED 0x0100 /* Completions must happen in order */ #define CRYPTO_F_IV_SEPARATE 0x0200 /* Use crp_iv[] as IV. */ Index: sys/opencrypto/cryptodev.c =================================================================== --- sys/opencrypto/cryptodev.c +++ sys/opencrypto/cryptodev.c @@ -826,7 +826,6 @@ if (crp->crp_etype == EAGAIN) { crp->crp_etype = 0; - crp->crp_flags &= ~CRYPTO_F_DONE; cod->done = false; goto again; } @@ -1029,7 +1028,6 @@ if (crp->crp_etype == EAGAIN) { crp->crp_etype = 0; - crp->crp_flags &= ~CRYPTO_F_DONE; cod->done = false; goto again; } Index: sys/opencrypto/ktls_ocf.c =================================================================== --- sys/opencrypto/ktls_ocf.c +++ sys/opencrypto/ktls_ocf.c @@ -222,7 +222,6 @@ } crp->crp_etype = 0; - crp->crp_flags &= ~CRYPTO_F_DONE; oo.done = false; counter_u64_add(ocf_retries, 1); } @@ -238,7 +237,6 @@ state = crp->crp_opaque; if (crp->crp_etype == EAGAIN) { crp->crp_etype = 0; - crp->crp_flags &= ~CRYPTO_F_DONE; counter_u64_add(ocf_retries, 1); error = crypto_dispatch(crp); if (error != 0) {