From da7d16a8289c8a7fabfbdfe7972828e53bc77936 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 1 Dec 2009 16:00:30 +0000 Subject: ethtool: Report MDI-X status for twisted-pair interfaces Based on a patch by Chaitanya Lala . The MDI-X status can be a useful tool for diagnosing network connectivity issues. Signed-off-by: Ben Hutchings Signed-off-by: Jeff Garzik --- ethtool.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'ethtool.c') 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; } -- cgit v1.2.1