diff options
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/profile.c')
| -rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/profile.c | 9 | 
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/profile.c b/drivers/net/ethernet/mellanox/mlx4/profile.c index b967647d0c7..66f91ca7a7c 100644 --- a/drivers/net/ethernet/mellanox/mlx4/profile.c +++ b/drivers/net/ethernet/mellanox/mlx4/profile.c @@ -98,8 +98,8 @@ u64 mlx4_make_profile(struct mlx4_dev *dev,  	profile[MLX4_RES_EQ].size     = dev_cap->eqc_entry_sz;  	profile[MLX4_RES_DMPT].size   = dev_cap->dmpt_entry_sz;  	profile[MLX4_RES_CMPT].size   = dev_cap->cmpt_entry_sz; -	profile[MLX4_RES_MTT].size    = dev->caps.mtts_per_seg * dev_cap->mtt_entry_sz; -	profile[MLX4_RES_MCG].size    = MLX4_MGM_ENTRY_SIZE; +	profile[MLX4_RES_MTT].size    = dev_cap->mtt_entry_sz; +	profile[MLX4_RES_MCG].size    = mlx4_get_mgm_entry_size(dev);  	profile[MLX4_RES_QP].num      = request->num_qp;  	profile[MLX4_RES_RDMARC].num  = request->num_qp * request->rdmarc_per_qp; @@ -210,7 +210,7 @@ u64 mlx4_make_profile(struct mlx4_dev *dev,  			init_hca->cmpt_base	 = profile[i].start;  			break;  		case MLX4_RES_MTT: -			dev->caps.num_mtt_segs	 = profile[i].num; +			dev->caps.num_mtts	 = profile[i].num;  			priv->mr_table.mtt_base	 = profile[i].start;  			init_hca->mtt_base	 = profile[i].start;  			break; @@ -218,7 +218,8 @@ u64 mlx4_make_profile(struct mlx4_dev *dev,  			dev->caps.num_mgms	  = profile[i].num >> 1;  			dev->caps.num_amgms	  = profile[i].num >> 1;  			init_hca->mc_base	  = profile[i].start; -			init_hca->log_mc_entry_sz = ilog2(MLX4_MGM_ENTRY_SIZE); +			init_hca->log_mc_entry_sz = +					ilog2(mlx4_get_mgm_entry_size(dev));  			init_hca->log_mc_table_sz = profile[i].log_num;  			init_hca->log_mc_hash_sz  = profile[i].log_num - 1;  			break;  |