diff mbox series

[rdma-core] cxgb4: remove update_qp_state()

Message ID b8e4f1a4e432e4af8d7de09b1d45cdb5513dce16.1549386060.git.swise@opengridcomputing.com (mailing list archive)
State Not Applicable
Headers show
Series [rdma-core] cxgb4: remove update_qp_state() | expand

Commit Message

Steve Wise Feb. 5, 2019, 4:52 p.m. UTC
Remove it because it is not needed.  If we're flushing the qp, it is
because we've had a fatal error, so just set the user qp state to ERR
and continue on.

Signed-off-by: Steve Wise <swise@opengridcomputing.com>
---
 providers/cxgb4/qp.c | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)
diff mbox series

Patch

diff --git a/providers/cxgb4/qp.c b/providers/cxgb4/qp.c
index 11a411393821..fd028d5e1b7b 100644
--- a/providers/cxgb4/qp.c
+++ b/providers/cxgb4/qp.c
@@ -766,20 +766,6 @@  int c4iw_post_receive(struct ibv_qp *ibqp, struct ibv_recv_wr *wr,
 	return err;
 }
 
-static void update_qp_state(struct c4iw_qp *qhp)
-{
-	struct ibv_query_qp cmd;
-	struct ibv_qp_attr attr;
-	struct ibv_qp_init_attr iattr;
-	int ret;
-
-	ret = ibv_cmd_query_qp(&qhp->ibv_qp, &attr, IBV_QP_STATE, &iattr,
-			       &cmd, sizeof cmd);
-	assert(!ret);
-	if (!ret)
-		qhp->ibv_qp.state = attr.qp_state;
-}
-
 void c4iw_flush_qp(struct c4iw_qp *qhp)
 {
 	struct c4iw_cq *rchp, *schp;
@@ -815,7 +801,7 @@  void c4iw_flush_qp(struct c4iw_qp *qhp)
 	if (srqidx)
 		c4iw_flush_srqidx(qhp, srqidx);
 
-	update_qp_state(qhp);
+	qhp->ibv_qp.state = IBV_QPS_ERR;
 
 	c4iw_flush_hw_cq(rchp, qhp);
 	if (!qhp->srq) {