summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Guralnik <michaelgur@mellanox.com>2020-01-08 19:05:37 +0100
committerJason Gunthorpe <jgg@mellanox.com>2020-01-16 20:55:46 +0100
commit86dd738cf20cee4ac316274743e5707c4ccb6039 (patch)
tree61cc5614505a038800f60216099bb5e1511fe6cc
parentRDMA/core: Add optional access flags range (diff)
downloadlinux-86dd738cf20cee4ac316274743e5707c4ccb6039.tar.xz
linux-86dd738cf20cee4ac316274743e5707c4ccb6039.zip
RDMA/efa: Allow passing of optional access flags for MR registration
As part of adding a range of optional access flags that drivers need to be able to accept, mask this range inside efa driver. This will prevent the driver from failing when an access flag from that range is passed. Link: https://lore.kernel.org/r/1578506740-22188-8-git-send-email-yishaih@mellanox.com Signed-off-by: Michael Guralnik <michaelgur@mellanox.com> Signed-off-by: Yishai Hadas <yishaih@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
-rw-r--r--drivers/infiniband/hw/efa/efa_verbs.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/efa/efa_verbs.c b/drivers/infiniband/hw/efa/efa_verbs.c
index 9a6cff718c49..a556572058ff 100644
--- a/drivers/infiniband/hw/efa/efa_verbs.c
+++ b/drivers/infiniband/hw/efa/efa_verbs.c
@@ -1367,6 +1367,7 @@ struct ib_mr *efa_reg_mr(struct ib_pd *ibpd, u64 start, u64 length,
IB_ACCESS_LOCAL_WRITE |
(is_rdma_read_cap(dev) ? IB_ACCESS_REMOTE_READ : 0);
+ access_flags &= ~IB_UVERBS_ACCESS_OPTIONAL_RANGE;
if (access_flags & ~supp_access_flags) {
ibdev_dbg(&dev->ibdev,
"Unsupported access flags[%#x], supported[%#x]\n",