Skip to content

Commit ba19e16

Browse files
gal-pressmanjgunthorpe
authored andcommitted
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: 86dd738 ("RDMA/efa: Allow passing of optional access flags for MR registration") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Gal Pressman <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent b4fb4cc commit ba19e16

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/infiniband/hw/efa/efa_verbs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1367,7 +1367,7 @@ struct ib_mr *efa_reg_mr(struct ib_pd *ibpd, u64 start, u64 length,
13671367
IB_ACCESS_LOCAL_WRITE |
13681368
(is_rdma_read_cap(dev) ? IB_ACCESS_REMOTE_READ : 0);
13691369

1370-
access_flags &= ~IB_UVERBS_ACCESS_OPTIONAL_RANGE;
1370+
access_flags &= ~IB_ACCESS_OPTIONAL;
13711371
if (access_flags & ~supp_access_flags) {
13721372
ibdev_dbg(&dev->ibdev,
13731373
"Unsupported access flags[%#x], supported[%#x]\n",

0 commit comments

Comments
 (0)