From: Brice Goglin <brice@myri.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: Linux Network Development list <netdev@vger.kernel.org>
Subject: [PATCH] myri10ge: improve port type reporting in ethtool output
Date: Mon, 19 Oct 2009 07:35:04 +0200 [thread overview]
Message-ID: <4ADBFA88.8030300@myri.com> (raw)
Improve the reporting of the port type in ethtool,
update for new boards.
Signed-off-by: Brice Goglin <brice@myri.com>
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -75,7 +75,7 @@
#include "myri10ge_mcp.h"
#include "myri10ge_mcp_gen_header.h"
-#define MYRI10GE_VERSION_STR "1.5.0-1.432"
+#define MYRI10GE_VERSION_STR "1.5.1-1.450"
MODULE_DESCRIPTION("Myricom 10G driver (10GbE)");
MODULE_AUTHOR("Maintainer: help@myri.com");
@@ -1601,6 +1601,8 @@ myri10ge_get_settings(struct net_device *netdev,
struct ethtool_cmd *cmd)
cmd->autoneg = AUTONEG_DISABLE;
cmd->speed = SPEED_10000;
cmd->duplex = DUPLEX_FULL;
+ cmd->supported = SUPPORTED_10000baseT_Full;
+ cmd->advertising = ADVERTISED_10000baseT_Full;
/*
* parse the product code to deterimine the interface type
@@ -1623,10 +1625,19 @@ myri10ge_get_settings(struct net_device *netdev,
struct ethtool_cmd *cmd)
return 0;
}
}
- if (*ptr == 'R' || *ptr == 'Q') {
- /* We've found either an XFP or quad ribbon fiber */
+ if (*ptr == '2')
+ ptr++;
+ if (*ptr == 'R' || *ptr == 'Q' || *ptr == 'S') {
+ /* We've found either an XFP, quad ribbon fiber, or SFP+ */
cmd->port = PORT_FIBRE;
+ cmd->supported |= SUPPORTED_FIBRE;
+ cmd->advertising |= ADVERTISED_FIBRE;
}
+ if (*ptr == 'R' || *ptr == 'S')
+ cmd->transceiver = XCVR_EXTERNAL;
+ else
+ cmd->transceiver = XCVR_INTERNAL;
+
return 0;
}
next reply other threads:[~2009-10-19 5:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-19 5:35 Brice Goglin [this message]
2009-10-19 8:12 ` [PATCH] myri10ge: improve port type reporting in ethtool output Ben Hutchings
2009-10-19 12:34 ` Andrew Gallatin
2009-10-19 13:03 ` Ben Hutchings
2009-10-19 13:30 ` Andrew Gallatin
2009-10-19 14:17 ` Ben Hutchings
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=4ADBFA88.8030300@myri.com \
--to=brice@myri.com \
--cc=davem@davemloft.net \
--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).