MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ccp_detach

Function ccp_detach

freebsd/crypto/ccp/ccp.c:205–228  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203}
204
205static int
206ccp_detach(device_t dev)
207{
208 struct ccp_softc *sc;
209
210 sc = device_get_softc(dev);
211
212 mtx_lock(&sc->lock);
213 sc->detaching = true;
214 mtx_unlock(&sc->lock);
215
216 crypto_unregister_all(sc->cid);
217 if (g_ccp_softc == sc && (sc->hw_features & VERSION_CAP_TRNG) != 0)
218 random_source_deregister(&random_ccp);
219
220 ccp_hw_detach(dev);
221 ccp_free_queues(sc);
222
223 if (g_ccp_softc == sc)
224 g_ccp_softc = NULL;
225
226 mtx_destroy(&sc->lock);
227 return (0);
228}
229
230static void
231ccp_init_hmac_digest(struct ccp_session *s, const char *key, int klen)

Callers

nothing calls this directly

Calls 6

device_get_softcFunction · 0.85
crypto_unregister_allFunction · 0.85
ccp_hw_detachFunction · 0.85
ccp_free_queuesFunction · 0.85
mtx_lockFunction · 0.50
mtx_unlockFunction · 0.50

Tested by

no test coverage detected