Skip to contentSkip to conversation

RDMA/efa: Mask access flags with the correct optional range

PATCH Applied Gal Pressman 2 participants 2 messages Jan 29, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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")
---
 drivers/infiniband/hw/efa/efa_verbs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/infiniband/hw/efa/efa_verbs.c +1 -1
index a556572058ff..68798b66b84e 100644
@@ -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",
Signature · 1 line
2.25.0
#1 lore raw
Quoted 8 lines · Gal Pressman

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")
---
 drivers/infiniband/hw/efa/efa_verbs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Applied to for-next, thanks

Jason