netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [net-next-2.6 PATCH 1/2] ethtool: Add Direct Attach support to connector port reporting
@ 2009-11-25 10:11 Jeff Kirsher
  2009-11-25 10:11 ` [net-next-2.6 PATCH 2/2] ixgbe: Display currently attached PHY through ethtool Jeff Kirsher
  2009-11-29  8:35 ` [net-next-2.6 PATCH 1/2] ethtool: Add Direct Attach support to connector port reporting David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Jeff Kirsher @ 2009-11-25 10:11 UTC (permalink / raw)
  To: davem, jeff, shemminger
  Cc: netdev, gospo, Peter P Waskiewicz Jr, Jeff Kirsher

From: PJ Waskiewicz <peter.p.waskiewicz.jr@intel.com>

This patch allows a base driver to specify Direct Attach as the
type of port through the ethtool interface.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 include/linux/ethtool.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/linux/ethtool.h b/include/linux/ethtool.h
index edd03b7..bcaa0e0 100644
--- a/include/linux/ethtool.h
+++ b/include/linux/ethtool.h
@@ -631,6 +631,8 @@ struct ethtool_ops {
 #define PORT_MII		0x02
 #define PORT_FIBRE		0x03
 #define PORT_BNC		0x04
+#define PORT_DA			0x05
+#define PORT_NONE		0xef
 #define PORT_OTHER		0xff
 
 /* Which transceiver to use. */


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [net-next-2.6 PATCH 2/2] ixgbe: Display currently attached PHY through ethtool
  2009-11-25 10:11 [net-next-2.6 PATCH 1/2] ethtool: Add Direct Attach support to connector port reporting Jeff Kirsher
@ 2009-11-25 10:11 ` Jeff Kirsher
  2009-11-29  8:35   ` David Miller
  2009-11-29  8:35 ` [net-next-2.6 PATCH 1/2] ethtool: Add Direct Attach support to connector port reporting David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: Jeff Kirsher @ 2009-11-25 10:11 UTC (permalink / raw)
  To: davem, jeff, shemminger
  Cc: netdev, gospo, Peter P Waskiewicz Jr, Jeff Kirsher

From: PJ Waskiewicz <peter.p.waskiewicz.jr@intel.com>

This patch extends the ethtool interface to display what PHY
is currently connected to a NIC.  The results can be viewed in
ethtool ethX output.

Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---

 drivers/net/ixgbe/ixgbe_ethtool.c |   50 +++++++++++++++++++++++++++++++++++++
 1 files changed, 50 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c
index 84ab4db..ec59c53 100644
--- a/drivers/net/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ixgbe/ixgbe_ethtool.c
@@ -205,6 +205,56 @@ static int ixgbe_get_settings(struct net_device *netdev,
 		ecmd->autoneg = AUTONEG_DISABLE;
 	}
 
+	/* Get PHY type */
+	switch (adapter->hw.phy.type) {
+	case ixgbe_phy_tn:
+	case ixgbe_phy_cu_unknown:
+		/* Copper 10G-BASET */
+		ecmd->port = PORT_TP;
+		break;
+	case ixgbe_phy_qt:
+		ecmd->port = PORT_FIBRE;
+		break;
+	case ixgbe_phy_nl:
+	case ixgbe_phy_tw_tyco:
+	case ixgbe_phy_tw_unknown:
+	case ixgbe_phy_sfp_ftl:
+	case ixgbe_phy_sfp_avago:
+	case ixgbe_phy_sfp_intel:
+	case ixgbe_phy_sfp_unknown:
+		switch (adapter->hw.phy.sfp_type) {
+		/* SFP+ devices, further checking needed */
+		case ixgbe_sfp_type_da_cu:
+		case ixgbe_sfp_type_da_cu_core0:
+		case ixgbe_sfp_type_da_cu_core1:
+			ecmd->port = PORT_DA;
+			break;
+		case ixgbe_sfp_type_sr:
+		case ixgbe_sfp_type_lr:
+		case ixgbe_sfp_type_srlr_core0:
+		case ixgbe_sfp_type_srlr_core1:
+			ecmd->port = PORT_FIBRE;
+			break;
+		case ixgbe_sfp_type_not_present:
+			ecmd->port = PORT_NONE;
+			break;
+		case ixgbe_sfp_type_unknown:
+		default:
+			ecmd->port = PORT_OTHER;
+			break;
+		}
+		break;
+	case ixgbe_phy_xaui:
+		ecmd->port = PORT_NONE;
+		break;
+	case ixgbe_phy_unknown:
+	case ixgbe_phy_generic:
+	case ixgbe_phy_sfp_unsupported:
+	default:
+		ecmd->port = PORT_OTHER;
+		break;
+	}
+
 	hw->mac.ops.check_link(hw, &link_speed, &link_up, false);
 	if (link_up) {
 		ecmd->speed = (link_speed == IXGBE_LINK_SPEED_10GB_FULL) ?


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [net-next-2.6 PATCH 1/2] ethtool: Add Direct Attach support to connector port reporting
  2009-11-25 10:11 [net-next-2.6 PATCH 1/2] ethtool: Add Direct Attach support to connector port reporting Jeff Kirsher
  2009-11-25 10:11 ` [net-next-2.6 PATCH 2/2] ixgbe: Display currently attached PHY through ethtool Jeff Kirsher
@ 2009-11-29  8:35 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2009-11-29  8:35 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: jeff, shemminger, netdev, gospo, peter.p.waskiewicz.jr

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Wed, 25 Nov 2009 02:11:30 -0800

> From: PJ Waskiewicz <peter.p.waskiewicz.jr@intel.com>
> 
> This patch allows a base driver to specify Direct Attach as the
> type of port through the ethtool interface.
> 
> Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

Applied.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [net-next-2.6 PATCH 2/2] ixgbe: Display currently attached PHY through ethtool
  2009-11-25 10:11 ` [net-next-2.6 PATCH 2/2] ixgbe: Display currently attached PHY through ethtool Jeff Kirsher
@ 2009-11-29  8:35   ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2009-11-29  8:35 UTC (permalink / raw)
  To: jeffrey.t.kirsher; +Cc: jeff, shemminger, netdev, gospo, peter.p.waskiewicz.jr

From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Wed, 25 Nov 2009 02:11:54 -0800

> From: PJ Waskiewicz <peter.p.waskiewicz.jr@intel.com>
> 
> This patch extends the ethtool interface to display what PHY
> is currently connected to a NIC.  The results can be viewed in
> ethtool ethX output.
> 
> Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

Applied.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-11-29  8:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-11-25 10:11 [net-next-2.6 PATCH 1/2] ethtool: Add Direct Attach support to connector port reporting Jeff Kirsher
2009-11-25 10:11 ` [net-next-2.6 PATCH 2/2] ixgbe: Display currently attached PHY through ethtool Jeff Kirsher
2009-11-29  8:35   ` David Miller
2009-11-29  8:35 ` [net-next-2.6 PATCH 1/2] ethtool: Add Direct Attach support to connector port reporting David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).