Lines Matching refs:cqp_request

564 	struct nes_cqp_request *cqp_request = NULL;  in nes_get_cqp_request()  local
569 cqp_request = list_entry(nesdev->cqp_avail_reqs.next, in nes_get_cqp_request()
571 list_del_init(&cqp_request->list); in nes_get_cqp_request()
575 if (cqp_request == NULL) { in nes_get_cqp_request()
576 cqp_request = kzalloc(sizeof(struct nes_cqp_request), GFP_ATOMIC); in nes_get_cqp_request()
577 if (cqp_request) { in nes_get_cqp_request()
578 cqp_request->dynamic = 1; in nes_get_cqp_request()
579 INIT_LIST_HEAD(&cqp_request->list); in nes_get_cqp_request()
583 if (cqp_request) { in nes_get_cqp_request()
584 init_waitqueue_head(&cqp_request->waitq); in nes_get_cqp_request()
585 cqp_request->waiting = 0; in nes_get_cqp_request()
586 cqp_request->request_done = 0; in nes_get_cqp_request()
587 cqp_request->callback = 0; in nes_get_cqp_request()
588 init_waitqueue_head(&cqp_request->waitq); in nes_get_cqp_request()
590 cqp_request); in nes_get_cqp_request()
595 return cqp_request; in nes_get_cqp_request()
599 struct nes_cqp_request *cqp_request) in nes_free_cqp_request() argument
604 cqp_request, in nes_free_cqp_request()
605 le32_to_cpu(cqp_request->cqp_wqe.wqe_words[NES_CQP_WQE_OPCODE_IDX]) & 0x3f); in nes_free_cqp_request()
607 if (cqp_request->dynamic) { in nes_free_cqp_request()
608 kfree(cqp_request); in nes_free_cqp_request()
611 list_add_tail(&cqp_request->list, &nesdev->cqp_avail_reqs); in nes_free_cqp_request()
617 struct nes_cqp_request *cqp_request) in nes_put_cqp_request() argument
619 if (atomic_dec_and_test(&cqp_request->refcount)) in nes_put_cqp_request()
620 nes_free_cqp_request(nesdev, cqp_request); in nes_put_cqp_request()
628 struct nes_cqp_request *cqp_request) in nes_post_cqp_request() argument
645 memcpy(cqp_wqe, &cqp_request->cqp_wqe, sizeof(*cqp_wqe)); in nes_post_cqp_request()
650 u64temp = (unsigned long)cqp_request; in nes_post_cqp_request()
656 le32_to_cpu(cqp_wqe->wqe_words[NES_CQP_WQE_ID_IDX]), cqp_request, in nes_post_cqp_request()
658 cqp_request->waiting, atomic_read(&cqp_request->refcount)); in nes_post_cqp_request()
669 cqp_request, in nes_post_cqp_request()
670 le32_to_cpu(cqp_request->cqp_wqe.wqe_words[NES_CQP_WQE_OPCODE_IDX])&0x3f, in nes_post_cqp_request()
671 le32_to_cpu(cqp_request->cqp_wqe.wqe_words[NES_CQP_WQE_ID_IDX])); in nes_post_cqp_request()
672 list_add_tail(&cqp_request->list, &nesdev->cqp_pending_reqs); in nes_post_cqp_request()