* [PATCH] ethtool: Report MDI-X status for twisted-pair interfaces
@ 2009-12-01 16:00 Ben Hutchings
2009-12-01 16:06 ` Jeff Garzik
0 siblings, 1 reply; 2+ messages in thread
From: Ben Hutchings @ 2009-12-01 16:00 UTC (permalink / raw)
To: Jeff Garzik; +Cc: netdev, Chaitanya Lala
Based on a patch by Chaitanya Lala <clala@riverbed.com>.
The MDI-X status can be a useful tool for diagnosing network
connectivity issues.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
---
ethtool.c | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/ethtool.c b/ethtool.c
index 827f16c..df02e91 100644
--- a/ethtool.c
+++ b/ethtool.c
@@ -1018,6 +1018,22 @@ static int dump_ecmd(struct ethtool_cmd *ep)
fprintf(stdout, " Auto-negotiation: %s\n",
(ep->autoneg == AUTONEG_DISABLE) ?
"off" : "on");
+
+ if (ep->port == PORT_TP) {
+ fprintf(stdout, " MDI-X: ");
+ switch (ep->eth_tp_mdix) {
+ case ETH_TP_MDI:
+ fprintf(stdout, "off\n");
+ break;
+ case ETH_TP_MDI_X:
+ fprintf(stdout, "on\n");
+ break;
+ default:
+ fprintf(stdout, "Unknown\n");
+ break;
+ }
+ }
+
return 0;
}
--
1.5.5
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-12-01 16:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-01 16:00 [PATCH] ethtool: Report MDI-X status for twisted-pair interfaces Ben Hutchings
2009-12-01 16:06 ` Jeff Garzik
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).