Lines Matching refs:qp_id

619 int qm_set_and_get_xqc(struct hisi_qm *qm, u8 cmd, void *xqc, u32 qp_id, bool op)  in qm_set_and_get_xqc()  argument
664 qm_mb_pre_init(&mailbox, cmd, xqc_dma, qp_id, op); in qm_set_and_get_xqc()
867 qm_db(qm, qp->qp_id, QM_DOORBELL_CMD_CQ, in qm_poll_req_cb()
875 qm_db(qm, qp->qp_id, QM_DOORBELL_CMD_CQ, qp->qp_status.cq_head, 1); in qm_poll_req_cb()
987 static void qm_disable_qp(struct hisi_qm *qm, u32 qp_id) in qm_disable_qp() argument
989 struct hisi_qp *qp = &qm->qp_array[qp_id]; in qm_disable_qp()
1030 u32 type, qp_id; in qm_aeq_thread() local
1037 qp_id = le32_to_cpu(aeqe->dw0) & QM_AEQE_CQN_MASK; in qm_aeq_thread()
1046 qp_id); in qm_aeq_thread()
1049 qm_disable_qp(qm, qp_id); in qm_aeq_thread()
1388 u32 reg_val, type, vf_num, qp_id; in qm_log_hw_error() local
1404 qp_id = reg_val >> QM_DB_TIMEOUT_QP_SHIFT; in qm_log_hw_error()
1406 qm_db_timeout[type], vf_num, qp_id); in qm_log_hw_error()
1412 qp_id = reg_val >> QM_FIFO_OVERFLOW_QP_SHIFT; in qm_log_hw_error()
1415 qm_fifo_overflow[type], vf_num, qp_id); in qm_log_hw_error()
1695 return hisi_qm_mb(qp->qm, QM_MB_CMD_STOP_QP, 0, qp->qp_id, 0); in qm_stop_qp()
1833 int qp_id; in qm_create_qp_nolock() local
1847 qp_id = idr_alloc_cyclic(&qm->qp_idr, NULL, 0, qm->qp_num, GFP_ATOMIC); in qm_create_qp_nolock()
1848 if (qp_id < 0) { in qm_create_qp_nolock()
1855 qp = &qm->qp_array[qp_id]; in qm_create_qp_nolock()
1861 qp->qp_id = qp_id; in qm_create_qp_nolock()
1908 idr_remove(&qm->qp_idr, qp->qp_id); in hisi_qm_release_qp()
1915 static int qm_sq_ctx_cfg(struct hisi_qp *qp, int qp_id, u32 pasid) in qm_sq_ctx_cfg() argument
1931 sqc.cq_num = cpu_to_le16(qp_id); in qm_sq_ctx_cfg()
1938 return qm_set_and_get_xqc(qm, QM_MB_CMD_SQC, &sqc, qp_id, 0); in qm_sq_ctx_cfg()
1941 static int qm_cq_ctx_cfg(struct hisi_qp *qp, int qp_id, u32 pasid) in qm_cq_ctx_cfg() argument
1967 return qm_set_and_get_xqc(qm, QM_MB_CMD_CQC, &cqc, qp_id, 0); in qm_cq_ctx_cfg()
1970 static int qm_qp_ctx_cfg(struct hisi_qp *qp, int qp_id, u32 pasid) in qm_qp_ctx_cfg() argument
1976 ret = qm_sq_ctx_cfg(qp, qp_id, pasid); in qm_qp_ctx_cfg()
1980 return qm_cq_ctx_cfg(qp, qp_id, pasid); in qm_qp_ctx_cfg()
1987 int qp_id = qp->qp_id; in qm_start_qp_nolock() local
1996 ret = qm_qp_ctx_cfg(qp, qp_id, pasid); in qm_start_qp_nolock()
2001 dev_dbg(dev, "queue %d started\n", qp_id); in qm_start_qp_nolock()
2050 static int qm_wait_qp_empty(struct hisi_qm *qm, u32 *state, u32 qp_id) in qm_wait_qp_empty() argument
2058 ret = qm_set_and_get_xqc(qm, QM_MB_CMD_SQC, &sqc, qp_id, 1); in qm_wait_qp_empty()
2065 ret = qm_set_and_get_xqc(qm, QM_MB_CMD_CQC, &cqc, qp_id, 1); in qm_wait_qp_empty()
2077 dev_err(dev, "Fail to empty queue %u!\n", qp_id); in qm_wait_qp_empty()
2118 ret = qm_wait_qp_empty(qm, &state, qp->qp_id); in qm_drain_qp()
2154 dev_err(dev, "Failed to drain out data for stopping qp(%u)!\n", qp->qp_id); in qm_stop_qp_nolock()
2161 dev_dbg(dev, "stop queue %u!", qp->qp_id); in qm_stop_qp_nolock()
2212 qm_db(qp->qm, qp->qp_id, QM_DOORBELL_CMD_SQ, sq_tail_next, 0); in hisi_qp_send()
2297 qp->qp_id * qm->db_interval; in hisi_qm_uacce_mmap()
2372 qp->qp_id, dev_dfx->dev_state); in hisi_qm_uacce_stop_queue()
2422 qp_ctx.id = qp->qp_id; in hisi_qm_uacce_ioctl()
2769 qp->qp_id = id; in hisi_qp_memory_init()