Lines Matching defs:cqp
587 * Issue destroy cqp request and
588 * free the resources associated with the cqp
593 struct irdma_cqp *cqp = &rf->cqp;
596 status = irdma_sc_cqp_destroy(dev->cqp);
601 dma_free_coherent(dev->hw->device, cqp->sq.size, cqp->sq.va,
602 cqp->sq.pa);
603 cqp->sq.va = NULL;
604 kfree(cqp->scratch_array);
605 cqp->scratch_array = NULL;
606 kfree(cqp->cqp_requests);
607 cqp->cqp_requests = NULL;
870 return irdma_sc_static_hmc_pages_allocated(dev->cqp, 0, dev->hmc_fn_id,
924 * Return 0, if the cqp and all the resources associated with it
933 struct irdma_cqp *cqp = &rf->cqp;
937 cqp->cqp_requests = kcalloc(sqsize, sizeof(*cqp->cqp_requests), GFP_KERNEL);
938 if (!cqp->cqp_requests)
941 cqp->scratch_array = kcalloc(sqsize, sizeof(*cqp->scratch_array), GFP_KERNEL);
942 if (!cqp->scratch_array) {
947 dev->cqp = &cqp->sc_cqp;
948 dev->cqp->dev = dev;
949 cqp->sq.size = ALIGN(sizeof(struct irdma_cqp_sq_wqe) * sqsize,
951 cqp->sq.va = dma_alloc_coherent(dev->hw->device, cqp->sq.size,
952 &cqp->sq.pa, GFP_KERNEL);
953 if (!cqp->sq.va) {
963 dev->cqp->host_ctx_pa = mem.pa;
964 dev->cqp->host_ctx = mem.va;
965 /* populate the cqp init info */
968 cqp_init_info.sq = cqp->sq.va;
969 cqp_init_info.sq_pa = cqp->sq.pa;
973 cqp_init_info.scratch_array = cqp->scratch_array;
984 status = irdma_sc_cqp_init(dev->cqp, &cqp_init_info);
986 ibdev_dbg(to_ibdev(dev), "ERR: cqp init status %d\n", status);
990 spin_lock_init(&cqp->req_lock);
991 spin_lock_init(&cqp->compl_lock);
993 status = irdma_sc_cqp_create(dev->cqp, &maj_err, &min_err);
996 "ERR: cqp create failed - status %d maj_err %d min_err %d\n",
1001 INIT_LIST_HEAD(&cqp->cqp_avail_reqs);
1002 INIT_LIST_HEAD(&cqp->cqp_pending_reqs);
1006 init_waitqueue_head(&cqp->cqp_requests[i].waitq);
1007 list_add_tail(&cqp->cqp_requests[i].list, &cqp->cqp_avail_reqs);
1009 init_waitqueue_head(&cqp->remove_wq);
1013 dma_free_coherent(dev->hw->device, cqp->sq.size,
1014 cqp->sq.va, cqp->sq.pa);
1015 cqp->sq.va = NULL;
1017 kfree(cqp->scratch_array);
1018 cqp->scratch_array = NULL;
1020 kfree(cqp->cqp_requests);
1021 cqp->cqp_requests = NULL;
2071 * irdma_cqp_ce_handler - handle cqp completions
2073 * @cq: cq for cqp completions
2086 spin_lock_irqsave(&rf->cqp.compl_lock, flags);
2088 spin_unlock_irqrestore(&rf->cqp.compl_lock, flags);
2097 ibdev_err(&rf->iwdev->ibdev, "cqp opcode = 0x%x maj_err_code = 0x%x min_err_code = 0x%x\n",
2108 irdma_put_cqp_request(&rf->cqp, cqp_request);
2112 irdma_put_cqp_request(&rf->cqp, cqp_request);
2126 * cqp_compl_worker - Handle cqp completions
2198 struct irdma_cqp *iwcqp = &rf->cqp;
2209 cqp_info->in.u.del_local_mac_entry.cqp = &iwcqp->sc_cqp;
2228 struct irdma_cqp *iwcqp = &rf->cqp;
2244 cqp_info->in.u.add_local_mac_entry.cqp = &iwcqp->sc_cqp;
2264 struct irdma_cqp *iwcqp = &rf->cqp;
2276 cqp_info->in.u.alloc_local_mac_entry.cqp = &iwcqp->sc_cqp;
2288 * irdma_cqp_manage_apbvt_cmd - send cqp command manage apbvt
2301 cqp_request = irdma_alloc_and_get_cqp_request(&iwdev->rf->cqp, add_port);
2312 cqp_info->in.u.manage_apbvt_entry.cqp = &iwdev->rf->cqp.sc_cqp;
2318 irdma_put_cqp_request(&iwdev->rf->cqp, cqp_request);
2408 cqp_request = irdma_alloc_and_get_cqp_request(&rf->cqp, false);
2422 cqp_info->in.u.add_arp_cache_entry.cqp = &rf->cqp.sc_cqp;
2427 cqp_info->in.u.del_arp_cache_entry.cqp = &rf->cqp.sc_cqp;
2433 irdma_put_cqp_request(&rf->cqp, cqp_request);
2438 * @cqp_request: qhash cqp completion
2463 struct irdma_cqp *iwcqp = &iwdev->rf->cqp;
2528 cqp_info->in.u.manage_qhash_table_entry.cqp = &iwdev->rf->cqp.sc_cqp;
2543 * @cqp_request: qhash cqp completion
2594 cqp_request = irdma_alloc_and_get_cqp_request(&rf->cqp, wait);
2611 irdma_put_cqp_request(&rf->cqp, cqp_request);
2642 new_req = irdma_alloc_and_get_cqp_request(&rf->cqp, true);
2664 irdma_put_cqp_request(&rf->cqp, new_req);
2682 irdma_put_cqp_request(&rf->cqp, cqp_request);
2701 cqp_request = irdma_alloc_and_get_cqp_request(&rf->cqp, wait);
2714 irdma_put_cqp_request(&rf->cqp, cqp_request);