Lines Matching defs:ibcq
63 if (head >= (unsigned) cq->ibcq.cqe) {
64 head = cq->ibcq.cqe;
70 if (cq->ibcq.event_handler) {
73 ev.device = cq->ibcq.device;
74 ev.element.cq = &cq->ibcq;
76 cq->ibcq.event_handler(&ev, cq->ibcq.cq_context);
118 * @ibcq: the completion queue to poll
127 int qib_poll_cq(struct ib_cq *ibcq, int num_entries, struct ib_wc *entry)
129 struct qib_cq *cq = to_icq(ibcq);
145 if (tail > (u32) cq->ibcq.cqe)
146 tail = (u32) cq->ibcq.cqe;
152 if (tail >= cq->ibcq.cqe)
186 cq->ibcq.comp_handler(&cq->ibcq, cq->ibcq.cq_context);
285 * ib_create_cq() will initialize cq->ibcq except for cq->ibcq.cqe.
289 cq->ibcq.cqe = entries;
298 ret = &cq->ibcq;
314 * @ibcq: the completion queue to destroy.
320 int qib_destroy_cq(struct ib_cq *ibcq)
322 struct qib_ibdev *dev = to_idev(ibcq->device);
323 struct qib_cq *cq = to_icq(ibcq);
340 * @ibcq: the completion queue
348 int qib_req_notify_cq(struct ib_cq *ibcq, enum ib_cq_notify_flags notify_flags)
350 struct qib_cq *cq = to_icq(ibcq);
373 * @ibcq: the completion queue
377 int qib_resize_cq(struct ib_cq *ibcq, int cqe, struct ib_udata *udata)
379 struct qib_cq *cq = to_icq(ibcq);
421 if (head > (u32) cq->ibcq.cqe)
422 head = (u32) cq->ibcq.cqe;
424 if (tail > (u32) cq->ibcq.cqe)
425 tail = (u32) cq->ibcq.cqe;
427 n = cq->ibcq.cqe + 1 + head - tail;
439 if (tail == (u32) cq->ibcq.cqe)
444 cq->ibcq.cqe = cqe;
453 struct qib_ibdev *dev = to_idev(ibcq->device);