From: Sagi Grimberg <[email protected]>

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 send it.

Reported-by: Alex Tabachnik <[email protected]>
Signed-off-by: Sagi Grimberg <[email protected]>
Signed-off-by: Or Gerlitz <[email protected]>
---
 drivers/infiniband/ulp/iser/iser_verbs.c |    4 +++-
 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 08e51e7..cd4acc5 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);
        }
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to