aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorPJ Waskiewicz <peter.p.waskiewicz.jr@intel.com>2009-11-24 19:11:54 -0500
committerDavid S. Miller <davem@davemloft.net>2009-11-29 03:34:01 -0500
commit3b8626ba01a8a745a3fdf22dd347edd708b0af13 (patch)
tree2f75eb70aed1900ad730bc012d174b023aac96e4 /drivers/net
parent5789d290cda6854b03986031df02b965572279df (diff)
ixgbe: Display currently attached PHY through ethtool
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> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/ixgbe/ixgbe_ethtool.c50
1 files changed, 50 insertions, 0 deletions
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c
index a5ca289efc94..1928d559e65f 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,
205 ecmd->autoneg = AUTONEG_DISABLE; 205 ecmd->autoneg = AUTONEG_DISABLE;
206 } 206 }
207 207
208 /* Get PHY type */
209 switch (adapter->hw.phy.type) {
210 case ixgbe_phy_tn:
211 case ixgbe_phy_cu_unknown:
212 /* Copper 10G-BASET */
213 ecmd->port = PORT_TP;
214 break;
215 case ixgbe_phy_qt:
216 ecmd->port = PORT_FIBRE;
217 break;
218 case ixgbe_phy_nl:
219 case ixgbe_phy_tw_tyco:
220 case ixgbe_phy_tw_unknown:
221 case ixgbe_phy_sfp_ftl:
222 case ixgbe_phy_sfp_avago:
223 case ixgbe_phy_sfp_intel:
224 case ixgbe_phy_sfp_unknown:
225 switch (adapter->hw.phy.sfp_type) {
226 /* SFP+ devices, further checking needed */
227 case ixgbe_sfp_type_da_cu:
228 case ixgbe_sfp_type_da_cu_core0:
229 case ixgbe_sfp_type_da_cu_core1:
230 ecmd->port = PORT_DA;
231 break;
232 case ixgbe_sfp_type_sr:
233 case ixgbe_sfp_type_lr:
234 case ixgbe_sfp_type_srlr_core0:
235 case ixgbe_sfp_type_srlr_core1:
236 ecmd->port = PORT_FIBRE;
237 break;
238 case ixgbe_sfp_type_not_present:
239 ecmd->port = PORT_NONE;
240 break;
241 case ixgbe_sfp_type_unknown:
242 default:
243 ecmd->port = PORT_OTHER;
244 break;
245 }
246 break;
247 case ixgbe_phy_xaui:
248 ecmd->port = PORT_NONE;
249 break;
250 case ixgbe_phy_unknown:
251 case ixgbe_phy_generic:
252 case ixgbe_phy_sfp_unsupported:
253 default:
254 ecmd->port = PORT_OTHER;
255 break;
256 }
257
208 hw->mac.ops.check_link(hw, &link_speed, &link_up, false); 258 hw->mac.ops.check_link(hw, &link_speed, &link_up, false);
209 if (link_up) { 259 if (link_up) {
210 ecmd->speed = (link_speed == IXGBE_LINK_SPEED_10GB_FULL) ? 260 ecmd->speed = (link_speed == IXGBE_LINK_SPEED_10GB_FULL) ?