Skip to contentSkip to conversation

net/mlx4_en: do not ignore autoneg in mlx4_en_set_pauseparam()

PATCH Applied Ivan Vecera 2 participants 2 messages Sep 8, 2014

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/net/ethernet/mellanox/mlx4/en_ethtool.c +3 -0
index e22f24f..35ff292 100644
@@ -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,
Signature · 1 line
1.8.5.5