[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <lsq.1527677562.697497168@decadent.org.uk>
Date: Wed, 30 May 2018 11:52:42 +0100
From: Ben Hutchings <ben@...adent.org.uk>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
CC: akpm@...ux-foundation.org, "Ivan Vecera" <ivecera@...hat.com>,
"David S. Miller" <davem@...emloft.net>,
"Amir Vadai" <amirv@...lanox.com>
Subject: [PATCH 3.2 149/153] net/mlx4_en: do not ignore autoneg in
mlx4_en_set_pauseparam()
3.2.102-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Ivan Vecera <ivecera@...hat.com>
commit 278d436a476f69fc95d5c82bf61b6c2d02f4d44e upstream.
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@...lanox.com>
Signed-off-by: Ivan Vecera <ivecera@...hat.com>
Signed-off-by: David S. Miller <davem@...emloft.net>
Signed-off-by: Ben Hutchings <ben@...adent.org.uk>
---
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
+++ b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
@@ -364,6 +364,9 @@ static int mlx4_en_set_pauseparam(struct
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,
Powered by blists - more mailing lists