aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx4/profile.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/profile.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/profile.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/profile.c b/drivers/net/ethernet/mellanox/mlx4/profile.c
index 14089d9e1667..2bf437aafc53 100644
--- a/drivers/net/ethernet/mellanox/mlx4/profile.c
+++ b/drivers/net/ethernet/mellanox/mlx4/profile.c
@@ -126,8 +126,7 @@ u64 mlx4_make_profile(struct mlx4_dev *dev,
126 profile[MLX4_RES_AUXC].num = request->num_qp; 126 profile[MLX4_RES_AUXC].num = request->num_qp;
127 profile[MLX4_RES_SRQ].num = request->num_srq; 127 profile[MLX4_RES_SRQ].num = request->num_srq;
128 profile[MLX4_RES_CQ].num = request->num_cq; 128 profile[MLX4_RES_CQ].num = request->num_cq;
129 profile[MLX4_RES_EQ].num = mlx4_is_mfunc(dev) ? 129 profile[MLX4_RES_EQ].num = mlx4_is_mfunc(dev) ? dev->phys_caps.num_phys_eqs :
130 dev->phys_caps.num_phys_eqs :
131 min_t(unsigned, dev_cap->max_eqs, MAX_MSIX); 130 min_t(unsigned, dev_cap->max_eqs, MAX_MSIX);
132 profile[MLX4_RES_DMPT].num = request->num_mpt; 131 profile[MLX4_RES_DMPT].num = request->num_mpt;
133 profile[MLX4_RES_CMPT].num = MLX4_NUM_CMPTS; 132 profile[MLX4_RES_CMPT].num = MLX4_NUM_CMPTS;
@@ -216,10 +215,18 @@ u64 mlx4_make_profile(struct mlx4_dev *dev,
216 init_hca->log_num_cqs = profile[i].log_num; 215 init_hca->log_num_cqs = profile[i].log_num;
217 break; 216 break;
218 case MLX4_RES_EQ: 217 case MLX4_RES_EQ:
219 dev->caps.num_eqs = roundup_pow_of_two(min_t(unsigned, dev_cap->max_eqs, 218 if (dev_cap->flags2 & MLX4_DEV_CAP_FLAG2_SYS_EQS) {
220 MAX_MSIX)); 219 init_hca->log_num_eqs = 0x1f;
221 init_hca->eqc_base = profile[i].start; 220 init_hca->eqc_base = profile[i].start;
222 init_hca->log_num_eqs = ilog2(dev->caps.num_eqs); 221 init_hca->num_sys_eqs = dev_cap->num_sys_eqs;
222 } else {
223 dev->caps.num_eqs = roundup_pow_of_two(
224 min_t(unsigned,
225 dev_cap->max_eqs,
226 MAX_MSIX));
227 init_hca->eqc_base = profile[i].start;
228 init_hca->log_num_eqs = ilog2(dev->caps.num_eqs);
229 }
223 break; 230 break;
224 case MLX4_RES_DMPT: 231 case MLX4_RES_DMPT:
225 dev->caps.num_mpts = profile[i].num; 232 dev->caps.num_mpts = profile[i].num;