Lines Matching refs:cdesc
289 static void free_cdesc(struct cryptocop_dma_desc *cdesc) in free_cdesc() argument
291 DEBUG(printk("free_cdesc: cdesc 0x%p, from_pool=%d\n", cdesc, cdesc->from_pool)); in free_cdesc()
292 kfree(cdesc->free_buf); in free_cdesc()
294 if (cdesc->from_pool) { in free_cdesc()
297 cdesc->next = descr_pool_free_list; in free_cdesc()
298 descr_pool_free_list = cdesc; in free_cdesc()
302 kfree(cdesc); in free_cdesc()
310 struct cryptocop_dma_desc *cdesc; in alloc_cdesc() local
320 cdesc = descr_pool_free_list; in alloc_cdesc()
324 cdesc->from_pool = 1; in alloc_cdesc()
326 cdesc = kmalloc(sizeof(struct cryptocop_dma_desc), alloc_flag); in alloc_cdesc()
327 if (!cdesc) { in alloc_cdesc()
331 cdesc->from_pool = 0; in alloc_cdesc()
333 …cdesc->dma_descr = (dma_descr_data*)(((unsigned long int)cdesc + offsetof(struct cryptocop_dma_des… in alloc_cdesc()
335 cdesc->next = NULL; in alloc_cdesc()
337 cdesc->free_buf = NULL; in alloc_cdesc()
338 cdesc->dma_descr->out_eop = 0; in alloc_cdesc()
339 cdesc->dma_descr->in_eop = 0; in alloc_cdesc()
340 cdesc->dma_descr->intr = 0; in alloc_cdesc()
341 cdesc->dma_descr->eol = 0; in alloc_cdesc()
342 cdesc->dma_descr->wait = 0; in alloc_cdesc()
343 cdesc->dma_descr->buf = NULL; in alloc_cdesc()
344 cdesc->dma_descr->after = NULL; in alloc_cdesc()
346 …_cdesc: return 0x%p, cdesc->dma_descr=0x%p, from_pool=%d\n", cdesc, cdesc->dma_descr, cdesc->from_… in alloc_cdesc()
347 return cdesc; in alloc_cdesc()
370 struct cryptocop_dma_desc *cdesc = NULL; in create_pad_descriptor() local
384 cdesc = alloc_cdesc(alloc_flag); in create_pad_descriptor()
385 if (!cdesc){ in create_pad_descriptor()
396 cdesc->free_buf = pad; in create_pad_descriptor()
407 cdesc->free_buf = pad; in create_pad_descriptor()
417 pad = (char*)cdesc; /* Use any pointer. */ in create_pad_descriptor()
423 cdesc->dma_descr->wait = 1; in create_pad_descriptor()
424 …cdesc->dma_descr->out_eop = 1; /* Since this is a pad output is pushed. EOP is ok here since the … in create_pad_descriptor()
425 cdesc->dma_descr->buf = (char*)virt_to_phys((char*)pad); in create_pad_descriptor()
426 cdesc->dma_descr->after = cdesc->dma_descr->buf + plen; in create_pad_descriptor()
428 cdesc->dma_descr->md = REG_TYPE_CONV(unsigned short int, struct strcop_meta_out, mo); in create_pad_descriptor()
429 *pad_desc = cdesc; in create_pad_descriptor()
434 if (cdesc) free_cdesc(cdesc); in create_pad_descriptor()
614 struct cryptocop_dma_desc *cdesc; in create_output_descriptors() local
618 cdesc = alloc_cdesc(alloc_flag); in create_output_descriptors()
619 if (!cdesc) { in create_output_descriptors()
623 (*current_out_cdesc)->next = cdesc; in create_output_descriptors()
624 (*current_out_cdesc) = cdesc; in create_output_descriptors()
626 cdesc->free_buf = NULL; in create_output_descriptors()
628 …cdesc->dma_descr->buf = (char*)virt_to_phys(operation->tfrm_op.indata[*iniov_ix].iov_base + *iniov… in create_output_descriptors()
629 cdesc->dma_descr->after = cdesc->dma_descr->buf + dlength; in create_output_descriptors()
642 cdesc->dma_descr->md = REG_TYPE_CONV(unsigned short int, struct strcop_meta_out, (*meta_out)); in create_output_descriptors()