Lines Matching refs:slotp
94 struct blk_crypto_fallback_keyslot *slotp = &blk_crypto_keyslots[slot]; in blk_crypto_fallback_evict_keyslot() local
95 enum blk_crypto_mode_num crypto_mode = slotp->crypto_mode; in blk_crypto_fallback_evict_keyslot()
98 WARN_ON(slotp->crypto_mode == BLK_ENCRYPTION_MODE_INVALID); in blk_crypto_fallback_evict_keyslot()
101 err = crypto_skcipher_setkey(slotp->tfms[crypto_mode], blank_key, in blk_crypto_fallback_evict_keyslot()
104 slotp->crypto_mode = BLK_ENCRYPTION_MODE_INVALID; in blk_crypto_fallback_evict_keyslot()
112 struct blk_crypto_fallback_keyslot *slotp = &blk_crypto_keyslots[slot]; in blk_crypto_fallback_keyslot_program() local
117 if (crypto_mode != slotp->crypto_mode && in blk_crypto_fallback_keyslot_program()
118 slotp->crypto_mode != BLK_ENCRYPTION_MODE_INVALID) in blk_crypto_fallback_keyslot_program()
121 slotp->crypto_mode = crypto_mode; in blk_crypto_fallback_keyslot_program()
122 err = crypto_skcipher_setkey(slotp->tfms[crypto_mode], key->raw, in blk_crypto_fallback_keyslot_program()
193 const struct blk_crypto_fallback_keyslot *slotp; in blk_crypto_fallback_alloc_cipher_req() local
196 slotp = &blk_crypto_keyslots[keyslot_idx]; in blk_crypto_fallback_alloc_cipher_req()
197 ciph_req = skcipher_request_alloc(slotp->tfms[slotp->crypto_mode], in blk_crypto_fallback_alloc_cipher_req()
625 struct blk_crypto_fallback_keyslot *slotp; in blk_crypto_fallback_start_using_mode() local
646 slotp = &blk_crypto_keyslots[i]; in blk_crypto_fallback_start_using_mode()
647 slotp->tfms[mode_num] = crypto_alloc_skcipher(cipher_str, 0, 0); in blk_crypto_fallback_start_using_mode()
648 if (IS_ERR(slotp->tfms[mode_num])) { in blk_crypto_fallback_start_using_mode()
649 err = PTR_ERR(slotp->tfms[mode_num]); in blk_crypto_fallback_start_using_mode()
655 slotp->tfms[mode_num] = NULL; in blk_crypto_fallback_start_using_mode()
659 crypto_skcipher_set_flags(slotp->tfms[mode_num], in blk_crypto_fallback_start_using_mode()
672 slotp = &blk_crypto_keyslots[i]; in blk_crypto_fallback_start_using_mode()
673 crypto_free_skcipher(slotp->tfms[mode_num]); in blk_crypto_fallback_start_using_mode()
674 slotp->tfms[mode_num] = NULL; in blk_crypto_fallback_start_using_mode()