aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ixgbe/ixgbe_phy.c
diff options
context:
space:
mode:
authorWaskiewicz Jr, Peter P <peter.p.waskiewicz.jr@intel.com>2009-04-23 07:31:37 -0400
committerDavid S. Miller <davem@davemloft.net>2009-04-27 06:15:42 -0400
commitfa466e91bdf214e6e136e9da9a46a52775a1e884 (patch)
tree2326e67f87417a4c9f0c3c1999dffe62b2fdbfcd /drivers/net/ixgbe/ixgbe_phy.c
parent78b1f6070fa16cb442a7c48e8f5364cd84a88b90 (diff)
ixgbe: Disallow SFP 1G modules in the SFP+ cages for 82598 and 82599
82598 and 82599 do not support SFP 1G modules. Instead of allowing the driver to load, but never get link, rejecting the module and displaying a useful message is more preferrable. The framework for displaying the failure message already exists, now we just need to detect and reject the SFP modules. 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/ixgbe/ixgbe_phy.c')
-rw-r--r--drivers/net/ixgbe/ixgbe_phy.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/drivers/net/ixgbe/ixgbe_phy.c b/drivers/net/ixgbe/ixgbe_phy.c
index f3258ec901fe..2543c32ca84a 100644
--- a/drivers/net/ixgbe/ixgbe_phy.c
+++ b/drivers/net/ixgbe/ixgbe_phy.c
@@ -673,11 +673,22 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
673 break; 673 break;
674 } 674 }
675 } 675 }
676 if (hw->mac.type == ixgbe_mac_82598EB || 676
677 (hw->phy.sfp_type != ixgbe_sfp_type_sr && 677 /* All DA cables are supported */
678 hw->phy.sfp_type != ixgbe_sfp_type_lr && 678 if (transmission_media & IXGBE_SFF_TWIN_AX_CAPABLE) {
679 hw->phy.sfp_type != ixgbe_sfp_type_srlr_core0 && 679 status = 0;
680 hw->phy.sfp_type != ixgbe_sfp_type_srlr_core1)) { 680 goto out;
681 }
682
683 /* 1G SFP modules are not supported */
684 if (comp_codes_10g == 0) {
685 hw->phy.type = ixgbe_phy_sfp_unsupported;
686 status = IXGBE_ERR_SFP_NOT_SUPPORTED;
687 goto out;
688 }
689
690 /* Anything else 82598-based is supported */
691 if (hw->mac.type == ixgbe_mac_82598EB) {
681 status = 0; 692 status = 0;
682 goto out; 693 goto out;
683 } 694 }
@@ -690,6 +701,7 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
690 status = 0; 701 status = 0;
691 } else { 702 } else {
692 hw_dbg(hw, "SFP+ module not supported\n"); 703 hw_dbg(hw, "SFP+ module not supported\n");
704 hw->phy.type = ixgbe_phy_sfp_unsupported;
693 status = IXGBE_ERR_SFP_NOT_SUPPORTED; 705 status = IXGBE_ERR_SFP_NOT_SUPPORTED;
694 } 706 }
695 } else { 707 } else {