|author||Jesse Brandeburg <email@example.com>||2012-08-21 01:37:16 -0700|
|committer||Ben Hutchings <firstname.lastname@example.org>||2012-09-06 19:10:12 +0100|
ethtool: allow setting MDI-X state
A bit ago ethtool added support for reading MDI-X state, this patch finishes the implementation, adding the complementary write command. Add support to ethtool for controlling the MDI-X (crossover) state of a network port. Most adapters correctly negotiate MDI-X, but some ill-behaved switches have trouble and end up picking the wrong MDI setting, which results in complete loss of link. Usually this error condition can be observed when multiple ethtool -r ethX are required before link is achieved. This patch allows the user to override the normal "auto" setting and force the crossover state to on or off. The set will fail if the driver doesn't support the get, as suggested by Ben Hutchings. setting MDI not supported In addition the do_gset output was changed slightly to report the value set by the user (when the driver supports the set) old: MDI-X: on new: MDI-X: on (auto) or MDI-X: on (forced) usage is ethtool -s eth0 mdix [auto|on|off] Signed-off-by: Jesse Brandeburg <email@example.com> CC: Ben Hutchings <firstname.lastname@example.org> Tested-by: Aaron Brown email@example.com Signed-off-by: Jeff Kirsher <firstname.lastname@example.org> Signed-off-by: Ben Hutchings <email@example.com>
Diffstat (limited to 'ethtool.8.in')
1 files changed, 8 insertions, 0 deletions
diff --git a/ethtool.8.in b/ethtool.8.in
index 7253832..3208d38 100644
@@ -229,6 +229,7 @@ ethtool \- query or control network driver and hardware settings
.BI speed \ N
.B2 duplex half full
.B4 port tp aui bnc mii fibre
+.B3 mdix auto on off
.B2 autoneg on off
@@ -521,6 +522,13 @@ Sets full or half duplex mode.
.A4 port tp aui bnc mii fibre
Selects device port.
+.A3 mdix auto on off
+Selects MDI-X mode for port. May be used to override the automatic detection
+feature of most adapters. Auto means automatic detection of MDI status, on
+forces MDI-X (crossover) mode, while off means MDI (straight through) mode.
+The driver should guarantee that this command takes effect immediately, and
+if necessary may reset the link to cause the change to take effect.
.A2 autoneg on off
Specifies whether autonegotiation should be enabled. Autonegotiation
is enabled by default, but in some network devices may have trouble