diff options
author | Marcel Apfelbaum <marcela@dev.mellanox.co.il> | 2012-01-19 13:45:31 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-01-23 00:08:44 +0400 |
commit | 9fd7a1e147bd41fb999a58da8a8826b9f3415384 (patch) | |
tree | 657babf7c45990ec73afa6c6aba6986a79da1286 /drivers/net/ethernet/mellanox/mlx4/profile.c | |
parent | eb41049f2f5eee1525fe1c699e6b1f03c8c51532 (diff) | |
download | linux-9fd7a1e147bd41fb999a58da8a8826b9f3415384.tar.xz |
mlx4_core: Fix mtt profile issue
Num mtts from profile is really the number of mtt segments.
Thus, in make profile, to get the proper number of MTT entries,
must multiply num_mtts by mtts per segment.
Signed-off-by: Marcel Apfelbaum <marcela@dev.mellanox.co.il>
Reviewed-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/profile.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/profile.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/profile.c b/drivers/net/ethernet/mellanox/mlx4/profile.c index 66f91ca7a7c6..1129677daa62 100644 --- a/drivers/net/ethernet/mellanox/mlx4/profile.c +++ b/drivers/net/ethernet/mellanox/mlx4/profile.c @@ -110,7 +110,7 @@ u64 mlx4_make_profile(struct mlx4_dev *dev, profile[MLX4_RES_EQ].num = 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; + profile[MLX4_RES_MTT].num = request->num_mtt * (1 << log_mtts_per_seg); profile[MLX4_RES_MCG].num = request->num_mcg; for (i = 0; i < MLX4_RES_NUM; ++i) { |