RDMA/hns: Simplify function's resource related command
authorXi Wang <wangxi11@huawei.com>
Tue, 6 Apr 2021 13:25:09 +0000 (21:25 +0800)
committerJason Gunthorpe <jgg@nvidia.com>
Tue, 13 Apr 2021 23:01:27 +0000 (20:01 -0300)
commit0fb46da051aec3c143e41adc321f3c8a7506d19c
tree751f09f97ac07f7c850e10da5dfb645a47bf99ba
parent7c71f0d12eee4b7375e158dc11f8de6ffc524590
RDMA/hns: Simplify function's resource related command

Use hr_reg_write/read() to simplify codes about configuring function's
resource. And because the design of PF/VF fields is same, they can be
defined only once.

Link: https://lore.kernel.org/r/1617715514-29039-2-git-send-email-liweihang@huawei.com
Signed-off-by: Xi Wang <wangxi11@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/hns/hns_roce_common.h
drivers/infiniband/hw/hns/hns_roce_hw_v2.c
drivers/infiniband/hw/hns/hns_roce_hw_v2.h