diff options
author | Ivan Vecera <ivecera@redhat.com> | 2014-09-08 20:46:53 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-09-09 02:54:26 +0400 |
commit | 278d436a476f69fc95d5c82bf61b6c2d02f4d44e (patch) | |
tree | 1ff1e5915ff4f8c8b4e366ed0867e5193ed94287 /drivers/net/ethernet | |
parent | 208f7ca4d4a6886256763c9c073775c5fdaf47eb (diff) | |
download | linux-278d436a476f69fc95d5c82bf61b6c2d02f4d44e.tar.xz |
net/mlx4_en: do not ignore autoneg in mlx4_en_set_pauseparam()
The driver does not support pause autonegotiation so it should return
-EINVAL when the function is called with non-zero autoneg.
Cc: Amir Vadai <amirv@mellanox.com>
Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c index e22f24f784fc..35ff2925110a 100644 --- a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c +++ b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c @@ -487,6 +487,9 @@ static int mlx4_en_set_pauseparam(struct net_device *dev, struct mlx4_en_dev *mdev = priv->mdev; int err; + if (pause->autoneg) + return -EINVAL; + priv->prof->tx_pause = pause->tx_pause != 0; priv->prof->rx_pause = pause->rx_pause != 0; err = mlx4_SET_PORT_general(mdev->dev, priv->port, |