From: Ivan Vecera <ivecera@redhat.com>
To: netdev@vger.kernel.org
Cc: Amir Vadai <amirv@mellanox.com>
Subject: [PATCH net] net/mlx4_en: do not ignore autoneg in mlx4_en_set_pauseparam()
Date: Mon,  8 Sep 2014 18:46:53 +0200	[thread overview]
Message-ID: <1410194813-994-1-git-send-email-ivecera@redhat.com> (raw)
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>
---
 drivers/net/ethernet/mellanox/mlx4/en_ethtool.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx4/en_ethtool.c
index e22f24f..35ff292 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,
-- 
1.8.5.5
next             reply	other threads:[~2014-09-08 16:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-08 16:46 Ivan Vecera [this message]
2014-09-08 22:57 ` [PATCH net] net/mlx4_en: do not ignore autoneg in mlx4_en_set_pauseparam() David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox
  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):
  git send-email \
    --in-reply-to=1410194813-994-1-git-send-email-ivecera@redhat.com \
    --to=ivecera@redhat.com \
    --cc=amirv@mellanox.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY
  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
  Be sure your reply has a Subject: header at the top and a blank line
  before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).