Lines Matching defs:qp_id

672 int qm_set_and_get_xqc(struct hisi_qm *qm, u8 cmd, void *xqc, u32 qp_id, bool op)
716 qm_mb_pre_init(&mailbox, cmd, xqc_dma, qp_id, op);
939 qm_db(qm, qp->qp_id, QM_DOORBELL_CMD_CQ,
947 qm_db(qm, qp->qp_id, QM_DOORBELL_CMD_CQ, qp->qp_status.cq_head, 1);
1059 static void qm_disable_qp(struct hisi_qm *qm, u32 qp_id)
1061 struct hisi_qp *qp = &qm->qp_array[qp_id];
1101 u32 type, qp_id;
1108 qp_id = le32_to_cpu(aeqe->dw0) & QM_AEQE_CQN_MASK;
1117 qp_id);
1120 qm_disable_qp(qm, qp_id);
1459 u32 reg_val, type, vf_num, qp_id;
1475 qp_id = reg_val >> QM_DB_TIMEOUT_QP_SHIFT;
1477 qm_db_timeout[type], vf_num, qp_id);
1483 qp_id = reg_val >> QM_FIFO_OVERFLOW_QP_SHIFT;
1486 qm_fifo_overflow[type], vf_num, qp_id);
1758 return hisi_qm_mb(qp->qm, QM_MB_CMD_STOP_QP, 0, qp->qp_id, 0);
1999 int qp_id;
2013 qp_id = idr_alloc_cyclic(&qm->qp_idr, NULL, 0, qm->qp_num, GFP_ATOMIC);
2014 if (qp_id < 0) {
2021 qp = &qm->qp_array[qp_id];
2027 qp->qp_id = qp_id;
2074 idr_remove(&qm->qp_idr, qp->qp_id);
2081 static int qm_sq_ctx_cfg(struct hisi_qp *qp, int qp_id, u32 pasid)
2097 sqc.cq_num = cpu_to_le16(qp_id);
2104 return qm_set_and_get_xqc(qm, QM_MB_CMD_SQC, &sqc, qp_id, 0);
2107 static int qm_cq_ctx_cfg(struct hisi_qp *qp, int qp_id, u32 pasid)
2133 return qm_set_and_get_xqc(qm, QM_MB_CMD_CQC, &cqc, qp_id, 0);
2136 static int qm_qp_ctx_cfg(struct hisi_qp *qp, int qp_id, u32 pasid)
2142 ret = qm_sq_ctx_cfg(qp, qp_id, pasid);
2146 return qm_cq_ctx_cfg(qp, qp_id, pasid);
2153 int qp_id = qp->qp_id;
2162 ret = qm_qp_ctx_cfg(qp, qp_id, pasid);
2167 dev_dbg(dev, "queue %d started\n", qp_id);
2216 static int qm_wait_qp_empty(struct hisi_qm *qm, u32 *state, u32 qp_id)
2224 ret = qm_set_and_get_xqc(qm, QM_MB_CMD_SQC, &sqc, qp_id, 1);
2231 ret = qm_set_and_get_xqc(qm, QM_MB_CMD_CQC, &cqc, qp_id, 1);
2243 dev_err(dev, "Fail to empty queue %u!\n", qp_id);
2283 ret = qm_wait_qp_empty(qm, &state, qp->qp_id);
2319 dev_err(dev, "Failed to drain out data for stopping qp(%u)!\n", qp->qp_id);
2326 dev_dbg(dev, "stop queue %u!", qp->qp_id);
2377 qm_db(qp->qm, qp->qp_id, QM_DOORBELL_CMD_SQ, sq_tail_next, 0);
2462 qp->qp_id * qm->db_interval;
2537 qp->qp_id, dev_dfx->dev_state);
2587 qp_ctx.id = qp->qp_id;
2934 qp->qp_id = id;