igb: Expose MDI-X status accessible via ethtool
Subsystems (2)
PATCH 1/1 igb: Expose MDI-X status accessible via ethtool
In a recent patch, ethtool kernel interface changed to incorporate MDI-X status. We expose MDI-X status with this patch. This patch depends a previous patch called
"e1000e: Expose MDI-X status via ethtool change".
Signed-off-by Chaitanya Lala <[email protected]>
Signed-off-by Arthur Jones <[email protected]>
--- drivers/net/igb/igb_ethtool.c | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)
drivers/net/igb/igb_ethtool.c +9 -0
@@ -168,6 +168,15 @@ static int igb_get_settings(struct net_device *netdev, struct ethtool_cmd *ecmd) ecmd->autoneg = ((hw->phy.media_type == e1000_media_type_fiber) || hw->mac.autoneg) ?AUTONEG_ENABLE :AUTONEG_DISABLE ; + +/* MDI-X => 2; MDI =>1; Invalid =>0 */ +if ((hw->phy.media_type == e1000_media_type_copper) && + !hw->mac.get_link_status) + ecmd->eth_tp_mdix = hw->phy.is_mdix ?ETH_TP_MDI_X : +ETH_TP_MDI ; +else + ecmd->eth_tp_mdix =ETH_TP_MDI_INVALID ; +return 0 ; }
Signature · 1 line
1.6.0.4