From: Esa-Pekka Pyokkimies <esa-pekka.pyokkimies@stonesoft.com>
To: <netdev@vger.kernel.org>
Subject: [PATCH] ixgbe: Report PAUSE flags to ethtool
Date: Wed, 8 Jun 2011 09:33:19 +0300 [thread overview]
Message-ID: <op.vwqu5trx6ywr33@esapekka-pc.rad1> (raw)
In-Reply-To: <op.vwnklt0q6ywr33@esapekka-pc.rad1>
Hello!
I noticed that ixgbe driver doesn't report SUPPORTED_Pause and
ADVERTISED_Pause flags to ethtool. This means that ethtool
always reports:
Supported pause frame use: No
Advertised pause frame use: No
I added reporting for capabilities and advertising.
I tested it with our ixgbe card and latest ethtool
from git repo. I also need to add capability to
change advertising parameters with "ethtool -s advertise %x",
but will send in a different patch if this patch looks ok.
Signed-off-by: Esa-Pekka Pyokkimies <esa-pekka.pyokkimies@stonesoft.com>
---
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c
b/drivers/net/ixgbe/ixgbe_ethtool.c
index cb1555b..6005116 100644
--- a/drivers/net/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ixgbe/ixgbe_ethtool.c
@@ -150,6 +150,7 @@ static int ixgbe_get_settings(struct net_device
*netdev,
bool link_up;
ecmd->supported = SUPPORTED_10000baseT_Full;
+ ecmd->supported |= SUPPORTED_Pause;
ecmd->autoneg = AUTONEG_ENABLE;
ecmd->transceiver = XCVR_EXTERNAL;
if ((hw->phy.media_type == ixgbe_media_type_copper) ||
@@ -231,6 +232,21 @@ static int ixgbe_get_settings(struct net_device
*netdev,
ecmd->autoneg = AUTONEG_DISABLE;
}
+ if (hw->fc.current_mode == ixgbe_fc_full) {
+ ecmd->advertising |= ADVERTISED_Pause;
+ } else if (hw->fc.current_mode == ixgbe_fc_rx_pause) {
+ ecmd->advertising |= ADVERTISED_Pause;
+ ecmd->advertising |= ADVERTISED_Asym_Pause;
+ } else if (hw->fc.current_mode == ixgbe_fc_tx_pause) {
+ ecmd->advertising |= ADVERTISED_Asym_Pause;
+ } else if (hw->fc.current_mode == ixgbe_fc_none) {
+ /* Correctly initialized */
+ } else if (hw->fc.current_mode == ixgbe_fc_pfc) {
+ /* Ethtool doesn't know about this mode */
+ } else {
+ /* Future modes */
+ }
+
/* Get PHY type */
switch (adapter->hw.phy.type) {
case ixgbe_phy_tn:
--
Using Opera's revolutionary email client: http://www.opera.com/mail/
parent reply other threads:[~2011-06-08 6:55 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <op.vwnklt0q6ywr33@esapekka-pc.rad1>]
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=op.vwqu5trx6ywr33@esapekka-pc.rad1 \
--to=esa-pekka.pyokkimies@stonesoft.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