mirror of
https://github.com/torvalds/linux.git
synced 2024-11-21 19:41:42 +00:00
RDMA/core: return -EOPNOSUPP for ODP unsupported device
ib_reg_mr(3) which is used to register a MR with specific access flags for specific HCA will set errno when something go wrong. So, here we should return the specific -EOPNOTSUPP when the being requested ODP access flag is unsupported by the HCA(such as RXE). Signed-off-by: Li Zhijian <lizhijian@fujitsu.com> Link: https://lore.kernel.org/r/20221001020045.8324-1-lizhijian@fujitsu.com Reviewed-by: Zhu Yanjun <zyjzyj2000@gmail.com> Signed-off-by: Leon Romanovsky <leon@kernel.org>
This commit is contained in:
parent
26312973bf
commit
53c2d5b14a
@ -4334,7 +4334,7 @@ static inline int ib_check_mr_access(struct ib_device *ib_dev,
|
||||
|
||||
if (flags & IB_ACCESS_ON_DEMAND &&
|
||||
!(ib_dev->attrs.kernel_cap_flags & IBK_ON_DEMAND_PAGING))
|
||||
return -EINVAL;
|
||||
return -EOPNOTSUPP;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user