aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_phy.c
diff options
context:
space:
mode:
authorDon Skidmore <donald.c.skidmore@intel.com>2010-05-18 12:00:13 -0400
committerDavid S. Miller <davem@davemloft.net>2010-05-18 22:44:20 -0400
commitea0a04dfc1c6701489edabf47f608d8aa474cbab (patch)
treeff8530a60b5f7f93b2edf5fc40ba1d36e8971ca9 /drivers/net/ixgbe/ixgbe_phy.c
parent33c66bd10fb0c07ba05a7b55b8ad0cd41cb0e68a (diff)
ixgbe: add support for active DA cables
This patch adds support of active DA cables. This is renaming and adding some PHY type enumerations. 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.c38
1 files changed, 32 insertions, 6 deletions
diff --git a/drivers/net/ixgbe/ixgbe_phy.c b/drivers/net/ixgbe/ixgbe_phy.c
index d6d5b843d625..22d21af14783 100644
--- a/drivers/net/ixgbe/ixgbe_phy.c
+++ b/drivers/net/ixgbe/ixgbe_phy.c
@@ -531,6 +531,7 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
531 u8 comp_codes_10g = 0; 531 u8 comp_codes_10g = 0;
532 u8 oui_bytes[3] = {0, 0, 0}; 532 u8 oui_bytes[3] = {0, 0, 0};
533 u8 cable_tech = 0; 533 u8 cable_tech = 0;
534 u8 cable_spec = 0;
534 u16 enforce_sfp = 0; 535 u16 enforce_sfp = 0;
535 536
536 if (hw->mac.ops.get_media_type(hw) != ixgbe_media_type_fiber) { 537 if (hw->mac.ops.get_media_type(hw) != ixgbe_media_type_fiber) {
@@ -580,14 +581,30 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
580 else 581 else
581 hw->phy.sfp_type = ixgbe_sfp_type_unknown; 582 hw->phy.sfp_type = ixgbe_sfp_type_unknown;
582 } else if (hw->mac.type == ixgbe_mac_82599EB) { 583 } else if (hw->mac.type == ixgbe_mac_82599EB) {
583 if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE) 584 if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE) {
584 if (hw->bus.lan_id == 0) 585 if (hw->bus.lan_id == 0)
585 hw->phy.sfp_type = 586 hw->phy.sfp_type =
586 ixgbe_sfp_type_da_cu_core0; 587 ixgbe_sfp_type_da_cu_core0;
587 else 588 else
588 hw->phy.sfp_type = 589 hw->phy.sfp_type =
589 ixgbe_sfp_type_da_cu_core1; 590 ixgbe_sfp_type_da_cu_core1;
590 else if (comp_codes_10g & IXGBE_SFF_10GBASESR_CAPABLE) 591 } else if (cable_tech & IXGBE_SFF_DA_ACTIVE_CABLE) {
592 hw->phy.ops.read_i2c_eeprom(
593 hw, IXGBE_SFF_CABLE_SPEC_COMP,
594 &cable_spec);
595 if (cable_spec &
596 IXGBE_SFF_DA_SPEC_ACTIVE_LIMITING) {
597 if (hw->bus.lan_id == 0)
598 hw->phy.sfp_type =
599 ixgbe_sfp_type_da_act_lmt_core0;
600 else
601 hw->phy.sfp_type =
602 ixgbe_sfp_type_da_act_lmt_core1;
603 } else {
604 hw->phy.sfp_type =
605 ixgbe_sfp_type_unknown;
606 }
607 } else if (comp_codes_10g & IXGBE_SFF_10GBASESR_CAPABLE)
591 if (hw->bus.lan_id == 0) 608 if (hw->bus.lan_id == 0)
592 hw->phy.sfp_type = 609 hw->phy.sfp_type =
593 ixgbe_sfp_type_srlr_core0; 610 ixgbe_sfp_type_srlr_core0;
@@ -637,10 +654,14 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
637 switch (vendor_oui) { 654 switch (vendor_oui) {
638 case IXGBE_SFF_VENDOR_OUI_TYCO: 655 case IXGBE_SFF_VENDOR_OUI_TYCO:
639 if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE) 656 if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE)
640 hw->phy.type = ixgbe_phy_tw_tyco; 657 hw->phy.type =
658 ixgbe_phy_sfp_passive_tyco;
641 break; 659 break;
642 case IXGBE_SFF_VENDOR_OUI_FTL: 660 case IXGBE_SFF_VENDOR_OUI_FTL:
643 hw->phy.type = ixgbe_phy_sfp_ftl; 661 if (cable_tech & IXGBE_SFF_DA_ACTIVE_CABLE)
662 hw->phy.type = ixgbe_phy_sfp_ftl_active;
663 else
664 hw->phy.type = ixgbe_phy_sfp_ftl;
644 break; 665 break;
645 case IXGBE_SFF_VENDOR_OUI_AVAGO: 666 case IXGBE_SFF_VENDOR_OUI_AVAGO:
646 hw->phy.type = ixgbe_phy_sfp_avago; 667 hw->phy.type = ixgbe_phy_sfp_avago;
@@ -650,7 +671,11 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
650 break; 671 break;
651 default: 672 default:
652 if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE) 673 if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE)
653 hw->phy.type = ixgbe_phy_tw_unknown; 674 hw->phy.type =
675 ixgbe_phy_sfp_passive_unknown;
676 else if (cable_tech & IXGBE_SFF_DA_ACTIVE_CABLE)
677 hw->phy.type =
678 ixgbe_phy_sfp_active_unknown;
654 else 679 else
655 hw->phy.type = ixgbe_phy_sfp_unknown; 680 hw->phy.type = ixgbe_phy_sfp_unknown;
656 break; 681 break;
@@ -658,7 +683,8 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
658 } 683 }
659 684
660 /* All passive DA cables are supported */ 685 /* All passive DA cables are supported */
661 if (cable_tech & IXGBE_SFF_DA_PASSIVE_CABLE) { 686 if (cable_tech & (IXGBE_SFF_DA_PASSIVE_CABLE |
687 IXGBE_SFF_DA_ACTIVE_CABLE)) {
662 status = 0; 688 status = 0;
663 goto out; 689 goto out;
664 } 690 }