]> git.dujemihanovic.xyz Git - linux.git/commitdiff
RDMA/mana_ib: Ignore optional access flags for MRs
authorKonstantin Taranov <kotaranov@microsoft.com>
Wed, 5 Jun 2024 08:16:08 +0000 (01:16 -0700)
committerJason Gunthorpe <jgg@nvidia.com>
Fri, 21 Jun 2024 13:19:36 +0000 (10:19 -0300)
Ignore optional ib_access_flags when an MR is created.

Fixes: 0266a177631d ("RDMA/mana_ib: Add a driver for Microsoft Azure Network Adapter")
Signed-off-by: Konstantin Taranov <kotaranov@microsoft.com>
Link: https://lore.kernel.org/r/1717575368-14879-1-git-send-email-kotaranov@linux.microsoft.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
drivers/infiniband/hw/mana/mr.c

index 4f13423ecdbdf1af6a55f2e7372f2925e56234e1..887b09dd86e7843e08ab7242a8fb862066164b39 100644 (file)
@@ -112,6 +112,7 @@ struct ib_mr *mana_ib_reg_user_mr(struct ib_pd *ibpd, u64 start, u64 length,
                  "start 0x%llx, iova 0x%llx length 0x%llx access_flags 0x%x",
                  start, iova, length, access_flags);
 
+       access_flags &= ~IB_ACCESS_OPTIONAL;
        if (access_flags & ~VALID_MR_FLAGS)
                return ERR_PTR(-EINVAL);