Skip to content

Commit

Permalink
net/mlx5: Activate support for 4K UARs
Browse files Browse the repository at this point in the history
Activate 4K UAR support for firmware versions that support it.

Signed-off-by: Eli Cohen <eli@mellanox.com>
Reviewed-by: Matan Barak <matanb@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
  • Loading branch information
Eli Cohen authored and Saeed Mahameed committed Jan 9, 2017
1 parent 30aa60b commit f502d83
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/net/ethernet/mellanox/mlx5/core/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,10 @@ static int handle_hca_cap(struct mlx5_core_dev *dev)
/* disable cmdif checksum */
MLX5_SET(cmd_hca_cap, set_hca_cap, cmdif_checksum, 0);

/* If the HCA supports 4K UARs use it */
if (MLX5_CAP_GEN_MAX(dev, uar_4k))
MLX5_SET(cmd_hca_cap, set_hca_cap, uar_4k, 1);

MLX5_SET(cmd_hca_cap, set_hca_cap, log_uar_page_sz, PAGE_SHIFT - 12);

err = set_caps(dev, set_ctx, set_sz,
Expand Down

0 comments on commit f502d83

Please sign in to comment.