diff options
author | Lijun Ou <oulijun@huawei.com> | 2016-11-23 22:41:04 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2016-12-03 22:20:42 +0300 |
commit | 1dec243ac00c6e10217c994c5a500bc85fe0f649 (patch) | |
tree | 3ae9f16fd8714095758ce22bea4d748260bf71d8 /drivers/infiniband/hw/hns | |
parent | 80596c6717a7b0e9969ffbd03c7e1dd33112f7e9 (diff) | |
download | linux-1dec243ac00c6e10217c994c5a500bc85fe0f649.tar.xz |
IB/hns: Fix the bug for qp state in hns_roce_v1_m_qp()
In old code, the value of qp state from qpc was assigned for
attr->qp_state. The value may be an error while attr_mask &
IB_QP_STATE is zero.
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Reviewed-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/hns')
-rw-r--r-- | drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v1.c b/drivers/infiniband/hw/hns/hns_roce_hw_v1.c index c1a9dac25d7b..528cb84975b4 100644 --- a/drivers/infiniband/hw/hns/hns_roce_hw_v1.c +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v1.c @@ -2571,7 +2571,7 @@ static int hns_roce_v1_m_qp(struct ib_qp *ibqp, const struct ib_qp_attr *attr, /* Every status migrate must change state */ roce_set_field(context->qpc_bytes_144, QP_CONTEXT_QPC_BYTES_144_QP_STATE_M, - QP_CONTEXT_QPC_BYTES_144_QP_STATE_S, attr->qp_state); + QP_CONTEXT_QPC_BYTES_144_QP_STATE_S, new_state); /* SW pass context to HW */ ret = hns_roce_v1_qp_modify(hr_dev, &hr_qp->mtt, |