Lines Matching refs:mcq
89 return get_sw_cqe(cq, cq->mcq.cons_index); in next_cqe_sw()
94 struct mlx4_ib_cq *mcq = to_mcq(cq); in mlx4_ib_modify_cq() local
97 return mlx4_cq_modify(dev->dev, &mcq->mcq, cq_count, cq_period); in mlx4_ib_modify_cq()
226 cq->mcq.set_ci_db = cq->db.db; in mlx4_ib_create_cq()
227 cq->mcq.arm_db = cq->db.db + 1; in mlx4_ib_create_cq()
228 *cq->mcq.set_ci_db = 0; in mlx4_ib_create_cq()
229 *cq->mcq.arm_db = 0; in mlx4_ib_create_cq()
242 cq->db.dma, &cq->mcq, vector, 0, in mlx4_ib_create_cq()
248 cq->mcq.tasklet_ctx.comp = mlx4_ib_cq_comp; in mlx4_ib_create_cq()
250 cq->mcq.comp = mlx4_ib_cq_comp; in mlx4_ib_create_cq()
251 cq->mcq.event = mlx4_ib_cq_event; in mlx4_ib_create_cq()
254 if (ib_copy_to_udata(udata, &cq->mcq.cqn, sizeof (__u32))) { in mlx4_ib_create_cq()
340 i = cq->mcq.cons_index; in mlx4_ib_get_outstanding_cqes()
344 return i - cq->mcq.cons_index; in mlx4_ib_get_outstanding_cqes()
354 i = cq->mcq.cons_index; in mlx4_ib_cq_resize_copy_cqes()
369 ++cq->mcq.cons_index; in mlx4_ib_cq_resize_copy_cqes()
416 err = mlx4_cq_resize(dev->dev, &cq->mcq, entries, &cq->resize_buf->buf.mtt); in mlx4_ib_resize_cq()
476 struct mlx4_ib_cq *mcq = to_mcq(cq); in mlx4_ib_destroy_cq() local
478 mlx4_cq_free(dev->dev, &mcq->mcq); in mlx4_ib_destroy_cq()
479 mlx4_mtt_cleanup(dev->dev, &mcq->buf.mtt); in mlx4_ib_destroy_cq()
482 mlx4_ib_db_unmap_user(to_mucontext(cq->uobject->context), &mcq->db); in mlx4_ib_destroy_cq()
483 ib_umem_release(mcq->umem); in mlx4_ib_destroy_cq()
485 mlx4_ib_free_cq_buf(dev, &mcq->buf, cq->cqe); in mlx4_ib_destroy_cq()
486 mlx4_db_free(dev->dev, &mcq->db); in mlx4_ib_destroy_cq()
489 kfree(mcq); in mlx4_ib_destroy_cq()
680 ++cq->mcq.cons_index; in mlx4_ib_poll_one()
725 cq->mcq.cqn, be32_to_cpu(cqe->vlan_my_qpn) & MLX4_CQE_QPN_MASK); in mlx4_ib_poll_one()
743 cq->mcq.cqn, srq_num); in mlx4_ib_poll_one()
912 mlx4_cq_set_ci(&cq->mcq); in mlx4_ib_poll_cq()
925 mlx4_cq_arm(&to_mcq(ibcq)->mcq, in mlx4_ib_arm_cq()
949 for (prod_index = cq->mcq.cons_index; get_sw_cqe(cq, prod_index); ++prod_index) in __mlx4_ib_cq_clean()
950 if (prod_index == cq->mcq.cons_index + cq->ibcq.cqe) in __mlx4_ib_cq_clean()
957 while ((int) --prod_index - (int) cq->mcq.cons_index >= 0) { in __mlx4_ib_cq_clean()
977 cq->mcq.cons_index += nfreed; in __mlx4_ib_cq_clean()
983 mlx4_cq_set_ci(&cq->mcq); in __mlx4_ib_cq_clean()