diff options
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/profile.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/profile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/profile.c b/drivers/net/ethernet/mellanox/mlx4/profile.c index 9ee4725363d5..8e0c3cc2a1ec 100644 --- a/drivers/net/ethernet/mellanox/mlx4/profile.c +++ b/drivers/net/ethernet/mellanox/mlx4/profile.c | |||
@@ -76,7 +76,7 @@ u64 mlx4_make_profile(struct mlx4_dev *dev, | |||
76 | u64 size; | 76 | u64 size; |
77 | u64 start; | 77 | u64 start; |
78 | int type; | 78 | int type; |
79 | int num; | 79 | u32 num; |
80 | int log_num; | 80 | int log_num; |
81 | }; | 81 | }; |
82 | 82 | ||
@@ -105,7 +105,7 @@ u64 mlx4_make_profile(struct mlx4_dev *dev, | |||
105 | si_meminfo(&si); | 105 | si_meminfo(&si); |
106 | request->num_mtt = | 106 | request->num_mtt = |
107 | roundup_pow_of_two(max_t(unsigned, request->num_mtt, | 107 | roundup_pow_of_two(max_t(unsigned, request->num_mtt, |
108 | min(1UL << 31, | 108 | min(1UL << (31 - log_mtts_per_seg), |
109 | si.totalram >> (log_mtts_per_seg - 1)))); | 109 | si.totalram >> (log_mtts_per_seg - 1)))); |
110 | 110 | ||
111 | profile[MLX4_RES_QP].size = dev_cap->qpc_entry_sz; | 111 | profile[MLX4_RES_QP].size = dev_cap->qpc_entry_sz; |