aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/crypto/blake2/blake2_cryptodev.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/sys/crypto/blake2/blake2_cryptodev.c b/sys/crypto/blake2/blake2_cryptodev.c
index 755ac12c5d78..5c3ec07d7de7 100644
--- a/sys/crypto/blake2/blake2_cryptodev.c
+++ b/sys/crypto/blake2/blake2_cryptodev.c
@@ -29,11 +29,9 @@
#include <sys/bus.h>
#include <sys/kernel.h>
#include <sys/kobj.h>
-#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/module.h>
#include <sys/mutex.h>
-#include <sys/rwlock.h>
#include <sys/smp.h>
#include <blake2.h>
@@ -49,9 +47,7 @@ struct blake2_session {
CTASSERT((size_t)BLAKE2B_KEYBYTES > (size_t)BLAKE2S_KEYBYTES);
struct blake2_softc {
- bool dying;
int32_t cid;
- struct rwlock lock;
};
static int blake2_cipher_setup(struct blake2_session *ses,
@@ -84,7 +80,6 @@ blake2_attach(device_t dev)
struct blake2_softc *sc;
sc = device_get_softc(dev);
- sc->dying = false;
sc->cid = crypto_get_driverid(dev, sizeof(struct blake2_session),
CRYPTOCAP_F_SOFTWARE | CRYPTOCAP_F_SYNC |
@@ -94,8 +89,6 @@ blake2_attach(device_t dev)
return (ENOMEM);
}
- rw_init(&sc->lock, "blake2_lock");
-
return (0);
}
@@ -106,13 +99,8 @@ blake2_detach(device_t dev)
sc = device_get_softc(dev);
- rw_wlock(&sc->lock);
- sc->dying = true;
- rw_wunlock(&sc->lock);
crypto_unregister_all(sc->cid);
- rw_destroy(&sc->lock);
-
return (0);
}
@@ -142,21 +130,11 @@ static int
blake2_newsession(device_t dev, crypto_session_t cses,
const struct crypto_session_params *csp)
{
- struct blake2_softc *sc;
struct blake2_session *ses;
int error;
- sc = device_get_softc(dev);
-
ses = crypto_get_driver_session(cses);
- rw_rlock(&sc->lock);
- if (sc->dying) {
- rw_runlock(&sc->lock);
- return (EINVAL);
- }
- rw_runlock(&sc->lock);
-
error = blake2_cipher_setup(ses, csp);
if (error != 0) {
CRYPTDEB("setup failed");