aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_phy.c
diff options
context:
space:
mode:
authorDon Skidmore <donald.c.skidmore@intel.com>2010-06-29 14:30:59 -0400
committerDavid S. Miller <davem@davemloft.net>2010-06-30 17:27:40 -0400
commitcb836a977f71f76ccbb1ff35b9c113ace96377e9 (patch)
treeb91e2fc048d7f5fb193390f13fd89ef0e7a0b550 /drivers/net/ixgbe/ixgbe_phy.c
parent765c9f46867c3253c02275cbb7a453f2eb56eda1 (diff)
ixgbe: add 1g PHY support for 82599
Add support for 1G SFP+ PHY's to 82599. Signed-off-by: Don Skidmore <donald.c.skidmore@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/ixgbe/ixgbe_phy.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_phy.c33
1 files changed, 29 insertions, 4 deletions
diff --git a/drivers/net/ixgbe/ixgbe_phy.c b/drivers/net/ixgbe/ixgbe_phy.c
index 48325a5beff2..6c0d42e33f21 100644
--- a/drivers/net/ixgbe/ixgbe_phy.c
+++ b/drivers/net/ixgbe/ixgbe_phy.c
@@ -577,6 +577,8 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
577 * 6 SFP_SR/LR_CORE1 - 82599-specific 577 * 6 SFP_SR/LR_CORE1 - 82599-specific
578 * 7 SFP_act_lmt_DA_CORE0 - 82599-specific 578 * 7 SFP_act_lmt_DA_CORE0 - 82599-specific
579 * 8 SFP_act_lmt_DA_CORE1 - 82599-specific 579 * 8 SFP_act_lmt_DA_CORE1 - 82599-specific
580 * 9 SFP_1g_cu_CORE0 - 82599-specific
581 * 10 SFP_1g_cu_CORE1 - 82599-specific
580 */ 582 */
581 if (hw->mac.type == ixgbe_mac_82598EB) { 583 if (hw->mac.type == ixgbe_mac_82598EB) {
582 if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE) 584 if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE)
@@ -625,6 +627,13 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
625 else 627 else
626 hw->phy.sfp_type = 628 hw->phy.sfp_type =
627 ixgbe_sfp_type_srlr_core1; 629 ixgbe_sfp_type_srlr_core1;
630 else if (comp_codes_1g & IXGBE_SFF_1GBASET_CAPABLE)
631 if (hw->bus.lan_id == 0)
632 hw->phy.sfp_type =
633 ixgbe_sfp_type_1g_cu_core0;
634 else
635 hw->phy.sfp_type =
636 ixgbe_sfp_type_1g_cu_core1;
628 else 637 else
629 hw->phy.sfp_type = ixgbe_sfp_type_unknown; 638 hw->phy.sfp_type = ixgbe_sfp_type_unknown;
630 } 639 }
@@ -696,8 +705,10 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
696 goto out; 705 goto out;
697 } 706 }
698 707
699 /* 1G SFP modules are not supported */ 708 /* Verify supported 1G SFP modules */
700 if (comp_codes_10g == 0) { 709 if (comp_codes_10g == 0 &&
710 !(hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core1 ||
711 hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core0)) {
701 hw->phy.type = ixgbe_phy_sfp_unsupported; 712 hw->phy.type = ixgbe_phy_sfp_unsupported;
702 status = IXGBE_ERR_SFP_NOT_SUPPORTED; 713 status = IXGBE_ERR_SFP_NOT_SUPPORTED;
703 goto out; 714 goto out;
@@ -711,7 +722,9 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
711 722
712 /* This is guaranteed to be 82599, no need to check for NULL */ 723 /* This is guaranteed to be 82599, no need to check for NULL */
713 hw->mac.ops.get_device_caps(hw, &enforce_sfp); 724 hw->mac.ops.get_device_caps(hw, &enforce_sfp);
714 if (!(enforce_sfp & IXGBE_DEVICE_CAPS_ALLOW_ANY_SFP)) { 725 if (!(enforce_sfp & IXGBE_DEVICE_CAPS_ALLOW_ANY_SFP) &&
726 !((hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core0) ||
727 (hw->phy.sfp_type == ixgbe_sfp_type_1g_cu_core1))) {
715 /* Make sure we're a supported PHY type */ 728 /* Make sure we're a supported PHY type */
716 if (hw->phy.type == ixgbe_phy_sfp_intel) { 729 if (hw->phy.type == ixgbe_phy_sfp_intel) {
717 status = 0; 730 status = 0;
@@ -742,6 +755,7 @@ s32 ixgbe_get_sfp_init_sequence_offsets(struct ixgbe_hw *hw,
742 u16 *data_offset) 755 u16 *data_offset)
743{ 756{
744 u16 sfp_id; 757 u16 sfp_id;
758 u16 sfp_type = hw->phy.sfp_type;
745 759
746 if (hw->phy.sfp_type == ixgbe_sfp_type_unknown) 760 if (hw->phy.sfp_type == ixgbe_sfp_type_unknown)
747 return IXGBE_ERR_SFP_NOT_SUPPORTED; 761 return IXGBE_ERR_SFP_NOT_SUPPORTED;
@@ -753,6 +767,17 @@ s32 ixgbe_get_sfp_init_sequence_offsets(struct ixgbe_hw *hw,
753 (hw->phy.sfp_type == ixgbe_sfp_type_da_cu)) 767 (hw->phy.sfp_type == ixgbe_sfp_type_da_cu))
754 return IXGBE_ERR_SFP_NOT_SUPPORTED; 768 return IXGBE_ERR_SFP_NOT_SUPPORTED;
755 769
770 /*
771 * Limiting active cables and 1G Phys must be initialized as
772 * SR modules
773 */
774 if (sfp_type == ixgbe_sfp_type_da_act_lmt_core0 ||
775 sfp_type == ixgbe_sfp_type_1g_cu_core0)
776 sfp_type = ixgbe_sfp_type_srlr_core0;
777 else if (sfp_type == ixgbe_sfp_type_da_act_lmt_core1 ||
778 sfp_type == ixgbe_sfp_type_1g_cu_core1)
779 sfp_type = ixgbe_sfp_type_srlr_core1;
780
756 /* Read offset to PHY init contents */ 781 /* Read offset to PHY init contents */
757 hw->eeprom.ops.read(hw, IXGBE_PHY_INIT_OFFSET_NL, list_offset); 782 hw->eeprom.ops.read(hw, IXGBE_PHY_INIT_OFFSET_NL, list_offset);
758 783
@@ -769,7 +794,7 @@ s32 ixgbe_get_sfp_init_sequence_offsets(struct ixgbe_hw *hw,
769 hw->eeprom.ops.read(hw, *list_offset, &sfp_id); 794 hw->eeprom.ops.read(hw, *list_offset, &sfp_id);
770 795
771 while (sfp_id != IXGBE_PHY_INIT_END_NL) { 796 while (sfp_id != IXGBE_PHY_INIT_END_NL) {
772 if (sfp_id == hw->phy.sfp_type) { 797 if (sfp_id == sfp_type) {
773 (*list_offset)++; 798 (*list_offset)++;
774 hw->eeprom.ops.read(hw, *list_offset, data_offset); 799 hw->eeprom.ops.read(hw, *list_offset, data_offset);
775 if ((!*data_offset) || (*data_offset == 0xFFFF)) { 800 if ((!*data_offset) || (*data_offset == 0xFFFF)) {