diff options
Diffstat (limited to 'drivers/net/mlx4/mr.c')
-rw-r--r-- | drivers/net/mlx4/mr.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/mlx4/mr.c b/drivers/net/mlx4/mr.c index 62071d9c4a55..d1dd5b48dbd1 100644 --- a/drivers/net/mlx4/mr.c +++ b/drivers/net/mlx4/mr.c | |||
@@ -67,11 +67,10 @@ struct mlx4_mpt_entry { | |||
67 | #define MLX4_MPT_FLAG_PHYSICAL (1 << 9) | 67 | #define MLX4_MPT_FLAG_PHYSICAL (1 << 9) |
68 | #define MLX4_MPT_FLAG_REGION (1 << 8) | 68 | #define MLX4_MPT_FLAG_REGION (1 << 8) |
69 | 69 | ||
70 | #define MLX4_MPT_PD_FLAG_FAST_REG (1 << 26) | 70 | #define MLX4_MPT_PD_FLAG_FAST_REG (1 << 27) |
71 | #define MLX4_MPT_PD_FLAG_RAE (1 << 28) | ||
71 | #define MLX4_MPT_PD_FLAG_EN_INV (3 << 24) | 72 | #define MLX4_MPT_PD_FLAG_EN_INV (3 << 24) |
72 | 73 | ||
73 | #define MLX4_MTT_FLAG_PRESENT 1 | ||
74 | |||
75 | #define MLX4_MPT_STATUS_SW 0xF0 | 74 | #define MLX4_MPT_STATUS_SW 0xF0 |
76 | #define MLX4_MPT_STATUS_HW 0x00 | 75 | #define MLX4_MPT_STATUS_HW 0x00 |
77 | 76 | ||
@@ -348,7 +347,10 @@ int mlx4_mr_enable(struct mlx4_dev *dev, struct mlx4_mr *mr) | |||
348 | if (mr->mtt.order >= 0 && mr->mtt.page_shift == 0) { | 347 | if (mr->mtt.order >= 0 && mr->mtt.page_shift == 0) { |
349 | /* fast register MR in free state */ | 348 | /* fast register MR in free state */ |
350 | mpt_entry->flags |= cpu_to_be32(MLX4_MPT_FLAG_FREE); | 349 | mpt_entry->flags |= cpu_to_be32(MLX4_MPT_FLAG_FREE); |
351 | mpt_entry->pd_flags |= cpu_to_be32(MLX4_MPT_PD_FLAG_FAST_REG); | 350 | mpt_entry->pd_flags |= cpu_to_be32(MLX4_MPT_PD_FLAG_FAST_REG | |
351 | MLX4_MPT_PD_FLAG_RAE); | ||
352 | mpt_entry->mtt_sz = cpu_to_be32((1 << mr->mtt.order) * | ||
353 | MLX4_MTT_ENTRY_PER_SEG); | ||
352 | } else { | 354 | } else { |
353 | mpt_entry->flags |= cpu_to_be32(MLX4_MPT_FLAG_SW_OWNS); | 355 | mpt_entry->flags |= cpu_to_be32(MLX4_MPT_FLAG_SW_OWNS); |
354 | } | 356 | } |