]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
net/mlx5e: Check for qos capability in dcbnl_initialize
authorHuy Nguyen <huyn@mellanox.com>
Thu, 13 Jul 2017 18:45:11 +0000 (13:45 -0500)
committerSaeed Mahameed <saeedm@mellanox.com>
Wed, 30 Aug 2017 18:20:42 +0000 (21:20 +0300)
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>
drivers/net/ethernet/mellanox/mlx5/core/en_dcbnl.c

index 2eb54d36e16eac77e3a9d0387758d66b51584bd3..810b51029c7f5cd1e8d2e5abcb9eee7b563da8c8 100644 (file)
@@ -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);