提交 a3276ab0 编写于 作者: C Chengchang Tang 提交者: ZhouJuan

RDMA/hns: Fix hns_roce_table_get return value

mainline inclusion
from mainline-v6.5-rc1
commit cf5b608fb0e369c473a8303cad6ddb386505e5b8
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7R61Q
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=cf5b608fb0e369c473a8303cad6ddb386505e5b8

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

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")
Link: https://lore.kernel.org/r/20230523121641.3132102-3-huangjunxian6@hisilicon.comSigned-off-by: NChengchang Tang <tangchengchang@huawei.com>
Signed-off-by: NJunxian Huang <huangjunxian6@hisilicon.com>
Signed-off-by: NJason Gunthorpe <jgg@nvidia.com>
Signed-off-by: NJuan Zhou <zhoujuan51@h-partners.com>
上级 e562e75b
......@@ -595,11 +595,12 @@ int hns_roce_table_get(struct hns_roce_dev *hr_dev,
}
/* 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]);
table->hem[i] = NULL;
ret = -ENODEV;
dev_err(dev, "set HEM base address to HW failed.\n");
dev_err(dev, "set HEM base address to HW failed, ret = %d.\n",
ret);
goto out;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册