Lines Matching refs:cqp
572 struct irdma_cqp *cqp = &rf->cqp; in irdma_destroy_cqp() local
578 status = irdma_sc_cqp_destroy(dev->cqp); in irdma_destroy_cqp()
583 dma_free_coherent(dev->hw->device, cqp->sq.size, cqp->sq.va, in irdma_destroy_cqp()
584 cqp->sq.pa); in irdma_destroy_cqp()
585 cqp->sq.va = NULL; in irdma_destroy_cqp()
586 kfree(cqp->scratch_array); in irdma_destroy_cqp()
587 cqp->scratch_array = NULL; in irdma_destroy_cqp()
588 kfree(cqp->cqp_requests); in irdma_destroy_cqp()
589 cqp->cqp_requests = NULL; in irdma_destroy_cqp()
847 return irdma_sc_static_hmc_pages_allocated(dev->cqp, 0, dev->hmc_fn_id, in irdma_create_hmc_objs()
910 struct irdma_cqp *cqp = &rf->cqp; in irdma_create_cqp() local
914 cqp->cqp_requests = kcalloc(sqsize, sizeof(*cqp->cqp_requests), GFP_KERNEL); in irdma_create_cqp()
915 if (!cqp->cqp_requests) in irdma_create_cqp()
918 cqp->scratch_array = kcalloc(sqsize, sizeof(*cqp->scratch_array), GFP_KERNEL); in irdma_create_cqp()
919 if (!cqp->scratch_array) { in irdma_create_cqp()
920 kfree(cqp->cqp_requests); in irdma_create_cqp()
924 dev->cqp = &cqp->sc_cqp; in irdma_create_cqp()
925 dev->cqp->dev = dev; in irdma_create_cqp()
926 cqp->sq.size = ALIGN(sizeof(struct irdma_cqp_sq_wqe) * sqsize, in irdma_create_cqp()
928 cqp->sq.va = dma_alloc_coherent(dev->hw->device, cqp->sq.size, in irdma_create_cqp()
929 &cqp->sq.pa, GFP_KERNEL); in irdma_create_cqp()
930 if (!cqp->sq.va) { in irdma_create_cqp()
931 kfree(cqp->scratch_array); in irdma_create_cqp()
932 kfree(cqp->cqp_requests); in irdma_create_cqp()
941 dev->cqp->host_ctx_pa = mem.pa; in irdma_create_cqp()
942 dev->cqp->host_ctx = mem.va; in irdma_create_cqp()
946 cqp_init_info.sq = cqp->sq.va; in irdma_create_cqp()
947 cqp_init_info.sq_pa = cqp->sq.pa; in irdma_create_cqp()
951 cqp_init_info.scratch_array = cqp->scratch_array; in irdma_create_cqp()
962 status = irdma_sc_cqp_init(dev->cqp, &cqp_init_info); in irdma_create_cqp()
968 spin_lock_init(&cqp->req_lock); in irdma_create_cqp()
969 spin_lock_init(&cqp->compl_lock); in irdma_create_cqp()
971 status = irdma_sc_cqp_create(dev->cqp, &maj_err, &min_err); in irdma_create_cqp()
979 INIT_LIST_HEAD(&cqp->cqp_avail_reqs); in irdma_create_cqp()
980 INIT_LIST_HEAD(&cqp->cqp_pending_reqs); in irdma_create_cqp()
984 init_waitqueue_head(&cqp->cqp_requests[i].waitq); in irdma_create_cqp()
985 list_add_tail(&cqp->cqp_requests[i].list, &cqp->cqp_avail_reqs); in irdma_create_cqp()
987 init_waitqueue_head(&cqp->remove_wq); in irdma_create_cqp()
1179 scratch = (uintptr_t)&rf->cqp.sc_cqp; in irdma_create_ceq()
2048 spin_lock_irqsave(&rf->cqp.compl_lock, flags); in irdma_cqp_ce_handler()
2050 spin_unlock_irqrestore(&rf->cqp.compl_lock, flags); in irdma_cqp_ce_handler()
2070 irdma_put_cqp_request(&rf->cqp, cqp_request); in irdma_cqp_ce_handler()
2074 irdma_put_cqp_request(&rf->cqp, cqp_request); in irdma_cqp_ce_handler()
2160 struct irdma_cqp *iwcqp = &rf->cqp; in irdma_del_local_mac_entry()
2171 cqp_info->in.u.del_local_mac_entry.cqp = &iwcqp->sc_cqp; in irdma_del_local_mac_entry()
2190 struct irdma_cqp *iwcqp = &rf->cqp; in irdma_add_local_mac_entry()
2206 cqp_info->in.u.add_local_mac_entry.cqp = &iwcqp->sc_cqp; in irdma_add_local_mac_entry()
2226 struct irdma_cqp *iwcqp = &rf->cqp; in irdma_alloc_local_mac_entry()
2238 cqp_info->in.u.alloc_local_mac_entry.cqp = &iwcqp->sc_cqp; in irdma_alloc_local_mac_entry()
2263 cqp_request = irdma_alloc_and_get_cqp_request(&iwdev->rf->cqp, add_port); in irdma_cqp_manage_apbvt_cmd()
2274 cqp_info->in.u.manage_apbvt_entry.cqp = &iwdev->rf->cqp.sc_cqp; in irdma_cqp_manage_apbvt_cmd()
2280 irdma_put_cqp_request(&iwdev->rf->cqp, cqp_request); in irdma_cqp_manage_apbvt_cmd()
2370 cqp_request = irdma_alloc_and_get_cqp_request(&rf->cqp, false); in irdma_manage_arp_cache()
2384 cqp_info->in.u.add_arp_cache_entry.cqp = &rf->cqp.sc_cqp; in irdma_manage_arp_cache()
2389 cqp_info->in.u.del_arp_cache_entry.cqp = &rf->cqp.sc_cqp; in irdma_manage_arp_cache()
2395 irdma_put_cqp_request(&rf->cqp, cqp_request); in irdma_manage_arp_cache()
2425 struct irdma_cqp *iwcqp = &iwdev->rf->cqp; in irdma_manage_qhash()
2490 cqp_info->in.u.manage_qhash_table_entry.cqp = &iwdev->rf->cqp.sc_cqp; in irdma_manage_qhash()
2556 cqp_request = irdma_alloc_and_get_cqp_request(&rf->cqp, wait); in irdma_hw_flush_wqes()
2573 irdma_put_cqp_request(&rf->cqp, cqp_request); in irdma_hw_flush_wqes()
2604 new_req = irdma_alloc_and_get_cqp_request(&rf->cqp, true); in irdma_hw_flush_wqes()
2626 irdma_put_cqp_request(&rf->cqp, new_req); in irdma_hw_flush_wqes()
2644 irdma_put_cqp_request(&rf->cqp, cqp_request); in irdma_hw_flush_wqes()
2663 cqp_request = irdma_alloc_and_get_cqp_request(&rf->cqp, wait); in irdma_gen_ae()
2676 irdma_put_cqp_request(&rf->cqp, cqp_request); in irdma_gen_ae()