diff options
author | Joachim Fenkes <fenkes@de.ibm.com> | 2007-05-24 10:51:05 -0400 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2007-07-09 19:17:32 -0400 |
commit | fffba373ef8cc9a5881353395c4edd1ab27cf154 (patch) | |
tree | 53b83634f9e9a4978c56c3c03d19fa58182a2556 /drivers/infiniband/hw/ehca/ehca_reqs.c | |
parent | 1bae4dbf9576e563da23927e4078fffbbce67a75 (diff) |
IB/ehca: Refactor "maybe missed event" code
Refactor the ehca changes from commit ed23a727 ("IB: Return "maybe
missed event" hint from ib_req_notify_cq()") so the queue arithmetic
is done in slightly fewer lines. Also, move the spinlock flags into
the block they're used in.
Signed-off-by: Joachim Fenkes <fenkes@de.ibm.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ehca/ehca_reqs.c')
-rw-r--r-- | drivers/infiniband/hw/ehca/ehca_reqs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_reqs.c b/drivers/infiniband/hw/ehca/ehca_reqs.c index caec9dee09e1..56c4527c884f 100644 --- a/drivers/infiniband/hw/ehca/ehca_reqs.c +++ b/drivers/infiniband/hw/ehca/ehca_reqs.c | |||
@@ -637,7 +637,6 @@ poll_cq_exit0: | |||
637 | int ehca_req_notify_cq(struct ib_cq *cq, enum ib_cq_notify_flags notify_flags) | 637 | int 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 | int ret = 0; |
642 | 641 | ||
643 | switch (notify_flags & IB_CQ_SOLICITED_MASK) { | 642 | switch (notify_flags & IB_CQ_SOLICITED_MASK) { |
@@ -652,6 +651,7 @@ int ehca_req_notify_cq(struct ib_cq *cq, enum ib_cq_notify_flags notify_flags) | |||
652 | } | 651 | } |
653 | 652 | ||
654 | if (notify_flags & IB_CQ_REPORT_MISSED_EVENTS) { | 653 | if (notify_flags & IB_CQ_REPORT_MISSED_EVENTS) { |
654 | unsigned long spl_flags; | ||
655 | spin_lock_irqsave(&my_cq->spinlock, spl_flags); | 655 | spin_lock_irqsave(&my_cq->spinlock, spl_flags); |
656 | ret = ipz_qeit_is_valid(&my_cq->ipz_queue); | 656 | ret = ipz_qeit_is_valid(&my_cq->ipz_queue); |
657 | spin_unlock_irqrestore(&my_cq->spinlock, spl_flags); | 657 | spin_unlock_irqrestore(&my_cq->spinlock, spl_flags); |