summaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorGal Pressman <galp@mellanox.com>2016-06-27 11:08:35 +0200
committerDavid S. Miller <davem@davemloft.net>2016-06-29 10:28:46 +0200
commitfd4782c21359cfd52af4c3180a2bb6bad55c1eba (patch)
tree5e3f82eb988ee5bc7e863c997923c26753e18e33 /drivers/net
parentnet/mlx5e: Change enum to better reflect usage (diff)
downloadlinux-fd4782c21359cfd52af4c3180a2bb6bad55c1eba.tar.xz
linux-fd4782c21359cfd52af4c3180a2bb6bad55c1eba.zip
net/mlx5e: Check for BlueFlame capability before allocating SQ uar
Previous to this patch mapping was always set to write combining without checking whether BlueFlame is supported in the device. Fixes: 0ba422410bbf ('net/mlx5: Fix global UAR mapping') Signed-off-by: Gal Pressman <galp@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index 4383f8c737e5..793d7a1f92b5 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -580,7 +580,7 @@ static int mlx5e_create_sq(struct mlx5e_channel *c,
void *sqc_wq = MLX5_ADDR_OF(sqc, sqc, wq);
int err;
- err = mlx5_alloc_map_uar(mdev, &sq->uar, true);
+ err = mlx5_alloc_map_uar(mdev, &sq->uar, !!MLX5_CAP_GEN(mdev, bf));
if (err)
return err;