提交 31b78d3d 编写于 作者: C Chengchang Tang 提交者: Zheng Zengkai

RDMA/hns: Fix hns_roce_table_get return value

driver inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I5X0C3

---------------------------------------------------------------------

The return value of set_hem has been fixed to ENODEV, which will
lead a diagnostic information missing.

Fixes: 9a443537 ("IB/hns: Add driver files for hns RoCE driver")
Signed-off-by: NChengchang Tang <tangchengchang@huawei.com>
Reviewed-by: NYangyang Li <liyangyang20@huawei.com>
Reviewed-by: NHaoyue Xu <xuhaoyue1@hisilicon.com>
Reviewed-by: NYueHaibing <yuehaibing@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 e9d5306b
...@@ -596,11 +596,12 @@ int hns_roce_table_get(struct hns_roce_dev *hr_dev, ...@@ -596,11 +596,12 @@ int hns_roce_table_get(struct hns_roce_dev *hr_dev,
} }
/* Set HEM base address(128K/page, pa) to Hardware */ /* Set HEM base address(128K/page, pa) to Hardware */
if (hr_dev->hw->set_hem(hr_dev, table, obj, HEM_HOP_STEP_DIRECT)) { ret = hr_dev->hw->set_hem(hr_dev, table, obj, HEM_HOP_STEP_DIRECT);
if (ret) {
hns_roce_free_hem(hr_dev, table->hem[i]); hns_roce_free_hem(hr_dev, table->hem[i]);
table->hem[i] = NULL; table->hem[i] = NULL;
ret = -ENODEV; dev_err(dev, "set HEM base address to HW failed, ret = %d.\n",
dev_err(dev, "set HEM base address to HW failed.\n"); ret);
goto out; goto out;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册