diff options
author | Wei Hu(Xavier) <xavier.huwei@huawei.com> | 2017-10-26 17:10:25 +0800 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-11-10 12:14:27 -0500 |
commit | b5ff0f610b523478a167ae6f07e30c9f75d0c538 (patch) | |
tree | a7828647f5ec792b0f03dcd14be684fa62832c16 /drivers/infiniband/hw/hns/hns_roce_hw_v1.c | |
parent | 023c1477b0d0b123c0dec6466ec568a25928bef2 (diff) | |
download | op-kernel-dev-b5ff0f610b523478a167ae6f07e30c9f75d0c538.zip op-kernel-dev-b5ff0f610b523478a167ae6f07e30c9f75d0c538.tar.gz |
RDMA/hns: Configure sgid type for hip08 RoCE
The hardware vendors need to generate RoCEv1 or RoCEv2
packet according to the sgid type configured.
Besides, update the gid table size for hip08 RoCE
device.
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/hw/hns/hns_roce_hw_v1.c')
-rw-r--r-- | drivers/infiniband/hw/hns/hns_roce_hw_v1.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/hns/hns_roce_hw_v1.c b/drivers/infiniband/hw/hns/hns_roce_hw_v1.c index 00cbfc9..af27168 100644 --- a/drivers/infiniband/hw/hns/hns_roce_hw_v1.c +++ b/drivers/infiniband/hw/hns/hns_roce_hw_v1.c @@ -1703,8 +1703,9 @@ static int hns_roce_v1_chk_mbox(struct hns_roce_dev *hr_dev, return 0; } -static void hns_roce_v1_set_gid(struct hns_roce_dev *hr_dev, u8 port, - int gid_index, union ib_gid *gid) +static int hns_roce_v1_set_gid(struct hns_roce_dev *hr_dev, u8 port, + int gid_index, union ib_gid *gid, + const struct ib_gid_attr *attr) { u32 *p = NULL; u8 gid_idx = 0; @@ -1726,6 +1727,8 @@ static void hns_roce_v1_set_gid(struct hns_roce_dev *hr_dev, u8 port, p = (u32 *)&gid->raw[0xc]; roce_raw_write(*p, hr_dev->reg_base + ROCEE_PORT_GID_H_0_REG + (HNS_ROCE_V1_GID_NUM * gid_idx)); + + return 0; } static int hns_roce_v1_set_mac(struct hns_roce_dev *hr_dev, u8 phy_port, |