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

Function padlock_attach

freebsd/crypto/via/padlock.c:116–130  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

114}
115
116static int
117padlock_attach(device_t dev)
118{
119 struct padlock_softc *sc = device_get_softc(dev);
120
121 sc->sc_cid = crypto_get_driverid(dev, sizeof(struct padlock_session),
122 CRYPTOCAP_F_SOFTWARE | CRYPTOCAP_F_SYNC |
123 CRYPTOCAP_F_ACCEL_SOFTWARE);
124 if (sc->sc_cid < 0) {
125 device_printf(dev, "Could not get crypto driver id.\n");
126 return (ENOMEM);
127 }
128
129 return (0);
130}
131
132static int
133padlock_detach(device_t dev)

Callers

nothing calls this directly

Calls 3

device_get_softcFunction · 0.85
crypto_get_driveridFunction · 0.85
device_printfFunction · 0.85

Tested by

no test coverage detected