* Clear blockage on a driver. The what parameter indicates whether * the driver is now ready for cryptop's and/or cryptokop's. */
| 1188 | * the driver is now ready for cryptop's and/or cryptokop's. |
| 1189 | */ |
| 1190 | int |
| 1191 | crypto_unblock(uint32_t driverid, int what) |
| 1192 | { |
| 1193 | struct cryptocap *cap; |
| 1194 | int err; |
| 1195 | |
| 1196 | CRYPTO_Q_LOCK(); |
| 1197 | cap = crypto_checkdriver(driverid); |
| 1198 | if (cap != NULL) { |
| 1199 | if (what & CRYPTO_SYMQ) |
| 1200 | cap->cc_qblocked = 0; |
| 1201 | if (what & CRYPTO_ASYMQ) |
| 1202 | cap->cc_kqblocked = 0; |
| 1203 | if (crp_sleep) |
| 1204 | wakeup_one(&crp_q); |
| 1205 | err = 0; |
| 1206 | } else |
| 1207 | err = EINVAL; |
| 1208 | CRYPTO_Q_UNLOCK(); |
| 1209 | |
| 1210 | return err; |
| 1211 | } |
| 1212 | |
| 1213 | size_t |
| 1214 | crypto_buffer_len(struct crypto_buffer *cb) |
no test coverage detected