lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1259683230.2831.14.camel@achroite.uk.solarflarecom.com>
Date:	Tue, 01 Dec 2009 16:00:30 +0000
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	Jeff Garzik <jeff@...zik.org>
Cc:	netdev <netdev@...r.kernel.org>,
	Chaitanya Lala <clala@...erbed.com>
Subject: [PATCH] ethtool: Report MDI-X status for twisted-pair interfaces

Based on a patch by Chaitanya Lala <clala@...erbed.com>.

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

Signed-off-by: Ben Hutchings <bhutchings@...arflare.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.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ