diff mbox series

[for-next] RDMA/efa: Mask access flags with the correct optional range

Message ID 20200129071803.40117-1-galpress@amazon.com (mailing list archive)
State Mainlined
Commit ba19e16651a5c67fa8b53ce4fb5bfbab8d326b6c
Delegated to: Jason Gunthorpe
Headers show
Series [for-next] RDMA/efa: Mask access flags with the correct optional range | expand

Commit Message

Gal Pressman Jan. 29, 2020, 7:18 a.m. UTC
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")
Signed-off-by: Gal Pressman <galpress@amazon.com>
---
 drivers/infiniband/hw/efa/efa_verbs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jason Gunthorpe Jan. 29, 2020, 8:49 p.m. UTC | #1
On Wed, Jan 29, 2020 at 09:18:03AM +0200, Gal Pressman wrote:
> 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")
> Signed-off-by: Gal Pressman <galpress@amazon.com>
> ---
>  drivers/infiniband/hw/efa/efa_verbs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied to for-next, thanks

Jason
diff mbox series

Patch

diff --git a/drivers/infiniband/hw/efa/efa_verbs.c b/drivers/infiniband/hw/efa/efa_verbs.c
index a556572058ff..68798b66b84e 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",