Lines Matching refs:qp
118 struct hisi_qp *qp;
169 id = idr_alloc(&ctx->req_idr, NULL, 0, ctx->qp->sq_depth, GFP_ATOMIC);
219 struct hisi_qp *qp;
222 qp = hpre_create_qp(type);
223 if (!qp) {
224 pr_err("Can not create hpre qp!\n");
228 ret = hisi_qm_start_qp(qp, 0);
230 hisi_qm_free_qps(&qp, 1);
231 pci_err(qp->qm->pdev, "Can not start qp!\n");
235 return qp;
382 static int hpre_ctx_set(struct hpre_ctx *ctx, struct hisi_qp *qp, int qlen)
386 if (!ctx || !qp || qlen < 0)
390 ctx->qp = qp;
391 ctx->dev = &qp->qm->pdev->dev;
393 hpre = container_of(ctx->qp->qm, struct hpre, qm);
410 hisi_qm_free_qps(&ctx->qp, 1);
477 static void hpre_alg_cb(struct hisi_qp *qp, void *resp)
479 struct hpre_ctx *ctx = qp->qp_ctx;
492 static void hpre_stop_qp_and_put(struct hisi_qp *qp)
494 hisi_qm_stop_qp(qp);
495 hisi_qm_free_qps(&qp, 1);
500 struct hisi_qp *qp;
503 qp = hpre_get_qp_and_start(type);
504 if (IS_ERR(qp))
505 return PTR_ERR(qp);
507 qp->qp_ctx = ctx;
508 qp->req_cb = hpre_alg_cb;
510 ret = hpre_ctx_set(ctx, qp, qp->sq_depth);
512 hpre_stop_qp_and_put(qp);
578 ret = hisi_qp_send(ctx->qp, msg);
701 hisi_qm_stop_qp(ctx->qp);
1046 hisi_qm_stop_qp(ctx->qp);
1219 hisi_qm_stop_qp(ctx->qp);