diff options
| author | Kumar Sanghvi <kumaras@chelsio.com> | 2011-10-13 04:21:30 -0400 |
|---|---|---|
| committer | Roland Dreier <roland@purestorage.com> | 2011-10-14 17:23:04 -0400 |
| commit | 01e7da6ba53ca4d6189a1eae45607c0331c871f2 (patch) | |
| tree | 01cf49e2294c455d0ee2536d47e9d2e5550057ec /drivers | |
| parent | 9efe10a1e1a1ab1dba0af0f520e0697f6e81ebf1 (diff) | |
RDMA/cxgb4: Make sure flush CQ entries are collected on connection close
At the time when a peer closes the connection, iw_cxgb4 will not send
a cq event if ibqp.uobject exists. In that case, its possible for a
user application to get blocked in ibv_get_cq_event().
To resolve this, call the cq's comp_handler to unblock any read from
ibv_get_cq_event(). This will trigger userspace to poll the cq and
collect flush status completions for any pending work requests.
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
Acked-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/infiniband/hw/cxgb4/qp.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/cxgb4/qp.c b/drivers/infiniband/hw/cxgb4/qp.c index a41578e48c7b..892fa7c6d310 100644 --- a/drivers/infiniband/hw/cxgb4/qp.c +++ b/drivers/infiniband/hw/cxgb4/qp.c | |||
| @@ -966,8 +966,12 @@ static void flush_qp(struct c4iw_qp *qhp) | |||
| 966 | if (qhp->ibqp.uobject) { | 966 | if (qhp->ibqp.uobject) { |
| 967 | t4_set_wq_in_error(&qhp->wq); | 967 | t4_set_wq_in_error(&qhp->wq); |
| 968 | t4_set_cq_in_error(&rchp->cq); | 968 | t4_set_cq_in_error(&rchp->cq); |
| 969 | if (schp != rchp) | 969 | (*rchp->ibcq.comp_handler)(&rchp->ibcq, rchp->ibcq.cq_context); |
| 970 | if (schp != rchp) { | ||
| 970 | t4_set_cq_in_error(&schp->cq); | 971 | t4_set_cq_in_error(&schp->cq); |
| 972 | (*schp->ibcq.comp_handler)(&schp->ibcq, | ||
| 973 | schp->ibcq.cq_context); | ||
| 974 | } | ||
| 971 | return; | 975 | return; |
| 972 | } | 976 | } |
| 973 | __flush_qp(qhp, rchp, schp); | 977 | __flush_qp(qhp, rchp, schp); |
