From: Ivan Vecera Date: Mon, 8 Sep 2014 16:46:53 +0000 (+0200) Subject: net/mlx4_en: do not ignore autoneg in mlx4_en_set_pauseparam() X-Git-Tag: firefly_0821_release~176^2~3193^2~47 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=278d436a476f69fc95d5c82bf61b6c2d02f4d44e;p=firefly-linux-kernel-4.4.55.git 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 Signed-off-by: Ivan Vecera Signed-off-by: David S. Miller --- 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,