Lines Matching refs:pj
225 static int cryptocop_job_setup(struct cryptocop_prio_job **pj, struct cryptocop_operation *operatio…
1587 struct cryptocop_prio_job *pj; in cryptocop_free_session() local
1614 pj = list_entry(node, struct cryptocop_prio_job, node); in cryptocop_free_session()
1615 if (pj->oper->sid == sid) { in cryptocop_free_session()
1625 pj = list_entry(node, struct cryptocop_prio_job, node); in cryptocop_free_session()
1626 …pj->oper->operation_status = -EAGAIN; /* EAGAIN is not ideal for job/session terminated but it's … in cryptocop_free_session()
1627 …DEBUG(printk("cryptocop_free_session: pj=0x%p, pj->oper=0x%p, pj->iop=0x%p\n", pj, pj->oper, pj->i… in cryptocop_free_session()
1628 pj->oper->cb(pj->oper, pj->oper->cb_data); in cryptocop_free_session()
1629 delete_internal_operation(pj->iop); in cryptocop_free_session()
1630 kfree(pj); in cryptocop_free_session()
1836 struct cryptocop_prio_job *pj = NULL; in cryptocop_job_queue_insert() local
1846 if ((ret = cryptocop_job_setup(&pj, operation)) != 0){ in cryptocop_job_queue_insert()
1850 assert(pj != NULL); in cryptocop_job_queue_insert()
1853 list_add_tail(&pj->node, &cryptocop_job_queues[prio].jobs); in cryptocop_job_queue_insert()
1867 struct cryptocop_prio_job *pj = NULL; in cryptocop_do_tasklet() local
1877 pj = list_entry(node, struct cryptocop_prio_job, node); in cryptocop_do_tasklet()
1879 pj = NULL; in cryptocop_do_tasklet()
1882 if (pj) { in cryptocop_do_tasklet()
1883 assert(pj->oper != NULL); in cryptocop_do_tasklet()
1886 …DEBUG(printk("cryptocop_do_tasklet: callback 0x%p, data 0x%p\n", pj->oper->cb, pj->oper->cb_data)); in cryptocop_do_tasklet()
1888 pj->oper->operation_status = 0; /* Job is completed. */ in cryptocop_do_tasklet()
1889 pj->oper->cb(pj->oper, pj->oper->cb_data); in cryptocop_do_tasklet()
1890 delete_internal_operation(pj->iop); in cryptocop_do_tasklet()
1891 kfree(pj); in cryptocop_do_tasklet()
1893 } while (pj != NULL); in cryptocop_do_tasklet()
2045 struct cryptocop_prio_job *pj = NULL; in cryptocop_job_queue_close() local
2059 pj = list_entry(node, struct cryptocop_prio_job, node); in cryptocop_job_queue_close()
2063 …DEBUG(printk("cryptocop_job_queue_close: callback 0x%p, data 0x%p\n", pj->oper->cb, pj->oper->cb_d… in cryptocop_job_queue_close()
2064 pj->oper->operation_status = -EINTR; /* Job is terminated without completion. */ in cryptocop_job_queue_close()
2065 pj->oper->cb(pj->oper, pj->oper->cb_data); in cryptocop_job_queue_close()
2067 delete_internal_operation(pj->iop); in cryptocop_job_queue_close()
2068 kfree(pj); in cryptocop_job_queue_close()
2094 pj = cryptocop_running_job; in cryptocop_job_queue_close()
2098 …DEBUG(printk("cryptocop_job_queue_close: callback 0x%p, data 0x%p\n", pj->oper->cb, pj->oper->cb_d… in cryptocop_job_queue_close()
2099 pj->oper->operation_status = -EINTR; /* Job is terminated without completion. */ in cryptocop_job_queue_close()
2100 pj->oper->cb(pj->oper, pj->oper->cb_data); in cryptocop_job_queue_close()
2102 delete_internal_operation(pj->iop); in cryptocop_job_queue_close()
2103 kfree(pj); in cryptocop_job_queue_close()
2111 pj = list_entry(node, struct cryptocop_prio_job, node); in cryptocop_job_queue_close()
2114 …DEBUG(printk("cryptocop_job_queue_close: callback 0x%p, data 0x%p\n", pj->oper->cb, pj->oper->cb_d… in cryptocop_job_queue_close()
2115 pj->oper->operation_status = -EINTR; /* Job is terminated without completion. */ in cryptocop_job_queue_close()
2116 pj->oper->cb(pj->oper, pj->oper->cb_data); in cryptocop_job_queue_close()
2118 delete_internal_operation(pj->iop); in cryptocop_job_queue_close()
2119 kfree(pj); in cryptocop_job_queue_close()
2128 struct cryptocop_prio_job *pj; in cryptocop_start_job() local
2161 pj = list_entry(cryptocop_job_queues[i].jobs.next, struct cryptocop_prio_job, node); in cryptocop_start_job()
2162 list_del(&pj->node); in cryptocop_start_job()
2164 cryptocop_running_job = pj; in cryptocop_start_job()
2167 switch (pj->iop->tdes_mode){ in cryptocop_start_job()
2211 switch (pj->iop->csum_mode){ in cryptocop_start_job()
2226 pj, in cryptocop_start_job()
2227 &pj->iop->ctx_in, (char*)virt_to_phys(&pj->iop->ctx_in), in cryptocop_start_job()
2228 &pj->iop->ctx_out, (char*)virt_to_phys(&pj->iop->ctx_out))); in cryptocop_start_job()
2231 flush_dma_context(&pj->iop->ctx_in); in cryptocop_start_job()
2232 DMA_START_CONTEXT(IN_DMA_INST, virt_to_phys(&pj->iop->ctx_in)); in cryptocop_start_job()
2235 DMA_START_CONTEXT(OUT_DMA_INST, virt_to_phys(&pj->iop->ctx_out)); in cryptocop_start_job()
2242 static int cryptocop_job_setup(struct cryptocop_prio_job **pj, struct cryptocop_operation *operatio… in cryptocop_job_setup() argument
2248 *pj = kmalloc(sizeof (struct cryptocop_prio_job), alloc_flag); in cryptocop_job_setup()
2249 if (!*pj) return -ENOMEM; in cryptocop_job_setup()
2253 (*pj)->oper = operation; in cryptocop_job_setup()
2254 …DEBUG(printk("cryptocop_job_setup, cb=0x%p cb_data=0x%p\n", (*pj)->oper->cb, (*pj)->oper->cb_data… in cryptocop_job_setup()
2260 kfree(*pj); in cryptocop_job_setup()
2266 kfree(*pj); in cryptocop_job_setup()
2269 …(*pj)->iop = (struct cryptocop_int_operation*)(((unsigned long int)(iop_alloc_ptr + DESCR_ALLOC_PA… in cryptocop_job_setup()
2270 DEBUG(memset((*pj)->iop, 0xff, sizeof(struct cryptocop_int_operation))); in cryptocop_job_setup()
2271 (*pj)->iop->alloc_ptr = iop_alloc_ptr; in cryptocop_job_setup()
2272 (*pj)->iop->sid = operation->sid; in cryptocop_job_setup()
2273 (*pj)->iop->cdesc_out = NULL; in cryptocop_job_setup()
2274 (*pj)->iop->cdesc_in = NULL; in cryptocop_job_setup()
2275 (*pj)->iop->tdes_mode = operation->list_op.tdes_mode; in cryptocop_job_setup()
2276 (*pj)->iop->csum_mode = operation->list_op.csum_mode; in cryptocop_job_setup()
2277 (*pj)->iop->ddesc_out = operation->list_op.outlist; in cryptocop_job_setup()
2278 (*pj)->iop->ddesc_in = operation->list_op.inlist; in cryptocop_job_setup()
2281 (*pj)->iop->ctx_out.next = NULL; in cryptocop_job_setup()
2282 (*pj)->iop->ctx_out.eol = 1; in cryptocop_job_setup()
2283 (*pj)->iop->ctx_out.saved_data = operation->list_op.outlist; in cryptocop_job_setup()
2284 (*pj)->iop->ctx_out.saved_data_buf = operation->list_op.out_data_buf; in cryptocop_job_setup()
2286 (*pj)->iop->ctx_in.next = NULL; in cryptocop_job_setup()
2287 (*pj)->iop->ctx_in.eol = 1; in cryptocop_job_setup()
2288 (*pj)->iop->ctx_in.saved_data = operation->list_op.inlist; in cryptocop_job_setup()
2289 (*pj)->iop->ctx_in.saved_data_buf = operation->list_op.in_data_buf; in cryptocop_job_setup()
2291 if ((err = cryptocop_setup_dma_list(operation, &(*pj)->iop, alloc_flag))) { in cryptocop_job_setup()
2293 kfree(*pj); in cryptocop_job_setup()
2297 DEBUG(print_dma_descriptors((*pj)->iop)); in cryptocop_job_setup()