Lines Matching refs:qp_id
897 qm_db(qm, qp->qp_id, QM_DOORBELL_CMD_CQ,
905 qm_db(qm, qp->qp_id, QM_DOORBELL_CMD_CQ, qp->qp_status.cq_head, 1);
1017 static void qm_disable_qp(struct hisi_qm *qm, u32 qp_id)
1019 struct hisi_qp *qp = &qm->qp_array[qp_id];
1060 u32 type, qp_id;
1066 qp_id = le32_to_cpu(aeqe->dw0) & QM_AEQE_CQN_MASK;
1075 qp_id);
1078 qm_disable_qp(qm, qp_id);
1378 static int qm_dump_sqc_raw(struct hisi_qm *qm, dma_addr_t dma_addr, u16 qp_id)
1380 return hisi_qm_mb(qm, QM_MB_CMD_SQC, dma_addr, qp_id, 1);
1383 static int qm_dump_cqc_raw(struct hisi_qm *qm, dma_addr_t dma_addr, u16 qp_id)
1385 return hisi_qm_mb(qm, QM_MB_CMD_CQC, dma_addr, qp_id, 1);
1753 return hisi_qm_mb(qp->qm, QM_MB_CMD_STOP_QP, 0, qp->qp_id, 0);
1891 int qp_id;
1903 qp_id = idr_alloc_cyclic(&qm->qp_idr, NULL, 0, qm->qp_num, GFP_ATOMIC);
1904 if (qp_id < 0) {
1911 qp = &qm->qp_array[qp_id];
1917 qp->qp_id = qp_id;
1970 idr_remove(&qm->qp_idr, qp->qp_id);
1977 static int qm_sq_ctx_cfg(struct hisi_qp *qp, int qp_id, u32 pasid)
1998 sqc->cq_num = cpu_to_le16(qp_id);
2012 ret = hisi_qm_mb(qm, QM_MB_CMD_SQC, sqc_dma, qp_id, 0);
2019 static int qm_cq_ctx_cfg(struct hisi_qp *qp, int qp_id, u32 pasid)
2053 ret = hisi_qm_mb(qm, QM_MB_CMD_CQC, cqc_dma, qp_id, 0);
2060 static int qm_qp_ctx_cfg(struct hisi_qp *qp, int qp_id, u32 pasid)
2066 ret = qm_sq_ctx_cfg(qp, qp_id, pasid);
2070 return qm_cq_ctx_cfg(qp, qp_id, pasid);
2077 int qp_id = qp->qp_id;
2084 ret = qm_qp_ctx_cfg(qp, qp_id, pasid);
2089 dev_dbg(dev, "queue %d started\n", qp_id);
2164 dev_err(dev, "Failed to stop qp(%u)!\n", qp->qp_id);
2175 ret = qm_dump_sqc_raw(qm, dma_addr, qp->qp_id);
2183 qp->qp_id);
2195 dev_err(dev, "Fail to empty queue %u!\n", qp->qp_id);
2238 dev_dbg(dev, "stop queue %u!", qp->qp_id);
2295 qm_db(qp->qm, qp->qp_id, QM_DOORBELL_CMD_SQ, sq_tail_next, 0);
2380 qp->qp_id * qm->db_interval;
2481 qp_ctx.id = qp->qp_id;
2828 qp->qp_id = id;