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
This commit is contained in:
Bart Van Assche
2012-02-13 17:06:50 +00:00
parent a5a4d5ca6c
commit fab05915ad

View File

@@ -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;