summaryrefslogtreecommitdiff
path: root/drivers/infiniband
diff options
context:
space:
mode:
authorSagi Grimberg <sagig@mellanox.com>2014-12-07 17:09:53 +0300
committerRoland Dreier <roland@purestorage.com>2014-12-16 05:11:44 +0300
commit16df2a26fb3efb52f066098cdbd0f81c8378d861 (patch)
tree141c87f9746fe581f1b2938abaf5f152af92cef4 /drivers/infiniband
parentf4641ef701d41929e0674f114e47a6824761e5b1 (diff)
downloadlinux-16df2a26fb3efb52f066098cdbd0f81c8378d861.tar.xz
IB/iser: Fix catastrophic error flow hang
In case of the HCA going into catasrophic error flow, the beacon post_send is likely to fail, so surely there will be no completion for it. In this case, use a best effort approach and don't wait for beacon completion if we failed to post the send. Reported-by: Alex Tabachnik <alext@mellanox.com> Signed-off-by: Sagi Grimberg <sagig@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r--drivers/infiniband/ulp/iser/iser_verbs.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/infiniband/ulp/iser/iser_verbs.c b/drivers/infiniband/ulp/iser/iser_verbs.c
index 08e51e79a054..cd4acc5d94f1 100644
--- a/drivers/infiniband/ulp/iser/iser_verbs.c
+++ b/drivers/infiniband/ulp/iser/iser_verbs.c
@@ -681,8 +681,10 @@ int iser_conn_terminate(struct iser_conn *iser_conn)
/* post an indication that all flush errors were consumed */
err = ib_post_send(ib_conn->qp, &ib_conn->beacon, &bad_wr);
- if (err)
+ if (err) {
iser_err("conn %p failed to post beacon", ib_conn);
+ return 1;
+ }
wait_for_completion(&ib_conn->flush_comp);
}