Lines Matching refs:send_cq
52 static void mlx4_ib_lock_cqs(struct mlx4_ib_cq *send_cq,
54 static void mlx4_ib_unlock_cqs(struct mlx4_ib_cq *send_cq,
727 if (init_attr->send_cq || init_attr->cap.max_send_wr) { in _mlx4_ib_create_qp_rss()
925 mlx4_ib_lock_cqs(to_mcq(init_attr->send_cq), in create_rq()
934 mcq = to_mcq(init_attr->send_cq); in create_rq()
938 mlx4_ib_unlock_cqs(to_mcq(init_attr->send_cq), in create_rq()
1199 mlx4_ib_lock_cqs(to_mcq(init_attr->send_cq), in create_qp_common()
1208 mcq = to_mcq(init_attr->send_cq); in create_qp_common()
1212 mlx4_ib_unlock_cqs(to_mcq(init_attr->send_cq), in create_qp_common()
1267 static void mlx4_ib_lock_cqs(struct mlx4_ib_cq *send_cq, struct mlx4_ib_cq *recv_cq) in mlx4_ib_lock_cqs() argument
1268 __acquires(&send_cq->lock) __acquires(&recv_cq->lock) in mlx4_ib_lock_cqs()
1270 if (send_cq == recv_cq) { in mlx4_ib_lock_cqs()
1271 spin_lock(&send_cq->lock); in mlx4_ib_lock_cqs()
1273 } else if (send_cq->mcq.cqn < recv_cq->mcq.cqn) { in mlx4_ib_lock_cqs()
1274 spin_lock(&send_cq->lock); in mlx4_ib_lock_cqs()
1278 spin_lock_nested(&send_cq->lock, SINGLE_DEPTH_NESTING); in mlx4_ib_lock_cqs()
1282 static void mlx4_ib_unlock_cqs(struct mlx4_ib_cq *send_cq, struct mlx4_ib_cq *recv_cq) in mlx4_ib_unlock_cqs() argument
1283 __releases(&send_cq->lock) __releases(&recv_cq->lock) in mlx4_ib_unlock_cqs()
1285 if (send_cq == recv_cq) { in mlx4_ib_unlock_cqs()
1287 spin_unlock(&send_cq->lock); in mlx4_ib_unlock_cqs()
1288 } else if (send_cq->mcq.cqn < recv_cq->mcq.cqn) { in mlx4_ib_unlock_cqs()
1290 spin_unlock(&send_cq->lock); in mlx4_ib_unlock_cqs()
1292 spin_unlock(&send_cq->lock); in mlx4_ib_unlock_cqs()
1316 struct mlx4_ib_cq **send_cq, struct mlx4_ib_cq **recv_cq) in get_cqs() argument
1320 *send_cq = to_mcq(to_mxrcd(qp->ibqp.xrcd)->cq); in get_cqs()
1321 *recv_cq = *send_cq; in get_cqs()
1324 *send_cq = to_mcq(qp->ibqp.send_cq); in get_cqs()
1325 *recv_cq = *send_cq; in get_cqs()
1330 *send_cq = (src == MLX4_IB_QP_SRC) ? to_mcq(qp->ibqp.send_cq) : in get_cqs()
1369 struct mlx4_ib_cq *send_cq, *recv_cq; in destroy_qp_common() local
1400 get_cqs(qp, src, &send_cq, &recv_cq); in destroy_qp_common()
1403 mlx4_ib_lock_cqs(send_cq, recv_cq); in destroy_qp_common()
1412 if (send_cq != recv_cq) in destroy_qp_common()
1413 __mlx4_ib_cq_clean(send_cq, qp->mqp.qpn, NULL); in destroy_qp_common()
1418 mlx4_ib_unlock_cqs(send_cq, recv_cq); in destroy_qp_common()
1528 init_attr->send_cq = to_mxrcd(init_attr->xrcd)->cq; in _mlx4_ib_create_qp()
1533 init_attr->recv_cq = init_attr->send_cq; in _mlx4_ib_create_qp()
2086 struct mlx4_ib_cq *send_cq, *recv_cq; in __mlx4_ib_modify_qp() local
2321 get_cqs(qp, src_type, &send_cq, &recv_cq); in __mlx4_ib_modify_qp()
2323 send_cq = to_mcq(rwq_ind_tbl->ind_tbl[0]->cq); in __mlx4_ib_modify_qp()
2324 recv_cq = send_cq; in __mlx4_ib_modify_qp()
2326 context->cqn_send = cpu_to_be32(send_cq->mcq.cqn); in __mlx4_ib_modify_qp()
2545 if (send_cq != recv_cq) in __mlx4_ib_modify_qp()
2546 mlx4_ib_cq_clean(send_cq, qp->mqp.qpn, NULL); in __mlx4_ib_modify_qp()
3541 if (mlx4_wq_overflow(&qp->sq, nreq, qp->ibqp.send_cq)) { in _mlx4_ib_post_send()
4139 ib_qp_init_attr.send_cq = ib_qp_init_attr.recv_cq; /* Dummy CQ */ in mlx4_ib_create_wq()
4413 struct ib_cq *cq = qp->send_cq; in mlx4_ib_drain_sq()