aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/cxgb3/iwch_ev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/infiniband/hw/cxgb3/iwch_ev.c')
-rw-r--r--drivers/infiniband/hw/cxgb3/iwch_ev.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/cxgb3/iwch_ev.c b/drivers/infiniband/hw/cxgb3/iwch_ev.c
index 71e0d845da3d..abcc9e76962b 100644
--- a/drivers/infiniband/hw/cxgb3/iwch_ev.c
+++ b/drivers/infiniband/hw/cxgb3/iwch_ev.c
@@ -46,6 +46,7 @@ static void post_qp_event(struct iwch_dev *rnicp, struct iwch_cq *chp,
46 struct ib_event event; 46 struct ib_event event;
47 struct iwch_qp_attributes attrs; 47 struct iwch_qp_attributes attrs;
48 struct iwch_qp *qhp; 48 struct iwch_qp *qhp;
49 unsigned long flag;
49 50
50 spin_lock(&rnicp->lock); 51 spin_lock(&rnicp->lock);
51 qhp = get_qhp(rnicp, CQE_QPID(rsp_msg->cqe)); 52 qhp = get_qhp(rnicp, CQE_QPID(rsp_msg->cqe));
@@ -94,7 +95,9 @@ static void post_qp_event(struct iwch_dev *rnicp, struct iwch_cq *chp,
94 if (qhp->ibqp.event_handler) 95 if (qhp->ibqp.event_handler)
95 (*qhp->ibqp.event_handler)(&event, qhp->ibqp.qp_context); 96 (*qhp->ibqp.event_handler)(&event, qhp->ibqp.qp_context);
96 97
98 spin_lock_irqsave(&chp->comp_handler_lock, flag);
97 (*chp->ibcq.comp_handler)(&chp->ibcq, chp->ibcq.cq_context); 99 (*chp->ibcq.comp_handler)(&chp->ibcq, chp->ibcq.cq_context);
100 spin_unlock_irqrestore(&chp->comp_handler_lock, flag);
98 101
99 if (atomic_dec_and_test(&qhp->refcnt)) 102 if (atomic_dec_and_test(&qhp->refcnt))
100 wake_up(&qhp->wait); 103 wake_up(&qhp->wait);
@@ -107,6 +110,7 @@ void iwch_ev_dispatch(struct cxio_rdev *rdev_p, struct sk_buff *skb)
107 struct iwch_cq *chp; 110 struct iwch_cq *chp;
108 struct iwch_qp *qhp; 111 struct iwch_qp *qhp;
109 u32 cqid = RSPQ_CQID(rsp_msg); 112 u32 cqid = RSPQ_CQID(rsp_msg);
113 unsigned long flag;
110 114
111 rnicp = (struct iwch_dev *) rdev_p->ulp; 115 rnicp = (struct iwch_dev *) rdev_p->ulp;
112 spin_lock(&rnicp->lock); 116 spin_lock(&rnicp->lock);
@@ -170,7 +174,9 @@ void iwch_ev_dispatch(struct cxio_rdev *rdev_p, struct sk_buff *skb)
170 */ 174 */
171 if (qhp->ep && SQ_TYPE(rsp_msg->cqe)) 175 if (qhp->ep && SQ_TYPE(rsp_msg->cqe))
172 dst_confirm(qhp->ep->dst); 176 dst_confirm(qhp->ep->dst);
177 spin_lock_irqsave(&chp->comp_handler_lock, flag);
173 (*chp->ibcq.comp_handler)(&chp->ibcq, chp->ibcq.cq_context); 178 (*chp->ibcq.comp_handler)(&chp->ibcq, chp->ibcq.cq_context);
179 spin_unlock_irqrestore(&chp->comp_handler_lock, flag);
174 break; 180 break;
175 181
176 case TPT_ERR_STAG: 182 case TPT_ERR_STAG: