summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/hns
diff options
context:
space:
mode:
authorLijun Ou <oulijun@huawei.com>2018-12-08 13:40:07 +0300
committerJason Gunthorpe <jgg@mellanox.com>2018-12-11 22:04:06 +0300
commit9f5071010347b2134e1139dca2396a0cea8130dc (patch)
tree4948c5d0ff09357e55c5c85a00ddbc9b4b30a971 /drivers/infiniband/hw/hns
parent9af3f5cf9d64a056eca53bc643f6288ad28bbbb5 (diff)
downloadlinux-9f5071010347b2134e1139dca2396a0cea8130dc.tar.xz
RDMA/hns: Init qp context when modify qp from reset to init
It needs to clear qp context previous when init qp context. Otherwise, the newly created qp context residue has the contents of the qp context before the uninstall, and the qp context content is disordered, causing the task to fail. Signed-off-by: Lijun Ou <oulijun@huawei.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/hns')
-rw-r--r--drivers/infiniband/hw/hns/hns_roce_hw_v2.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index 835b78371294..1cffe74b5fc8 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -3695,6 +3695,7 @@ static int hns_roce_v2_modify_qp(struct ib_qp *ibqp,
*/
memset(qpc_mask, 0xff, sizeof(*qpc_mask));
if (cur_state == IB_QPS_RESET && new_state == IB_QPS_INIT) {
+ memset(qpc_mask, 0, sizeof(*qpc_mask));
modify_qp_reset_to_init(ibqp, attr, attr_mask, context,
qpc_mask);
} else if (cur_state == IB_QPS_INIT && new_state == IB_QPS_INIT) {