projects
/
platform
/
kernel
/
linux-starfive.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b9989ab
)
RDMA/hns: Fix hns_roce_table_get return value
author
Chengchang Tang
<tangchengchang@huawei.com>
Tue, 23 May 2023 12:16:40 +0000
(20:16 +0800)
committer
Jason Gunthorpe
<jgg@nvidia.com>
Thu, 1 Jun 2023 22:58:47 +0000
(19:58 -0300)
The return value of set_hem has been fixed to ENODEV, which will lead a
diagnostic information missing.
Fixes:
9a4435375cd1
("IB/hns: Add driver files for hns RoCE driver")
Link:
https://lore.kernel.org/r/20230523121641.3132102-3-huangjunxian6@hisilicon.com
Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Junxian Huang <huangjunxian6@hisilicon.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/hns/hns_roce_hem.c
patch
|
blob
|
history
diff --git
a/drivers/infiniband/hw/hns/hns_roce_hem.c
b/drivers/infiniband/hw/hns/hns_roce_hem.c
index
aa8a08d
..
f302749
100644
(file)
--- a/
drivers/infiniband/hw/hns/hns_roce_hem.c
+++ b/
drivers/infiniband/hw/hns/hns_roce_hem.c
@@
-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;
}