net/mlx5e: Check for qos capability in dcbnl_initialize

qos capability is the master capability bit that determines
if the DCBX is supported for the PCI function. If this bit is off,
driver cannot run any dcbx code.

Fixes: e207b7e991 ("net/mlx5e: ConnectX-4 firmware support for DCBX")
Signed-off-by: Huy Nguyen <huyn@mellanox.com>
Reviewed-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
This commit is contained in:
Huy Nguyen 2017-07-13 13:45:11 -05:00 committed by Saeed Mahameed
parent 183db48127
commit 33c52b6718
1 changed files with 3 additions and 0 deletions

View File

@ -754,6 +754,9 @@ void mlx5e_dcbnl_initialize(struct mlx5e_priv *priv)
{ {
struct mlx5e_dcbx *dcbx = &priv->dcbx; struct mlx5e_dcbx *dcbx = &priv->dcbx;
if (!MLX5_CAP_GEN(priv->mdev, qos))
return;
if (MLX5_CAP_GEN(priv->mdev, dcbx)) if (MLX5_CAP_GEN(priv->mdev, dcbx))
mlx5e_dcbnl_query_dcbx_mode(priv, &dcbx->mode); mlx5e_dcbnl_query_dcbx_mode(priv, &dcbx->mode);