summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorHuy Nguyen <huyn@mellanox.com>2017-07-13 21:45:11 +0300
committerSaeed Mahameed <saeedm@mellanox.com>2017-08-30 21:20:42 +0300
commit33c52b6718d2a6cb414440c98560818910d896dc (patch)
tree460979e6104120a046515b4c06147ceffdccb214 /drivers
parent183db481279437590f75a8a0479d512e5dd597de (diff)
downloadlinux-33c52b6718d2a6cb414440c98560818910d896dc.tar.xz
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: e207b7e99176 ("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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c b/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
index 2eb54d36e16e..810b51029c7f 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c
@@ -754,6 +754,9 @@ void mlx5e_dcbnl_initialize(struct mlx5e_priv *priv)
{
struct mlx5e_dcbx *dcbx = &priv->dcbx;
+ if (!MLX5_CAP_GEN(priv->mdev, qos))
+ return;
+
if (MLX5_CAP_GEN(priv->mdev, dcbx))
mlx5e_dcbnl_query_dcbx_mode(priv, &dcbx->mode);