projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
net/mlx4_core: Fix number of EQs used in ICM initialisation
[firefly-linux-kernel-4.4.55.git]
/
drivers
/
net
/
ethernet
/
mellanox
/
mlx4
/
profile.c
diff --git
a/drivers/net/ethernet/mellanox/mlx4/profile.c
b/drivers/net/ethernet/mellanox/mlx4/profile.c
index 06e5adeb76f71840d7a34f2221c607dfcefcb723..b83bc928d52a9fa1bfc2f78957b5699979af6db5 100644
(file)
--- a/
drivers/net/ethernet/mellanox/mlx4/profile.c
+++ b/
drivers/net/ethernet/mellanox/mlx4/profile.c
@@
-126,7
+126,9
@@
u64 mlx4_make_profile(struct mlx4_dev *dev,
profile[MLX4_RES_AUXC].num = request->num_qp;
profile[MLX4_RES_SRQ].num = request->num_srq;
profile[MLX4_RES_CQ].num = request->num_cq;
profile[MLX4_RES_AUXC].num = request->num_qp;
profile[MLX4_RES_SRQ].num = request->num_srq;
profile[MLX4_RES_CQ].num = request->num_cq;
- profile[MLX4_RES_EQ].num = min_t(unsigned, dev_cap->max_eqs, MAX_MSIX);
+ profile[MLX4_RES_EQ].num = mlx4_is_mfunc(dev) ?
+ dev->phys_caps.num_phys_eqs :
+ min_t(unsigned, dev_cap->max_eqs, MAX_MSIX);
profile[MLX4_RES_DMPT].num = request->num_mpt;
profile[MLX4_RES_CMPT].num = MLX4_NUM_CMPTS;
profile[MLX4_RES_MTT].num = request->num_mtt * (1 << log_mtts_per_seg);
profile[MLX4_RES_DMPT].num = request->num_mpt;
profile[MLX4_RES_CMPT].num = MLX4_NUM_CMPTS;
profile[MLX4_RES_MTT].num = request->num_mtt * (1 << log_mtts_per_seg);
@@
-215,9
+217,10
@@
u64 mlx4_make_profile(struct mlx4_dev *dev,
init_hca->log_num_cqs = profile[i].log_num;
break;
case MLX4_RES_EQ:
init_hca->log_num_cqs = profile[i].log_num;
break;
case MLX4_RES_EQ:
- dev->caps.num_eqs = profile[i].num;
+ dev->caps.num_eqs = roundup_pow_of_two(min_t(unsigned, dev_cap->max_eqs,
+ MAX_MSIX));
init_hca->eqc_base = profile[i].start;
init_hca->eqc_base = profile[i].start;
- init_hca->log_num_eqs =
profile[i].log_num
;
+ init_hca->log_num_eqs =
ilog2(dev->caps.num_eqs)
;
break;
case MLX4_RES_DMPT:
dev->caps.num_mpts = profile[i].num;
break;
case MLX4_RES_DMPT:
dev->caps.num_mpts = profile[i].num;