Lines Matching refs:cop

56 hash_n_crypt(struct csession *ses_ptr, struct crypt_op *cop,  in hash_n_crypt()  argument
65 if (cop->op == COP_ENCRYPT) { in hash_n_crypt()
104 __crypto_run_std(struct csession *ses_ptr, struct crypt_op *cop) in __crypto_run_std() argument
112 nbytes = cop->len; in __crypto_run_std()
122 src = cop->src; in __crypto_run_std()
123 dst = cop->dst; in __crypto_run_std()
136 ret = hash_n_crypt(ses_ptr, cop, &sg, &sg, current_len); in __crypto_run_std()
167 struct crypt_op *cop = &kcop->cop; in __crypto_run_zc() local
170 ret = cryptodev_get_userbuf(ses_ptr, cop->src, cop->len, cop->dst, cop->len, in __crypto_run_zc()
174 return __crypto_run_std(ses_ptr, cop); in __crypto_run_zc()
177 ret = hash_n_crypt(ses_ptr, cop, src_sg, dst_sg, cop->len); in __crypto_run_zc()
186 struct crypt_op *cop = &kcop->cop; in crypto_run() local
189 if (unlikely(cop->op != COP_ENCRYPT && cop->op != COP_DECRYPT)) { in crypto_run()
190 ddebug(1, "invalid operation op=%u", cop->op); in crypto_run()
195 ses_ptr = crypto_get_session_by_sid(fcr, cop->ses); in crypto_run()
197 derr(1, "invalid session ID=0x%08X", cop->ses); in crypto_run()
201 if (ses_ptr->hdata.init != 0 && (cop->flags == 0 || cop->flags & COP_FLAG_RESET)) { in crypto_run()
212 if (unlikely(cop->len % blocksize)) { in crypto_run()
214 cop->len, blocksize); in crypto_run()
223 if (likely(cop->len)) { in crypto_run()
224 if (!(cop->flags & COP_FLAG_NO_ZC)) { in crypto_run()
225 …if (unlikely(ses_ptr->alignmask && !IS_ALIGNED((unsigned long)cop->src, ses_ptr->alignmask + 1))) { in crypto_run()
227 cop->src, ses_ptr->alignmask + 1); in crypto_run()
228 cop->flags |= COP_FLAG_NO_ZC; in crypto_run()
231 …if (unlikely(ses_ptr->alignmask && !IS_ALIGNED((unsigned long)cop->dst, ses_ptr->alignmask + 1))) { in crypto_run()
233 cop->dst, ses_ptr->alignmask + 1); in crypto_run()
234 cop->flags |= COP_FLAG_NO_ZC; in crypto_run()
238 if (cop->flags & COP_FLAG_NO_ZC) in crypto_run()
239 ret = __crypto_run_std(ses_ptr, &kcop->cop); in crypto_run()
252 ((cop->flags & COP_FLAG_FINAL) || in crypto_run()
253 (!(cop->flags & COP_FLAG_UPDATE) || cop->len == 0))) { in crypto_run()