net/mlx5: Fix query E-Switch capabilities
authorSaeed Mahameed <saeedm@mellanox.com>
Thu, 10 Dec 2015 15:12:37 +0000 (17:12 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 12 Dec 2015 05:15:23 +0000 (00:15 -0500)
E-Switch capabilities should be queried only if E-Switch flow table
is supported and not only when vport group manager.

Fixes: d6666753c6e8 ("net/mlx5: E-Switch, Introduce HCA cap and E-Switch vport context")
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/fw.c

index 1c9f9a54a87339c89779973bb128a7ecfb9bf632..aa1ab47023852dcf0b163e43e57629121ab71a3a 100644 (file)
@@ -173,7 +173,7 @@ int mlx5_query_hca_caps(struct mlx5_core_dev *dev)
                        return err;
        }
 
-       if (MLX5_CAP_GEN(dev, vport_group_manager)) {
+       if (MLX5_CAP_GEN(dev, eswitch_flow_table)) {
                err = mlx5_core_get_caps(dev, MLX5_CAP_ESWITCH,
                                         HCA_CAP_OPMOD_GET_CUR);
                if (err)