Skip to contentSkip to conversation

ethtool: Report MDI-X status for twisted-pair interfaces

PATCH Applied Ben Hutchings 2 participants 2 messages Dec 1, 2009

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ethtool: Report MDI-X status for twisted-pair interfaces

Based on a patch by Chaitanya Lala <[email protected]>.

The MDI-X status can be a useful tool for diagnosing network connectivity issues.

---
 ethtool.c |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)
ethtool.c +16 -0
index 827f16c..df02e91 100644
@@ -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;
 }
 
Signature · 6 lines
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.
Applied
#1 lore raw
Quoted 9 lines · Ben Hutchings

Based on a patch by Chaitanya Lala<[email protected]>.

The MDI-X status can be a useful tool for diagnosing network connectivity issues.

---
  ethtool.c |   16 ++++++++++++++++
  1 files changed, 16 insertions(+), 0 deletions(-)

applied