RDMA/hns: Only assgin some fields if the relatived attr_mask is set
authorLijun Ou <oulijun@huawei.com>
Sat, 23 Feb 2019 12:01:24 +0000 (20:01 +0800)
committerJason Gunthorpe <jgg@mellanox.com>
Mon, 25 Mar 2019 23:59:55 +0000 (20:59 -0300)
commit5b01b243b0b3725b4460e8924e1f105bb4038969
treee3a38a2168ce754360f613a43a9fc8680f149550
parent834fa8cf6f7002706b02873fc0d16f9b06ef4819
RDMA/hns: Only assgin some fields if the relatived attr_mask is set

According to IB protocol, some fields of qp context are filled with
optional when the relatived attr_mask are set. The relatived attr_mask
include IB_QP_TIMEOUT, IB_QP_RETRY_CNT, IB_QP_RNR_RETRY and
IB_QP_MIN_RNR_TIMER.  Besides, we move some assignments of the fields of
qp context into the outside of the specific qp state jump function.

Signed-off-by: Lijun Ou <oulijun@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/hns/hns_roce_hw_v2.c