diff options
-rw-r--r-- | drivers/infiniband/hw/mlx5/qp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/mlx5/qp.c b/drivers/infiniband/hw/mlx5/qp.c index a029009323ec..1dbadbfc4474 100644 --- a/drivers/infiniband/hw/mlx5/qp.c +++ b/drivers/infiniband/hw/mlx5/qp.c | |||
@@ -1832,7 +1832,7 @@ static u8 get_umr_flags(int acc) | |||
1832 | (acc & IB_ACCESS_REMOTE_WRITE ? MLX5_PERM_REMOTE_WRITE : 0) | | 1832 | (acc & IB_ACCESS_REMOTE_WRITE ? MLX5_PERM_REMOTE_WRITE : 0) | |
1833 | (acc & IB_ACCESS_REMOTE_READ ? MLX5_PERM_REMOTE_READ : 0) | | 1833 | (acc & IB_ACCESS_REMOTE_READ ? MLX5_PERM_REMOTE_READ : 0) | |
1834 | (acc & IB_ACCESS_LOCAL_WRITE ? MLX5_PERM_LOCAL_WRITE : 0) | | 1834 | (acc & IB_ACCESS_LOCAL_WRITE ? MLX5_PERM_LOCAL_WRITE : 0) | |
1835 | MLX5_PERM_LOCAL_READ | MLX5_PERM_UMR_EN | MLX5_ACCESS_MODE_MTT; | 1835 | MLX5_PERM_LOCAL_READ | MLX5_PERM_UMR_EN; |
1836 | } | 1836 | } |
1837 | 1837 | ||
1838 | static void set_mkey_segment(struct mlx5_mkey_seg *seg, struct ib_send_wr *wr, | 1838 | static void set_mkey_segment(struct mlx5_mkey_seg *seg, struct ib_send_wr *wr, |
@@ -1844,7 +1844,8 @@ static void set_mkey_segment(struct mlx5_mkey_seg *seg, struct ib_send_wr *wr, | |||
1844 | return; | 1844 | return; |
1845 | } | 1845 | } |
1846 | 1846 | ||
1847 | seg->flags = get_umr_flags(wr->wr.fast_reg.access_flags); | 1847 | seg->flags = get_umr_flags(wr->wr.fast_reg.access_flags) | |
1848 | MLX5_ACCESS_MODE_MTT; | ||
1848 | *writ = seg->flags & (MLX5_PERM_LOCAL_WRITE | IB_ACCESS_REMOTE_WRITE); | 1849 | *writ = seg->flags & (MLX5_PERM_LOCAL_WRITE | IB_ACCESS_REMOTE_WRITE); |
1849 | seg->qpn_mkey7_0 = cpu_to_be32((wr->wr.fast_reg.rkey & 0xff) | 0xffffff00); | 1850 | seg->qpn_mkey7_0 = cpu_to_be32((wr->wr.fast_reg.rkey & 0xff) | 0xffffff00); |
1850 | seg->flags_pd = cpu_to_be32(MLX5_MKEY_REMOTE_INVAL); | 1851 | seg->flags_pd = cpu_to_be32(MLX5_MKEY_REMOTE_INVAL); |