summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHuy Nguyen <huyn@mellanox.com>2019-08-01 11:10:19 -0500
committerSaeed Mahameed <saeedm@mellanox.com>2019-08-08 13:01:18 -0700
commit466df6eb4a9e813b3cfc674363316450c57a89c5 (patch)
tree6e5f4488d8fa6945df2b8e3e6a7ab362c1761512
parent93b3586e070b14704dd7bff81fbcefd64663f3c2 (diff)
net/mlx5e: Only support tx/rx pause setting for port owner
Only support changing tx/rx pause frame setting if the net device is the vport group manager. Fixes: 3c2d18ef22df ("net/mlx5e: Support ethtool get/set_pauseparam") Signed-off-by: Huy Nguyen <huyn@mellanox.com> Reviewed-by: Parav Pandit <parav@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
index 03bed714bac3..ee9fa0c2c8b9 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
@@ -1338,6 +1338,9 @@ int mlx5e_ethtool_set_pauseparam(struct mlx5e_priv *priv,
struct mlx5_core_dev *mdev = priv->mdev;
int err;
+ if (!MLX5_CAP_GEN(mdev, vport_group_manager))
+ return -EOPNOTSUPP;
+
if (pauseparam->autoneg)
return -EINVAL;