summaryrefslogtreecommitdiff
path: root/sys/dev/softraid_crypto.c
diff options
context:
space:
mode:
authorJoel Sing <jsing@cvs.openbsd.org>2014-01-20 04:12:52 +0000
committerJoel Sing <jsing@cvs.openbsd.org>2014-01-20 04:12:52 +0000
commitf43589280cc16efa0f676f90c69de7839bdd2b65 (patch)
tree8df74045e9e8ad9f3807c645064937e0d3573fae /sys/dev/softraid_crypto.c
parent88707bb767f8528079ec1ec8acfbb0aad89091a8 (diff)
Do not bother setting crp_desc to NULL, since it does not really gain us
anything. ok mikeb@
Diffstat (limited to 'sys/dev/softraid_crypto.c')
-rw-r--r--sys/dev/softraid_crypto.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/sys/dev/softraid_crypto.c b/sys/dev/softraid_crypto.c
index 2662fc1c4e6..9518925088b 100644
--- a/sys/dev/softraid_crypto.c
+++ b/sys/dev/softraid_crypto.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid_crypto.c,v 1.98 2013/12/21 20:46:20 guenther Exp $ */
+/* $OpenBSD: softraid_crypto.c,v 1.99 2014/01/20 04:12:51 jsing Exp $ */
/*
* Copyright (c) 2007 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2008 Hans-Joerg Hoexer <hshoexer@openbsd.org>
@@ -332,9 +332,6 @@ sr_crypto_wu_get(struct sr_workunit *wu, int encrypt)
return (crwu);
unwind:
- /* steal the descriptors back from the cryptop */
- crwu->cr_crp->crp_desc = NULL;
-
return (NULL);
}
@@ -348,9 +345,6 @@ sr_crypto_wu_put(struct sr_crypto_wu *crwu)
DNPRINTF(SR_D_DIS, "%s: sr_crypto_wu_put crwu: %p\n",
DEVNAME(wu->swu_dis->sd_sc), crwu);
- /* steal the descriptors back from the cryptop */
- crp->crp_desc = NULL;
-
mtx_enter(&sd->mds.mdd_crypto.scr_mutex);
TAILQ_INSERT_TAIL(&sd->mds.mdd_crypto.scr_wus, crwu, cr_link);
mtx_leave(&sd->mds.mdd_crypto.scr_mutex);
@@ -996,9 +990,7 @@ sr_crypto_alloc_resources(struct sr_discipline *sd)
crwu->cr_crp = crypto_getreq(MAXPHYS >> DEV_BSHIFT);
if (crwu->cr_crp == NULL)
return (ENOMEM);
- /* steal the list of cryptodescs */
crwu->cr_descs = crwu->cr_crp->crp_desc;
- crwu->cr_crp->crp_desc = NULL;
}
bzero(&cri, sizeof(cri));
@@ -1067,7 +1059,6 @@ sr_crypto_free_resources(struct sr_discipline *sd)
if (crwu->cr_dmabuf != NULL)
dma_free(crwu->cr_dmabuf, MAXPHYS);
if (crwu->cr_crp) {
- /* twiddle cryptoreq back */
crwu->cr_crp->crp_desc = crwu->cr_descs;
crypto_freereq(crwu->cr_crp);
}