]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ixgbe: Add module parameter to allow untested and unsafe SFP+ modules
authorPeter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Wed, 1 Feb 2012 09:19:21 +0000 (09:19 +0000)
committerJoe Jin <joe.jin@oracle.com>
Thu, 17 May 2012 14:39:26 +0000 (22:39 +0800)
The X520 family of network devices, with the 82599 chip, support a
small number of Intel-verified SFP+ modules on their NICs.  To maintain
stability and quality, the current devices restrict untested 3rd party
SFP+ modules.

This patch introduces a module parameter for ixgbe to allow these untested
modules at the user's peril.  It also includes a warning to the syslog
alerting users that the modules aren't supported, and results may
vary.

CC: Jesper Dangaard Brouer <hawk@comx.dk>
(cherry picked from commit 8ef78adcb03b1fcb53c3bd62df4e96c1d2706c58)
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
drivers/net/ixgbe/ixgbe_main.c
drivers/net/ixgbe/ixgbe_phy.c
drivers/net/ixgbe/ixgbe_type.h

index 0ff3d77740cef2058a212ef7e405dfea4f241dd6..50881152a330e91cc44da2bd426586a822092bc4 100644 (file)
@@ -128,6 +128,11 @@ MODULE_PARM_DESC(max_vfs,
                 "Maximum number of virtual functions to allocate per physical function");
 #endif /* CONFIG_PCI_IOV */
 
+static unsigned int allow_unsupported_sfp;
+module_param(allow_unsupported_sfp, uint, 0);
+MODULE_PARM_DESC(allow_unsupported_sfp,
+                "Allow unsupported and untested SFP+ modules on 82599-based adapters");
+
 MODULE_AUTHOR("Intel Corporation, <linux.nics@intel.com>");
 MODULE_DESCRIPTION("Intel(R) 10 Gigabit PCI Express Network Driver");
 MODULE_LICENSE("GPL");
@@ -7474,6 +7479,9 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
                        e_crit(probe, "Fan has stopped, replace the adapter\n");
        }
 
+       if (allow_unsupported_sfp)
+               hw->allow_unsupported_sfp = allow_unsupported_sfp;
+
        /* reset_hw fills in the perm_addr as well */
        hw->phy.reset_if_overtemp = true;
        err = hw->mac.ops.reset_hw(hw);
index 70d7856969460e477574cc460810680e406967f8..17b55b12a1e23368310b25368b1348004b8ae9ec 100644 (file)
@@ -834,6 +834,7 @@ out:
  **/
 s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
 {
+       struct ixgbe_adapter *adapter = hw->back;
        s32 status = IXGBE_ERR_PHY_ADDR_INVALID;
        u32 vendor_oui = 0;
        enum ixgbe_sfp_type stored_sfp_type = hw->phy.sfp_type;
@@ -1068,9 +1069,16 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
                        if (hw->phy.type == ixgbe_phy_sfp_intel) {
                                status = 0;
                        } else {
-                               hw_dbg(hw, "SFP+ module not supported\n");
-                               hw->phy.type = ixgbe_phy_sfp_unsupported;
-                               status = IXGBE_ERR_SFP_NOT_SUPPORTED;
+                               if (hw->allow_unsupported_sfp) {
+                                       e_warn(drv, "WARNING: Intel (R) Network Connections are quality tested using Intel (R) Ethernet Optics.  Using untested modules is not supported and may cause unstable operation or damage to the module or the adapter.  Intel Corporation is not responsible for any harm caused by using untested modules.");
+                                       status = 0;
+                               } else {
+                                       hw_dbg(hw,
+                                              "SFP+ module not supported\n");
+                                       hw->phy.type =
+                                               ixgbe_phy_sfp_unsupported;
+                                       status = IXGBE_ERR_SFP_NOT_SUPPORTED;
+                               }
                        }
                } else {
                        status = 0;
index 775602ef90e5d2176548bece6477aeacc0c6c347..2dc5e71cb3fa296cbf3fe5a0bf65454228c0baf6 100644 (file)
@@ -2892,6 +2892,7 @@ struct ixgbe_hw {
        u8                              revision_id;
        bool                            adapter_stopped;
        bool                            force_full_reset;
+       bool                            allow_unsupported_sfp;
 };
 
 struct ixgbe_info {