From: Saeed Mahameed <saeedm@mellanox.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, Gal Pressman <galp@mellanox.com>,
kernel-team@fb.com, Saeed Mahameed <saeedm@mellanox.com>
Subject: [net 3/6] net/mlx5e: Fix ethtool pause support and advertise reporting
Date: Fri, 12 May 2017 14:56:47 +0300 [thread overview]
Message-ID: <20170512115650.11635-4-saeedm@mellanox.com> (raw)
In-Reply-To: <20170512115650.11635-1-saeedm@mellanox.com>
From: Gal Pressman <galp@mellanox.com>
Pause bit should set when RX pause is on, not TX pause.
Also, setting Asym_Pause is incorrect, and should be turned off.
Fixes: 665bc53969d7 ("net/mlx5e: Use new ethtool get/set link ksettings API")
Signed-off-by: Gal Pressman <galp@mellanox.com>
Cc: kernel-team@fb.com
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
index 87a7a66363de..e235ff9a00c8 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c
@@ -800,7 +800,6 @@ static void get_supported(u32 eth_proto_cap,
ptys2ethtool_supported_port(link_ksettings, eth_proto_cap);
ptys2ethtool_supported_link(supported, eth_proto_cap);
ethtool_link_ksettings_add_link_mode(link_ksettings, supported, Pause);
- ethtool_link_ksettings_add_link_mode(link_ksettings, supported, Asym_Pause);
}
static void get_advertising(u32 eth_proto_cap, u8 tx_pause,
@@ -810,7 +809,7 @@ static void get_advertising(u32 eth_proto_cap, u8 tx_pause,
unsigned long *advertising = link_ksettings->link_modes.advertising;
ptys2ethtool_adver_link(advertising, eth_proto_cap);
- if (tx_pause)
+ if (rx_pause)
ethtool_link_ksettings_add_link_mode(link_ksettings, advertising, Pause);
if (tx_pause ^ rx_pause)
ethtool_link_ksettings_add_link_mode(link_ksettings, advertising, Asym_Pause);
--
2.11.0
next prev parent reply other threads:[~2017-05-12 12:02 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-12 11:56 [pull request][net 0/6] Mellanox, mlx5 fixes 2017-05-12 Saeed Mahameed
2017-05-12 11:56 ` [net 1/6] net/mlx5e: Use a spinlock to synchronize statistics Saeed Mahameed
2017-05-12 16:13 ` David Miller
2017-05-14 8:52 ` Saeed Mahameed
2017-05-15 18:39 ` David Miller
2017-05-15 22:51 ` Stephen Hemminger
2017-05-12 11:56 ` [net 2/6] net/mlx5e: Use the correct pause values for ethtool advertising Saeed Mahameed
2017-05-12 11:56 ` Saeed Mahameed [this message]
2017-05-12 11:56 ` [net 4/6] net/mlx5e: Fix setup TC ndo Saeed Mahameed
2017-05-12 11:56 ` [net 5/6] net/mlx5e: IPoIB, Only support regular RQ for now Saeed Mahameed
2017-05-12 11:56 ` [net 6/6] net/mlx5: Use underlay QPN from the root name space Saeed Mahameed
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=20170512115650.11635-4-saeedm@mellanox.com \
--to=saeedm@mellanox.com \
--cc=davem@davemloft.net \
--cc=galp@mellanox.com \
--cc=kernel-team@fb.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.