aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGal Pressman <galpress@amazon.com>2020-01-29 09:18:03 +0200
committerJason Gunthorpe <jgg@mellanox.com>2020-01-29 16:41:05 -0400
commitba19e16651a5c67fa8b53ce4fb5bfbab8d326b6c (patch)
treeaf24b18708094dc4bd28af3309e097af125662f9
parentRDMA/cma: Fix unbalanced cm_id reference count during address resolve (diff)
downloadlinux-dev-ba19e16651a5c67fa8b53ce4fb5bfbab8d326b6c.tar.xz
linux-dev-ba19e16651a5c67fa8b53ce4fb5bfbab8d326b6c.zip
RDMA/efa: Mask access flags with the correct optional range
The uapi value IB_UVERBS_ACCESS_OPTIONAL_RANGE shouldn't be used inside the driver, use IB_ACCESS_OPTIONAL instead. Fixes: 86dd738cf20c ("RDMA/efa: Allow passing of optional access flags for MR registration") Link: https://lore.kernel.org/r/20200129071803.40117-1-galpress@amazon.com Signed-off-by: Gal Pressman <galpress@amazon.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
-rw-r--r--drivers/infiniband/hw/efa/efa_verbs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/efa/efa_verbs.c b/drivers/infiniband/hw/efa/efa_verbs.c
index 4c7b7800a861..ec5545870554 100644
--- a/drivers/infiniband/hw/efa/efa_verbs.c
+++ b/drivers/infiniband/hw/efa/efa_verbs.c
@@ -1367,7 +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;
+ access_flags &= ~IB_ACCESS_OPTIONAL;
if (access_flags & ~supp_access_flags) {
ibdev_dbg(&dev->ibdev,
"Unsupported access flags[%#x], supported[%#x]\n",