Lines Matching refs:qp_status
499 qp_curr = atomic_read(&qp->qp_status.flags); in qm_qp_avail_state()
878 if (qp->qp_status.cq_head == qp->cq_depth - 1) { in qm_cq_head_update()
879 qp->qp_status.cqc_phase = !qp->qp_status.cqc_phase; in qm_cq_head_update()
880 qp->qp_status.cq_head = 0; in qm_cq_head_update()
882 qp->qp_status.cq_head++; in qm_cq_head_update()
888 struct qm_cqe *cqe = qp->cqe + qp->qp_status.cq_head; in qm_poll_req_cb()
891 while (QM_CQE_PHASE(cqe) == qp->qp_status.cqc_phase) { in qm_poll_req_cb()
896 cqe = qp->cqe + qp->qp_status.cq_head; in qm_poll_req_cb()
898 qp->qp_status.cq_head, 0); in qm_poll_req_cb()
899 atomic_dec(&qp->qp_status.used); in qm_poll_req_cb()
905 qm_db(qm, qp->qp_id, QM_DOORBELL_CMD_CQ, qp->qp_status.cq_head, 1); in qm_poll_req_cb()
919 if (unlikely(atomic_read(&qp->qp_status.flags) == QP_STOP)) in qm_work_process()
1103 struct hisi_qp_status *qp_status = &qp->qp_status; in qm_init_qp_status() local
1105 qp_status->sq_tail = 0; in qm_init_qp_status()
1106 qp_status->cq_head = 0; in qm_init_qp_status()
1107 qp_status->cqc_phase = true; in qm_init_qp_status()
1108 atomic_set(&qp_status->used, 0); in qm_init_qp_status()
1869 struct hisi_qp_status *qp_status = &qp->qp_status; in qm_get_avail_sqe() local
1870 u16 sq_tail = qp_status->sq_tail; in qm_get_avail_sqe()
1872 if (unlikely(atomic_read(&qp->qp_status.used) == qp->sq_depth - 1)) in qm_get_avail_sqe()
1921 atomic_set(&qp->qp_status.flags, QP_INIT); in qm_create_qp_nolock()
2088 atomic_set(&qp->qp_status.flags, QP_START); in qm_start_qp_nolock()
2123 int qp_used = atomic_read(&qp->qp_status.used); in qp_stop_fail_cb()
2124 u16 cur_tail = qp->qp_status.sq_tail; in qp_stop_fail_cb()
2134 atomic_dec(&qp->qp_status.used); in qp_stop_fail_cb()
2219 if (atomic_read(&qp->qp_status.flags) == QP_STOP) { in qm_stop_qp_nolock()
2227 atomic_set(&qp->qp_status.flags, QP_STOP); in qm_stop_qp_nolock()
2235 if (unlikely(qp->is_resetting && atomic_read(&qp->qp_status.used))) in qm_stop_qp_nolock()
2278 struct hisi_qp_status *qp_status = &qp->qp_status; in hisi_qp_send() local
2279 u16 sq_tail = qp_status->sq_tail; in hisi_qp_send()
2283 if (unlikely(atomic_read(&qp->qp_status.flags) == QP_STOP || in hisi_qp_send()
2296 atomic_inc(&qp->qp_status.used); in hisi_qp_send()
2297 qp_status->sq_tail = sq_tail_next; in hisi_qp_send()
2441 struct qm_cqe *cqe = qp->cqe + qp->qp_status.cq_head; in hisi_qm_is_q_updated()
2444 while (QM_CQE_PHASE(cqe) == qp->qp_status.cqc_phase) { in hisi_qm_is_q_updated()
2448 cqe = qp->cqe + qp->qp_status.cq_head; in hisi_qm_is_q_updated()
3197 if (atomic_read(&qp->qp_status.flags) == QP_STOP && in qm_restart()
3223 if (qp && atomic_read(&qp->qp_status.flags) == QP_START) { in qm_stop_started_qp()