mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Wei Hu (Xavier)" <xavier.huwei@huawei.com>
To: <dledford@redhat.com>
Cc: <linux-rdma@vger.kernel.org>, <xavier.huwei@huawei.com>,
	<lijun_nudt@163.com>, <oulijun@huawei.com>,
	<charles.chenxin@huawei.com>, <liuyixian@huawei.com>,
	<xushaobo2@huawei.com>, <zhangxiping3@huawei.com>,
	<linuxarm@huawei.com>, <linux-kernel@vger.kernel.org>,
	<shaobohsu@163.com>
Subject: [PATCH V2 for-next 1/8] RDMA/hns: Modify the value with rd&dest_rd of qp_attr
Date: Fri, 29 Sep 2017 23:10:07 +0800	[thread overview]
Message-ID: <1506697814-98432-2-git-send-email-xavier.huwei@huawei.com> (raw)
In-Reply-To: <1506697814-98432-1-git-send-email-xavier.huwei@huawei.com>

From: Lijun Ou <oulijun@huawei.com>

The value of max_rd_atomic and max_dest_rd_atomic in query_qp
are incorrect. It should be assigned by left shifting of
the bit in hip06 SoC.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v1.c b/drivers/infiniband/hw/hns/hns_roce_hw_v1.c
index 426f55a..6e9acfd 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v1.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v1.c
@@ -3484,10 +3484,10 @@ static int hns_roce_v1_q_qp(struct ib_qp *ibqp, struct ib_qp_attr *qp_attr,
 			      QP_CONTEXT_QPC_BYTES_12_P_KEY_INDEX_S);
 	qp_attr->port_num = hr_qp->port + 1;
 	qp_attr->sq_draining = 0;
-	qp_attr->max_rd_atomic = roce_get_field(context->qpc_bytes_156,
+	qp_attr->max_rd_atomic = 1 << roce_get_field(context->qpc_bytes_156,
 				 QP_CONTEXT_QPC_BYTES_156_INITIATOR_DEPTH_M,
 				 QP_CONTEXT_QPC_BYTES_156_INITIATOR_DEPTH_S);
-	qp_attr->max_dest_rd_atomic = roce_get_field(context->qpc_bytes_32,
+	qp_attr->max_dest_rd_atomic = 1 << roce_get_field(context->qpc_bytes_32,
 				 QP_CONTEXT_QPC_BYTES_32_RESPONDER_RESOURCES_M,
 				 QP_CONTEXT_QPC_BYTES_32_RESPONDER_RESOURCES_S);
 	qp_attr->min_rnr_timer = (u8)(roce_get_field(context->qpc_bytes_24,
-- 
1.9.1

  reply	other threads:[~2017-09-29 14:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-29 15:10 [PATCH V2 for-next 0/8] Bug fixes & Code improvements in hip06 and hip08 RoCE driver Wei Hu (Xavier)
2017-09-29 15:10 ` Wei Hu (Xavier) [this message]
2017-09-29 15:10 ` [PATCH V2 for-next 2/8] RDMA/hns: Factor out the code for checking sdb status into a new function Wei Hu (Xavier)
2017-09-29 15:10 ` [PATCH V2 for-next 3/8] RDMA/hns: Add return statement when kzalloc return NULL in hns_roce_v1_recreate_lp_qp Wei Hu (Xavier)
2017-09-29 15:54   ` Doug Ledford
2017-09-29 15:10 ` [PATCH V2 for-next 4/8] RDMA/hns: Set mask for destination qp field of qp context assignment Wei Hu (Xavier)
2017-09-29 16:05   ` Doug Ledford
2017-09-29 15:10 ` [PATCH V2 for-next 5/8] RDMA/hns: Set rdma_ah_attr type for querying qp Wei Hu (Xavier)
2017-09-29 15:10 ` [PATCH V2 for-next 6/8] RDMA/hns: Add return statement when checking error in hns_roce_v1_mr_free_work_fn Wei Hu (Xavier)
2017-09-29 15:10 ` [PATCH V2 for-next 7/8] RDMA/hns: Remove unnecessarily calling unregister_inetaddr_notifier function Wei Hu (Xavier)
2017-09-29 15:10 ` [PATCH V2 for-next 8/8] RDMA/hns: Replace usleep_range with udelay when checking command status Wei Hu (Xavier)
2017-09-29 16:22 ` [PATCH V2 for-next 0/8] Bug fixes & Code improvements in hip06 and hip08 RoCE driver Doug Ledford

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1506697814-98432-2-git-send-email-xavier.huwei@huawei.com \
    --to=xavier.huwei@huawei.com \
    --cc=charles.chenxin@huawei.com \
    --cc=dledford@redhat.com \
    --cc=lijun_nudt@163.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=liuyixian@huawei.com \
    --cc=oulijun@huawei.com \
    --cc=shaobohsu@163.com \
    --cc=xushaobo2@huawei.com \
    --cc=zhangxiping3@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®