Skip to content

Commit e788a3c

Browse files
Wenpeng Liangjgunthorpe
authored andcommitted
RDMA/hns: Fix query destination qpn
The bit width of dqpn is 24 bits, using u8 will cause truncation error. Fixes: 926a01d ("RDMA/hns: Add QP operations support for hip08 SoC") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Wenpeng Liang <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 145eba1 commit e788a3c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/infiniband/hw/hns/hns_roce_hw_v2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5130,7 +5130,7 @@ static int hns_roce_v2_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *qp_attr,
51305130

51315131
qp_attr->rq_psn = hr_reg_read(&context, QPC_RX_REQ_EPSN);
51325132
qp_attr->sq_psn = (u32)hr_reg_read(&context, QPC_SQ_CUR_PSN);
5133-
qp_attr->dest_qp_num = (u8)hr_reg_read(&context, QPC_DQPN);
5133+
qp_attr->dest_qp_num = hr_reg_read(&context, QPC_DQPN);
51345134
qp_attr->qp_access_flags =
51355135
((hr_reg_read(&context, QPC_RRE)) << V2_QP_RRE_S) |
51365136
((hr_reg_read(&context, QPC_RWE)) << V2_QP_RWE_S) |

0 commit comments

Comments
 (0)