aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ehca/ehca_reqs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw/ehca/ehca_reqs.c')
-rw-r--r--drivers/infiniband/hw/ehca/ehca_reqs.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_reqs.c b/drivers/infiniband/hw/ehca/ehca_reqs.c
index 08d3f892d9f3..caec9dee09e1 100644
--- a/drivers/infiniband/hw/ehca/ehca_reqs.c
+++ b/drivers/infiniband/hw/ehca/ehca_reqs.c
@@ -634,11 +634,13 @@ poll_cq_exit0:
634 return ret; 634 return ret;
635} 635}
636 636
637int ehca_req_notify_cq(struct ib_cq *cq, enum ib_cq_notify cq_notify) 637int ehca_req_notify_cq(struct ib_cq *cq, enum ib_cq_notify_flags notify_flags)
638{ 638{
639 struct ehca_cq *my_cq = container_of(cq, struct ehca_cq, ib_cq); 639 struct ehca_cq *my_cq = container_of(cq, struct ehca_cq, ib_cq);
640 unsigned long spl_flags;
641 int ret = 0;
640 642
641 switch (cq_notify) { 643 switch (notify_flags & IB_CQ_SOLICITED_MASK) {
642 case IB_CQ_SOLICITED: 644 case IB_CQ_SOLICITED:
643 hipz_set_cqx_n0(my_cq, 1); 645 hipz_set_cqx_n0(my_cq, 1);
644 break; 646 break;
@@ -649,5 +651,11 @@ int ehca_req_notify_cq(struct ib_cq *cq, enum ib_cq_notify cq_notify)
649 return -EINVAL; 651 return -EINVAL;
650 } 652 }
651 653
652 return 0; 654 if (notify_flags & IB_CQ_REPORT_MISSED_EVENTS) {
655 spin_lock_irqsave(&my_cq->spinlock, spl_flags);
656 ret = ipz_qeit_is_valid(&my_cq->ipz_queue);
657 spin_unlock_irqrestore(&my_cq->spinlock, spl_flags);
658 }
659
660 return ret;
653} 661}