Lines Matching refs:ibcq
181 return cqe_sw(get_cqe(cq, cq->cons_index & cq->ibcq.cqe)); in next_cqe_sw()
235 cq->ibcq.comp_handler(&cq->ibcq, cq->ibcq.cq_context); in mthca_cq_completion()
259 event.element.cq = &cq->ibcq; in mthca_cq_event()
260 if (cq->ibcq.event_handler) in mthca_cq_event()
261 cq->ibcq.event_handler(&event, cq->ibcq.cq_context); in mthca_cq_event()
295 cqe_sw(get_cqe(cq, prod_index & cq->ibcq.cqe)); in mthca_cq_clean()
297 if (prod_index == cq->cons_index + cq->ibcq.cqe) in mthca_cq_clean()
309 cqe = get_cqe(cq, prod_index & cq->ibcq.cqe); in mthca_cq_clean()
315 memcpy(get_cqe(cq, (prod_index + nfreed) & cq->ibcq.cqe), in mthca_cq_clean()
321 set_cqe_hw(get_cqe(cq, (cq->cons_index + i) & cq->ibcq.cqe)); in mthca_cq_clean()
340 if (!mthca_is_memfree(to_mdev(cq->ibcq.device)) && in mthca_cq_resize_copy_cqes()
341 cq->ibcq.cqe < cq->resize_buf->cqe) { in mthca_cq_resize_copy_cqes()
342 cq->cons_index &= cq->ibcq.cqe; in mthca_cq_resize_copy_cqes()
343 if (cqe_sw(get_cqe(cq, cq->ibcq.cqe))) in mthca_cq_resize_copy_cqes()
344 cq->cons_index -= cq->ibcq.cqe + 1; in mthca_cq_resize_copy_cqes()
347 for (i = cq->cons_index; cqe_sw(get_cqe(cq, i & cq->ibcq.cqe)); ++i) in mthca_cq_resize_copy_cqes()
350 get_cqe(cq, i & cq->ibcq.cqe), MTHCA_CQ_ENTRY_SIZE); in mthca_cq_resize_copy_cqes()
659 int mthca_poll_cq(struct ib_cq *ibcq, int num_entries, in mthca_poll_cq() argument
662 struct mthca_dev *dev = to_mdev(ibcq->device); in mthca_poll_cq()
663 struct mthca_cq *cq = to_mcq(ibcq); in mthca_poll_cq()
703 cq->cons_index &= cq->ibcq.cqe; in mthca_poll_cq()
711 tcqe = cq->ibcq.cqe; in mthca_poll_cq()
713 cq->ibcq.cqe = cq->resize_buf->cqe; in mthca_poll_cq()
741 int mthca_arbel_arm_cq(struct ib_cq *ibcq, enum ib_cq_notify_flags flags) in mthca_arbel_arm_cq() argument
743 struct mthca_cq *cq = to_mcq(ibcq); in mthca_arbel_arm_cq()
767 to_mdev(ibcq->device)->kar + MTHCA_CQ_DOORBELL, in mthca_arbel_arm_cq()
768 MTHCA_GET_DOORBELL_LOCK(&to_mdev(ibcq->device)->doorbell_lock)); in mthca_arbel_arm_cq()
781 cq->ibcq.cqe = nent - 1; in mthca_init_cq()
870 mthca_free_cq_buf(dev, &cq->buf, cq->ibcq.cqe); in mthca_init_cq()
944 mthca_free_cq_buf(dev, &cq->buf, cq->ibcq.cqe); in mthca_free_cq()