Skip to content

Commit

Permalink
net/mlx4_en: do not ignore autoneg in mlx4_en_set_pauseparam()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ivan Vecera authored and David S. Miller committed Sep 8, 2014
1 parent 208f7ca commit 278d436
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 278d436

Please sign in to comment.