public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [net-next PATCH 1/1] igb: Expose MDI-X status accessible via ethtool
@ 2009-06-11  0:42 Chaitanya Lala
  0 siblings, 0 replies; only message in thread
From: Chaitanya Lala @ 2009-06-11  0:42 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: netdev

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 <clala@riverbed.com>
Signed-off-by: Arthur Jones <ajones@riverbed.com>
---
 drivers/net/igb/igb_ethtool.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/drivers/net/igb/igb_ethtool.c b/drivers/net/igb/igb_ethtool.c
index 27eae49..17486ff 100644
--- a/drivers/net/igb/igb_ethtool.c
+++ b/drivers/net/igb/igb_ethtool.c
@@ -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;
 }
 
-- 
1.6.0.4


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-06-11  0:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-11  0:42 [net-next PATCH 1/1] igb: Expose MDI-X status accessible via ethtool Chaitanya Lala

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox