Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1528720

[PATCH V3 for-next 06/11] IB/hns: Fix the bug for qp state in hns_roce_v1_m_qp()

From Salil Mehta <salil.mehta@huawei.com>
Newsgroups linux.kernel
Subject [PATCH V3 for-next 06/11] IB/hns: Fix the bug for qp state in hns_roce_v1_m_qp()
Date 2016-11-23 20:50 +0100
Message-ID <sGLIm-E0-31@gated-at.bofh.it> (permalink)
References <sGLIl-E0-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Lijun Ou <oulijun@huawei.com>

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>
---
 drivers/infiniband/hw/hns/hns_roce_hw_v1.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v1.c b/drivers/infiniband/hw/hns/hns_roce_hw_v1.c
index 643a2ff..b835a55 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,
-- 
1.7.9.5

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH V3 for-next 00/11] Code improvements & fixes for HNS RoCE driver Salil Mehta <salil.mehta@huawei.com> - 2016-11-23 20:50 +0100
  [PATCH V3 for-next 11/11] IB/hns: Fix for Checkpatch.pl comment style errors Salil Mehta <salil.mehta@huawei.com> - 2016-11-23 20:50 +0100
  [PATCH V3 for-next 02/11] IB/hns: Add code for refreshing CQ CI using TPTR Salil Mehta <salil.mehta@huawei.com> - 2016-11-23 20:50 +0100
  [PATCH V3 for-next 01/11] IB/hns: Add the interface for querying QP1 Salil Mehta <salil.mehta@huawei.com> - 2016-11-23 20:50 +0100
  [PATCH V3 for-next 06/11] IB/hns: Fix the bug for qp state in hns_roce_v1_m_qp() Salil Mehta <salil.mehta@huawei.com> - 2016-11-23 20:50 +0100
  [PATCH V3 for-next 04/11] IB/hns: add self loopback for CM Salil Mehta <salil.mehta@huawei.com> - 2016-11-23 20:50 +0100
  [PATCH V3 for-next 08/11] IB/hns: Modify query info named port_num when querying RC QP Salil Mehta <salil.mehta@huawei.com> - 2016-11-23 20:50 +0100
  [PATCH V3 for-next 07/11] IB/hns: Modify the macro for the timeout when cmd process Salil Mehta <salil.mehta@huawei.com> - 2016-11-23 20:50 +0100
  [PATCH V3 for-next 09/11] IB/hns: Change qpn allocation to round-robin mode. Salil Mehta <salil.mehta@huawei.com> - 2016-11-23 20:50 +0100
  [PATCH V3 for-next 03/11] IB/hns: Optimize the logic of allocating memory using APIs Salil Mehta <salil.mehta@huawei.com> - 2016-11-23 20:50 +0100
  [PATCH V3 for-next 10/11] IB/hns: Implement the add_gid/del_gid and optimize the GIDs management Salil Mehta <salil.mehta@huawei.com> - 2016-11-23 20:50 +0100

csiph-web