From: Alex Vesker Date: Thu, 3 Sep 2020 07:38:56 +0000 (+0300) Subject: RDMA/mlx5: Allow DM allocation for sw_owner_v2 enabled devices X-Git-Tag: v5.15~2640^2~74^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8310e327046df6b8d729ffa41ed7cfd6676abc42;p=platform%2Fkernel%2Flinux-starfive.git RDMA/mlx5: Allow DM allocation for sw_owner_v2 enabled devices sw_owner_v2 will replace sw_owner for future devices, this means that if sw_owner_v2 is set sw_owner should be ignored and DM allocation is required for sw_owner_v2 devices to function. Link: https://lore.kernel.org/r/20200903073857.1129166-3-leon@kernel.org Signed-off-by: Alex Vesker Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe --- diff --git a/drivers/infiniband/hw/mlx5/main.c b/drivers/infiniband/hw/mlx5/main.c index 2dbacf0..707c51c 100644 --- a/drivers/infiniband/hw/mlx5/main.c +++ b/drivers/infiniband/hw/mlx5/main.c @@ -2347,7 +2347,9 @@ static inline int check_dm_type_support(struct mlx5_ib_dev *dev, return -EPERM; if (!(MLX5_CAP_FLOWTABLE_NIC_RX(dev->mdev, sw_owner) || - MLX5_CAP_FLOWTABLE_NIC_TX(dev->mdev, sw_owner))) + MLX5_CAP_FLOWTABLE_NIC_TX(dev->mdev, sw_owner) || + MLX5_CAP_FLOWTABLE_NIC_RX(dev->mdev, sw_owner_v2) || + MLX5_CAP_FLOWTABLE_NIC_TX(dev->mdev, sw_owner_v2))) return -EOPNOTSUPP; break; }