diff options
author | oulijun <oulijun@huawei.com> | 2017-11-10 16:55:49 +0800 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-11-10 12:31:34 -0500 |
commit | 2872646134aa5cb99f674d81c1fdb0d595243499 (patch) | |
tree | 8d74fe4ee77e1f0464ed766a84d813a2d8a21d8f /drivers/infiniband | |
parent | befb63b43df535917cd73e961e701d0b157b92d0 (diff) | |
download | linux-2872646134aa5cb99f674d81c1fdb0d595243499.tar.bz2 |
RDMA/hns: Update the usage of ack timeout in hip08
The ack timeout's value in qp context shall be a 5-bit value
and be assgined by users. When at of qpc is set zero, the
timer is disabled.
When attr_mask set for IB_QP_TIMEOUT, The ack timeout field
is effective.
Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Shaobo Xu <xushaobo2@huawei.com>
Signed-off-by: Yixian Liu <liuyixian@huawei.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/hns/hns_roce_hw_v2.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c index ee2d832c53c2..d74a5220d826 100644 --- a/drivers/infiniband/hw/hns/hns_roce_hw_v2.c +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v2.c @@ -2725,15 +2725,12 @@ static int modify_qp_rtr_to_rts(struct ib_qp *ibqp, roce_set_field(qpc_mask->byte_212_lsn, V2_QPC_BYTE_212_LSN_M, V2_QPC_BYTE_212_LSN_S, 0); - if (attr->timeout < 0xf) - roce_set_field(context->byte_28_at_fl, V2_QPC_BYTE_28_AT_M, - V2_QPC_BYTE_28_AT_S, 0xf); - else + if (attr_mask & IB_QP_TIMEOUT) { roce_set_field(context->byte_28_at_fl, V2_QPC_BYTE_28_AT_M, V2_QPC_BYTE_28_AT_S, attr->timeout); - - roce_set_field(qpc_mask->byte_28_at_fl, V2_QPC_BYTE_28_AT_M, - V2_QPC_BYTE_28_AT_S, 0); + roce_set_field(qpc_mask->byte_28_at_fl, V2_QPC_BYTE_28_AT_M, + V2_QPC_BYTE_28_AT_S, 0); + } roce_set_field(context->byte_28_at_fl, V2_QPC_BYTE_28_SL_M, V2_QPC_BYTE_28_SL_S, |