diff options
author | Chaitanya Lala <clala@riverbed.com> | 2009-06-08 10:28:54 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-06-09 08:25:36 -0400 |
commit | 18760f1e74e8dfe8f30d4891e66163d1e6feb893 (patch) | |
tree | 052017e6553c6dfec92734030be1d64bec930945 /drivers | |
parent | edfea6e641edee07bc69c70dd978088fc1cecd74 (diff) |
e1000e: Expose MDI-X status via ethtool change
Ethtool is a standard way of getting information about
ethernet interfaces. We enhance ethtool kernel interface
& e1000e to make the MDI-X status readable via ethtool in
userspace.
Signed-off-by: Chaitanya Lala <clala@riverbed.com>
Signed-off-by: Arthur Jones <ajones@riverbed.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/e1000e/ethtool.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/e1000e/ethtool.c b/drivers/net/e1000e/ethtool.c index 3d6435617527..1bf4d2a5d34f 100644 --- a/drivers/net/e1000e/ethtool.c +++ b/drivers/net/e1000e/ethtool.c | |||
@@ -167,6 +167,15 @@ static int e1000_get_settings(struct net_device *netdev, | |||
167 | 167 | ||
168 | ecmd->autoneg = ((hw->phy.media_type == e1000_media_type_fiber) || | 168 | ecmd->autoneg = ((hw->phy.media_type == e1000_media_type_fiber) || |
169 | hw->mac.autoneg) ? AUTONEG_ENABLE : AUTONEG_DISABLE; | 169 | hw->mac.autoneg) ? AUTONEG_ENABLE : AUTONEG_DISABLE; |
170 | |||
171 | /* MDI-X => 2; MDI =>1; Invalid =>0 */ | ||
172 | if ((hw->phy.media_type == e1000_media_type_copper) && | ||
173 | !hw->mac.get_link_status) | ||
174 | ecmd->eth_tp_mdix = hw->phy.is_mdix ? ETH_TP_MDI_X : | ||
175 | ETH_TP_MDI; | ||
176 | else | ||
177 | ecmd->eth_tp_mdix = ETH_TP_MDI_INVALID; | ||
178 | |||
170 | return 0; | 179 | return 0; |
171 | } | 180 | } |
172 | 181 | ||