From fab05915ad3318fd6807a96c398d13db50427397 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Mon, 13 Feb 2012 17:06:50 +0000 Subject: [PATCH] ib_srpt: Reset a QP before transitioning it to the INIT state. That should avoid that an error message like the following is generated if driver and HCA QP state get out of sync: mlx4_core 0000:03:00.0: command 0x19 failed: fw status = 0x9 git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@4123 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- srpt/src/ib_srpt.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/srpt/src/ib_srpt.c b/srpt/src/ib_srpt.c index 99c79c6a1..e2af0d277 100644 --- a/srpt/src/ib_srpt.c +++ b/srpt/src/ib_srpt.c @@ -1098,6 +1098,11 @@ static int srpt_init_ch_qp(struct srpt_rdma_ch *ch, struct ib_qp *qp) if (!attr) return -ENOMEM; + attr->qp_state = IB_QPS_RESET; + ret = ib_modify_qp(qp, attr, IB_QP_STATE); + WARN(ret < 0, "Transition to IB_QPS_RESET state failed with code: %d\n", + ret); + attr->qp_state = IB_QPS_INIT; attr->qp_access_flags = IB_ACCESS_LOCAL_WRITE | IB_ACCESS_REMOTE_READ | IB_ACCESS_REMOTE_WRITE;