Lines Matching defs:cqp
230 * @create_done: 1 if cqp create poll was success
232 * Issue destroy cqp request and
233 * free the resources associated with the cqp
238 struct i40iw_cqp *cqp = &iwdev->cqp;
241 dev->cqp_ops->cqp_destroy(dev->cqp);
245 i40iw_free_dma_mem(dev->hw, &cqp->sq);
246 kfree(cqp->scratch_array);
247 iwdev->cqp.scratch_array = NULL;
249 kfree(cqp->cqp_requests);
250 cqp->cqp_requests = NULL;
495 return (dev->cqp_misc_ops->static_hmc_pages_allocated(dev->cqp, 0,
550 * Return 0, if the cqp and all the resources associated with it
560 struct i40iw_cqp *cqp = &iwdev->cqp;
564 cqp->cqp_requests = kcalloc(sqsize, sizeof(*cqp->cqp_requests), GFP_KERNEL);
565 if (!cqp->cqp_requests)
567 cqp->scratch_array = kcalloc(sqsize, sizeof(*cqp->scratch_array), GFP_KERNEL);
568 if (!cqp->scratch_array) {
569 kfree(cqp->cqp_requests);
572 dev->cqp = &cqp->sc_cqp;
573 dev->cqp->dev = dev;
575 status = i40iw_allocate_dma_mem(dev->hw, &cqp->sq,
584 dev->cqp->host_ctx_pa = mem.pa;
585 dev->cqp->host_ctx = mem.va;
586 /* populate the cqp init info */
589 cqp_init_info.sq = cqp->sq.va;
590 cqp_init_info.sq_pa = cqp->sq.pa;
595 cqp_init_info.scratch_array = cqp->scratch_array;
596 status = dev->cqp_ops->cqp_init(dev->cqp, &cqp_init_info);
598 i40iw_pr_err("cqp init status %d\n", status);
601 status = dev->cqp_ops->cqp_create(dev->cqp, &maj_err, &min_err);
603 i40iw_pr_err("cqp create status %d maj_err %d min_err %d\n",
607 spin_lock_init(&cqp->req_lock);
608 INIT_LIST_HEAD(&cqp->cqp_avail_reqs);
609 INIT_LIST_HEAD(&cqp->cqp_pending_reqs);
612 init_waitqueue_head(&cqp->cqp_requests[i].waitq);
613 list_add_tail(&cqp->cqp_requests[i].list, &cqp->cqp_avail_reqs);
742 scratch = (uintptr_t)&iwdev->cqp.sc_cqp;
1042 struct i40iw_cqp *iwcqp = &iwdev->cqp;
1055 cqp_info->in.u.del_local_mac_ipaddr_entry.cqp = &iwcqp->sc_cqp;
1075 struct i40iw_cqp *iwcqp = &iwdev->cqp;
1094 cqp_info->in.u.add_local_mac_ipaddr_entry.cqp = &iwcqp->sc_cqp;
1114 struct i40iw_cqp *iwcqp = &iwdev->cqp;
1125 /* increment refcount, because we need the cqp request ret value */
1131 cqp_info->in.u.alloc_local_mac_ipaddr_entry.cqp = &iwcqp->sc_cqp;
1138 /* decrement refcount and free the cqp request, if no longer used */