Lines Matching refs:qp_status
547 qp_curr = atomic_read(&qp->qp_status.flags); in qm_qp_avail_state()
776 if (qp->qp_status.cq_head == QM_Q_DEPTH - 1) { in qm_cq_head_update()
777 qp->qp_status.cqc_phase = !qp->qp_status.cqc_phase; in qm_cq_head_update()
778 qp->qp_status.cq_head = 0; in qm_cq_head_update()
780 qp->qp_status.cq_head++; in qm_cq_head_update()
786 if (unlikely(atomic_read(&qp->qp_status.flags) == QP_STOP)) in qm_poll_qp()
795 struct qm_cqe *cqe = qp->cqe + qp->qp_status.cq_head; in qm_poll_qp()
797 while (QM_CQE_PHASE(cqe) == qp->qp_status.cqc_phase) { in qm_poll_qp()
802 cqe = qp->cqe + qp->qp_status.cq_head; in qm_poll_qp()
804 qp->qp_status.cq_head, 0); in qm_poll_qp()
805 atomic_dec(&qp->qp_status.used); in qm_poll_qp()
810 qp->qp_status.cq_head, 1); in qm_poll_qp()
940 struct hisi_qp_status *qp_status = &qp->qp_status; in qm_init_qp_status() local
942 qp_status->sq_tail = 0; in qm_init_qp_status()
943 qp_status->cq_head = 0; in qm_init_qp_status()
944 qp_status->cqc_phase = true; in qm_init_qp_status()
945 atomic_set(&qp_status->used, 0); in qm_init_qp_status()
2463 struct hisi_qp_status *qp_status = &qp->qp_status; in qm_get_avail_sqe() local
2464 u16 sq_tail = qp_status->sq_tail; in qm_get_avail_sqe()
2466 if (unlikely(atomic_read(&qp->qp_status.used) == QM_Q_DEPTH - 1)) in qm_get_avail_sqe()
2506 atomic_set(&qp->qp_status.flags, QP_INIT); in qm_create_qp_nolock()
2676 atomic_set(&qp->qp_status.flags, QP_START); in qm_start_qp_nolock()
2711 int qp_used = atomic_read(&qp->qp_status.used); in qp_stop_fail_cb()
2712 u16 cur_tail = qp->qp_status.sq_tail; in qp_stop_fail_cb()
2721 atomic_dec(&qp->qp_status.used); in qp_stop_fail_cb()
2806 if (atomic_read(&qp->qp_status.flags) == QP_STOP) { in qm_stop_qp_nolock()
2814 atomic_set(&qp->qp_status.flags, QP_STOP); in qm_stop_qp_nolock()
2825 if (unlikely(qp->is_resetting && atomic_read(&qp->qp_status.used))) in qm_stop_qp_nolock()
2868 struct hisi_qp_status *qp_status = &qp->qp_status; in hisi_qp_send() local
2869 u16 sq_tail = qp_status->sq_tail; in hisi_qp_send()
2873 if (unlikely(atomic_read(&qp->qp_status.flags) == QP_STOP || in hisi_qp_send()
2886 atomic_inc(&qp->qp_status.used); in hisi_qp_send()
2887 qp_status->sq_tail = sq_tail_next; in hisi_qp_send()
3016 struct qm_cqe *cqe = qp->cqe + qp->qp_status.cq_head; in hisi_qm_is_q_updated()
3019 while (QM_CQE_PHASE(cqe) == qp->qp_status.cqc_phase) { in hisi_qm_is_q_updated()
3023 cqe = qp->cqe + qp->qp_status.cq_head; in hisi_qm_is_q_updated()
3602 if (atomic_read(&qp->qp_status.flags) == QP_STOP && in qm_restart()
3628 if (qp && atomic_read(&qp->qp_status.flags) == QP_START) { in qm_stop_started_qp()