Skip to content

Commit ab6f724

Browse files
Wenpeng Liangjgunthorpe
authored andcommitted
RDMA/hns: Fix retry_cnt and rnr_cnt when querying QP
The maximum number of retransmission should be returned when querying QP, not the value of retransmission counter. Fixes: 99fcf82 ("RDMA/hns: Fix the wrong value of rnr_retry when querying qp") Fixes: 926a01d ("RDMA/hns: Add QP operations support for hip08 SoC") Link: https://lore.kernel.org/r/1606382977-21431-1-git-send-email-liweihang@huawei.com Signed-off-by: Wenpeng Liang <liangwenpeng@huawei.com> Signed-off-by: Weihang Li <liweihang@huawei.com> Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
1 parent ebed7b7 commit ab6f724

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

drivers/infiniband/hw/hns/hns_roce_hw_v2.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4989,11 +4989,11 @@ static int hns_roce_v2_query_qp(struct ib_qp *ibqp, struct ib_qp_attr *qp_attr,
49894989
V2_QPC_BYTE_28_AT_M,
49904990
V2_QPC_BYTE_28_AT_S);
49914991
qp_attr->retry_cnt = roce_get_field(context.byte_212_lsn,
4992-
V2_QPC_BYTE_212_RETRY_CNT_M,
4993-
V2_QPC_BYTE_212_RETRY_CNT_S);
4992+
V2_QPC_BYTE_212_RETRY_NUM_INIT_M,
4993+
V2_QPC_BYTE_212_RETRY_NUM_INIT_S);
49944994
qp_attr->rnr_retry = roce_get_field(context.byte_244_rnr_rxack,
4995-
V2_QPC_BYTE_244_RNR_CNT_M,
4996-
V2_QPC_BYTE_244_RNR_CNT_S);
4995+
V2_QPC_BYTE_244_RNR_NUM_INIT_M,
4996+
V2_QPC_BYTE_244_RNR_NUM_INIT_S);
49974997

49984998
done:
49994999
qp_attr->cur_qp_state = qp_attr->qp_state;

0 commit comments

Comments
 (0)