linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Wenpeng Liang <liangwenpeng@huawei.com>
To: <dledford@redhat.com>, <jgg@nvidia.com>
Cc: <linux-rdma@vger.kernel.org>, <linuxarm@huawei.com>,
	<liangwenpeng@huawei.com>
Subject: [PATCH for-next 1/7] RDMA/hns: Fix query destination qpn
Date: Thu, 26 Aug 2021 21:37:30 +0800	[thread overview]
Message-ID: <1629985056-57004-2-git-send-email-liangwenpeng@huawei.com> (raw)
In-Reply-To: <1629985056-57004-1-git-send-email-liangwenpeng@huawei.com>

The bit width of dqpn is 24 bits, using u8 will cause truncation error.

Fixes: 926a01dc000d ("RDMA/hns: Add QP operations support for hip08 SoC")
Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com>
---
 drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
index 50a6f91..752bad5 100644
--- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
+++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c
@@ -5130,7 +5130,7 @@ static int hns_roce_v2_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *qp_attr,
 
 	qp_attr->rq_psn = hr_reg_read(&context, QPC_RX_REQ_EPSN);
 	qp_attr->sq_psn = (u32)hr_reg_read(&context, QPC_SQ_CUR_PSN);
-	qp_attr->dest_qp_num = (u8)hr_reg_read(&context, QPC_DQPN);
+	qp_attr->dest_qp_num = hr_reg_read(&context, QPC_DQPN);
 	qp_attr->qp_access_flags =
 		((hr_reg_read(&context, QPC_RRE)) << V2_QP_RRE_S) |
 		((hr_reg_read(&context, QPC_RWE)) << V2_QP_RWE_S) |
-- 
2.8.1


  reply	other threads:[~2021-08-26 13:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-26 13:37 [PATCH for-next 0/7] RDMA/hns: Updates for 5.15 Wenpeng Liang
2021-08-26 13:37 ` Wenpeng Liang [this message]
2021-08-26 13:37 ` [PATCH for-next 2/7] RDMA/hns: Fix QP's resp incomplete assignment Wenpeng Liang
2021-08-26 13:37 ` [PATCH for-next 3/7] RDMA/hns: Remove dqpn filling when modify qp from Init to Init Wenpeng Liang
2021-08-26 13:37 ` [PATCH for-next 4/7] RDMA/hns: Remove RST2RST error prints for hw v1 Wenpeng Liang
2021-08-26 13:37 ` [PATCH for-next 5/7] RDMA/hns: Adjust the order in which irq are requested and enabled Wenpeng Liang
2021-08-26 13:37 ` [PATCH for-next 6/7] RDMA/hns: Encapsulate the qp db as a function Wenpeng Liang
2021-08-26 13:37 ` [PATCH for-next 7/7] RDMA/hns: Delete unnecessary blank lines Wenpeng Liang
2021-08-26 15:33 ` [PATCH for-next 0/7] RDMA/hns: Updates for 5.15 Jason Gunthorpe

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=1629985056-57004-2-git-send-email-liangwenpeng@huawei.com \
    --to=liangwenpeng@huawei.com \
    --cc=dledford@redhat.com \
    --cc=jgg@nvidia.com \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linuxarm@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;
as well as URLs for NNTP newsgroup(s).