aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
diff options
context:
space:
mode:
authorJacob Keller <jacob.e.keller@intel.com>2012-06-08 02:59:09 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2012-06-20 04:37:04 -0400
commita49fda3eaa4fe70fdd14681060a7c6c6246dc927 (patch)
tree9505007af38abf12353443c95cfbe3b9c6df45ba /drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
parent200e5fd50ee80ec6ab3156bdbc46a41da0a82d10 (diff)
ixgbe: add support for 1G SX modules
This patch adds support for 1G Fiber PHY modules (SFP+ modules). This support comes along side support for 1G Copper PHY modules, but uses a different PHY type (ixgbe_sfp_type_1g_sx_core). Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c')
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c23
1 files changed, 19 insertions, 4 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
index 24117709d6a2..71659edf81aa 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_phy.c
@@ -907,6 +907,8 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
907 * 8 SFP_act_lmt_DA_CORE1 - 82599-specific 907 * 8 SFP_act_lmt_DA_CORE1 - 82599-specific
908 * 9 SFP_1g_cu_CORE0 - 82599-specific 908 * 9 SFP_1g_cu_CORE0 - 82599-specific
909 * 10 SFP_1g_cu_CORE1 - 82599-specific 909 * 10 SFP_1g_cu_CORE1 - 82599-specific
910 * 11 SFP_1g_sx_CORE0 - 82599-specific
911 * 12 SFP_1g_sx_CORE1 - 82599-specific
910 */ 912 */
911 if (hw->mac.type == ixgbe_mac_82598EB) { 913 if (hw->mac.type == ixgbe_mac_82598EB) {
912 if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE) 914 if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE)
@@ -957,6 +959,13 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
957 else 959 else
958 hw->phy.sfp_type = 960 hw->phy.sfp_type =
959 ixgbe_sfp_type_1g_cu_core1; 961 ixgbe_sfp_type_1g_cu_core1;
962 } else if (comp_codes_1g & IXGBE_SFF_1GBASESX_CAPABLE) {
963 if (hw->bus.lan_id == 0)
964 hw->phy.sfp_type =
965 ixgbe_sfp_type_1g_sx_core0;
966 else
967 hw->phy.sfp_type =
968 ixgbe_sfp_type_1g_sx_core1;
960 } else { 969 } else {
961 hw->phy.sfp_type = ixgbe_sfp_type_unknown; 970 hw->phy.sfp_type = ixgbe_sfp_type_unknown;
962 } 971 }
@@ -1049,7 +1058,9 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
1049 /* Verify supported 1G SFP modules */ 1058 /* Verify supported 1G SFP modules */
1050 if (comp_codes_10g == 0 && 1059 if (comp_codes_10g == 0 &&
1051 !(hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core1 || 1060 !(hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core1 ||
1052 hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core0)) { 1061 hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core0 ||
1062 hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core0 ||
1063 hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core1)) {
1053 hw->phy.type = ixgbe_phy_sfp_unsupported; 1064 hw->phy.type = ixgbe_phy_sfp_unsupported;
1054 status = IXGBE_ERR_SFP_NOT_SUPPORTED; 1065 status = IXGBE_ERR_SFP_NOT_SUPPORTED;
1055 goto out; 1066 goto out;
@@ -1064,7 +1075,9 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
1064 hw->mac.ops.get_device_caps(hw, &enforce_sfp); 1075 hw->mac.ops.get_device_caps(hw, &enforce_sfp);
1065 if (!(enforce_sfp & IXGBE_DEVICE_CAPS_ALLOW_ANY_SFP) && 1076 if (!(enforce_sfp & IXGBE_DEVICE_CAPS_ALLOW_ANY_SFP) &&
1066 !((hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core0) || 1077 !((hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core0) ||
1067 (hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core1))) { 1078 (hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core1) ||
1079 (hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core0) ||
1080 (hw->phy.sfp_type == ixgbe_sfp_type_1g_sx_core1))) {
1068 /* Make sure we're a supported PHY type */ 1081 /* Make sure we're a supported PHY type */
1069 if (hw->phy.type == ixgbe_phy_sfp_intel) { 1082 if (hw->phy.type == ixgbe_phy_sfp_intel) {
1070 status = 0; 1083 status = 0;
@@ -1128,10 +1141,12 @@ s32 ixgbe_get_sfp_init_sequence_offsets(struct ixgbe_hw *hw,
1128 * SR modules 1141 * SR modules
1129 */ 1142 */
1130 if (sfp_type == ixgbe_sfp_type_da_act_lmt_core0 || 1143 if (sfp_type == ixgbe_sfp_type_da_act_lmt_core0 ||
1131 sfp_type == ixgbe_sfp_type_1g_cu_core0) 1144 sfp_type == ixgbe_sfp_type_1g_cu_core0 ||
1145 sfp_type == ixgbe_sfp_type_1g_sx_core0)
1132 sfp_type = ixgbe_sfp_type_srlr_core0; 1146 sfp_type = ixgbe_sfp_type_srlr_core0;
1133 else if (sfp_type == ixgbe_sfp_type_da_act_lmt_core1 || 1147 else if (sfp_type == ixgbe_sfp_type_da_act_lmt_core1 ||
1134 sfp_type == ixgbe_sfp_type_1g_cu_core1) 1148 sfp_type == ixgbe_sfp_type_1g_cu_core1 ||
1149 sfp_type == ixgbe_sfp_type_1g_sx_core1)
1135 sfp_type = ixgbe_sfp_type_srlr_core1; 1150 sfp_type = ixgbe_sfp_type_srlr_core1;
1136 1151
1137 /* Read offset to PHY init contents */ 1152 /* Read offset to PHY init contents */