|
@@ -1007,11 +1007,19 @@ static int rxe_peek_cq(struct ib_cq *ibcq, int wc_cnt)
|
|
|
static int rxe_req_notify_cq(struct ib_cq *ibcq, enum ib_cq_notify_flags flags)
|
|
|
{
|
|
|
struct rxe_cq *cq = to_rcq(ibcq);
|
|
|
+ unsigned long irq_flags;
|
|
|
+ int ret = 0;
|
|
|
|
|
|
+ spin_lock_irqsave(&cq->cq_lock, irq_flags);
|
|
|
if (cq->notify != IB_CQ_NEXT_COMP)
|
|
|
cq->notify = flags & IB_CQ_SOLICITED_MASK;
|
|
|
|
|
|
- return 0;
|
|
|
+ if ((flags & IB_CQ_REPORT_MISSED_EVENTS) && !queue_empty(cq->queue))
|
|
|
+ ret = 1;
|
|
|
+
|
|
|
+ spin_unlock_irqrestore(&cq->cq_lock, irq_flags);
|
|
|
+
|
|
|
+ return ret;
|
|
|
}
|
|
|
|
|
|
static struct ib_mr *rxe_get_dma_mr(struct ib_pd *ibpd, int access)
|