mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 02:21:52 +09:00
net/mlx5e: Only support tx/rx pause setting for port owner
[ Upstream commit466df6eb4a] Only support changing tx/rx pause frame setting if the net device is the vport group manager. Fixes:3c2d18ef22("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
e7a327b743
commit
dfb4320e79
@@ -1400,6 +1400,9 @@ static int mlx5e_set_pauseparam(struct net_device *netdev,
|
||||
struct mlx5_core_dev *mdev = priv->mdev;
|
||||
int err;
|
||||
|
||||
if (!MLX5_CAP_GEN(mdev, vport_group_manager))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
if (pauseparam->autoneg)
|
||||
return -EINVAL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user