Lines Matching refs:rcq
65 static void pvrdma_lock_cqs(struct pvrdma_cq *scq, struct pvrdma_cq *rcq, in pvrdma_lock_cqs() argument
68 __acquires(scq->cq_lock) __acquires(rcq->cq_lock) in pvrdma_lock_cqs()
70 if (scq == rcq) { in pvrdma_lock_cqs()
72 __acquire(rcq->cq_lock); in pvrdma_lock_cqs()
73 } else if (scq->cq_handle < rcq->cq_handle) { in pvrdma_lock_cqs()
75 spin_lock_irqsave_nested(&rcq->cq_lock, *rcq_flags, in pvrdma_lock_cqs()
78 spin_lock_irqsave(&rcq->cq_lock, *rcq_flags); in pvrdma_lock_cqs()
84 static void pvrdma_unlock_cqs(struct pvrdma_cq *scq, struct pvrdma_cq *rcq, in pvrdma_unlock_cqs() argument
87 __releases(scq->cq_lock) __releases(rcq->cq_lock) in pvrdma_unlock_cqs()
89 if (scq == rcq) { in pvrdma_unlock_cqs()
90 __release(rcq->cq_lock); in pvrdma_unlock_cqs()
92 } else if (scq->cq_handle < rcq->cq_handle) { in pvrdma_unlock_cqs()
93 spin_unlock_irqrestore(&rcq->cq_lock, *rcq_flags); in pvrdma_unlock_cqs()
97 spin_unlock_irqrestore(&rcq->cq_lock, *rcq_flags); in pvrdma_unlock_cqs()
103 struct pvrdma_cq *scq, *rcq; in pvrdma_reset_qp() local
107 get_cqs(qp, &scq, &rcq); in pvrdma_reset_qp()
108 pvrdma_lock_cqs(scq, rcq, &scq_flags, &rcq_flags); in pvrdma_reset_qp()
111 if (scq != rcq) in pvrdma_reset_qp()
112 _pvrdma_flush_cqe(qp, rcq); in pvrdma_reset_qp()
114 pvrdma_unlock_cqs(scq, rcq, &scq_flags, &rcq_flags); in pvrdma_reset_qp()
454 struct pvrdma_cq *rcq; in pvrdma_free_qp() local
458 get_cqs(qp, &scq, &rcq); in pvrdma_free_qp()
459 pvrdma_lock_cqs(scq, rcq, &scq_flags, &rcq_flags); in pvrdma_free_qp()
462 if (scq != rcq) in pvrdma_free_qp()
463 _pvrdma_flush_cqe(qp, rcq); in pvrdma_free_qp()
470 pvrdma_unlock_cqs(scq, rcq, &scq_flags, &rcq_flags); in pvrdma_free_qp()