diff options
Diffstat (limited to 'drivers/infiniband/hw/cxgb3/iwch_ev.c')
-rw-r--r-- | drivers/infiniband/hw/cxgb3/iwch_ev.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/drivers/infiniband/hw/cxgb3/iwch_ev.c b/drivers/infiniband/hw/cxgb3/iwch_ev.c index 6afc89e7572c..71e0d845da3d 100644 --- a/drivers/infiniband/hw/cxgb3/iwch_ev.c +++ b/drivers/infiniband/hw/cxgb3/iwch_ev.c | |||
@@ -76,6 +76,14 @@ static void post_qp_event(struct iwch_dev *rnicp, struct iwch_cq *chp, | |||
76 | atomic_inc(&qhp->refcnt); | 76 | atomic_inc(&qhp->refcnt); |
77 | spin_unlock(&rnicp->lock); | 77 | spin_unlock(&rnicp->lock); |
78 | 78 | ||
79 | if (qhp->attr.state == IWCH_QP_STATE_RTS) { | ||
80 | attrs.next_state = IWCH_QP_STATE_TERMINATE; | ||
81 | iwch_modify_qp(qhp->rhp, qhp, IWCH_QP_ATTR_NEXT_STATE, | ||
82 | &attrs, 1); | ||
83 | if (send_term) | ||
84 | iwch_post_terminate(qhp, rsp_msg); | ||
85 | } | ||
86 | |||
79 | event.event = ib_event; | 87 | event.event = ib_event; |
80 | event.device = chp->ibcq.device; | 88 | event.device = chp->ibcq.device; |
81 | if (ib_event == IB_EVENT_CQ_ERR) | 89 | if (ib_event == IB_EVENT_CQ_ERR) |
@@ -86,13 +94,7 @@ static void post_qp_event(struct iwch_dev *rnicp, struct iwch_cq *chp, | |||
86 | if (qhp->ibqp.event_handler) | 94 | if (qhp->ibqp.event_handler) |
87 | (*qhp->ibqp.event_handler)(&event, qhp->ibqp.qp_context); | 95 | (*qhp->ibqp.event_handler)(&event, qhp->ibqp.qp_context); |
88 | 96 | ||
89 | if (qhp->attr.state == IWCH_QP_STATE_RTS) { | 97 | (*chp->ibcq.comp_handler)(&chp->ibcq, chp->ibcq.cq_context); |
90 | attrs.next_state = IWCH_QP_STATE_TERMINATE; | ||
91 | iwch_modify_qp(qhp->rhp, qhp, IWCH_QP_ATTR_NEXT_STATE, | ||
92 | &attrs, 1); | ||
93 | if (send_term) | ||
94 | iwch_post_terminate(qhp, rsp_msg); | ||
95 | } | ||
96 | 98 | ||
97 | if (atomic_dec_and_test(&qhp->refcnt)) | 99 | if (atomic_dec_and_test(&qhp->refcnt)) |
98 | wake_up(&qhp->wait); | 100 | wake_up(&qhp->wait); |
@@ -179,7 +181,6 @@ void iwch_ev_dispatch(struct cxio_rdev *rdev_p, struct sk_buff *skb) | |||
179 | case TPT_ERR_BOUND: | 181 | case TPT_ERR_BOUND: |
180 | case TPT_ERR_INVALIDATE_SHARED_MR: | 182 | case TPT_ERR_INVALIDATE_SHARED_MR: |
181 | case TPT_ERR_INVALIDATE_MR_WITH_MW_BOUND: | 183 | case TPT_ERR_INVALIDATE_MR_WITH_MW_BOUND: |
182 | (*chp->ibcq.comp_handler)(&chp->ibcq, chp->ibcq.cq_context); | ||
183 | post_qp_event(rnicp, chp, rsp_msg, IB_EVENT_QP_ACCESS_ERR, 1); | 184 | post_qp_event(rnicp, chp, rsp_msg, IB_EVENT_QP_ACCESS_ERR, 1); |
184 | break; | 185 | break; |
185 | 186 | ||