Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fa466e91 authored by Waskiewicz Jr, Peter P's avatar Waskiewicz Jr, Peter P Committed by David S. Miller
Browse files

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: default avatarPeter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 78b1f607
Loading
Loading
Loading
Loading
+17 −5
Original line number Original line Diff line number Diff line
@@ -673,11 +673,22 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
				break;
				break;
			}
			}
		}
		}
		if (hw->mac.type == ixgbe_mac_82598EB ||

		    (hw->phy.sfp_type != ixgbe_sfp_type_sr &&
		/* All DA cables are supported */
		     hw->phy.sfp_type != ixgbe_sfp_type_lr &&
		if (transmission_media & IXGBE_SFF_TWIN_AX_CAPABLE) {
		     hw->phy.sfp_type != ixgbe_sfp_type_srlr_core0 &&
			status = 0;
		     hw->phy.sfp_type != ixgbe_sfp_type_srlr_core1)) {
			goto out;
		}

		/* 1G SFP modules are not supported */
		if (comp_codes_10g == 0) {
			hw->phy.type = ixgbe_phy_sfp_unsupported;
			status = IXGBE_ERR_SFP_NOT_SUPPORTED;
			goto out;
		}

		/* Anything else 82598-based is supported */
		if (hw->mac.type == ixgbe_mac_82598EB) {
			status = 0;
			status = 0;
			goto out;
			goto out;
		}
		}
@@ -690,6 +701,7 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
				status = 0;
				status = 0;
			} else {
			} else {
				hw_dbg(hw, "SFP+ module not supported\n");
				hw_dbg(hw, "SFP+ module not supported\n");
				hw->phy.type = ixgbe_phy_sfp_unsupported;
				status = IXGBE_ERR_SFP_NOT_SUPPORTED;
				status = IXGBE_ERR_SFP_NOT_SUPPORTED;
			}
			}
		} else {
		} else {
+1 −0
Original line number Original line Diff line number Diff line
@@ -1904,6 +1904,7 @@ enum ixgbe_phy_type {
	ixgbe_phy_sfp_ftl,
	ixgbe_phy_sfp_ftl,
	ixgbe_phy_sfp_unknown,
	ixgbe_phy_sfp_unknown,
	ixgbe_phy_sfp_intel,
	ixgbe_phy_sfp_intel,
	ixgbe_phy_sfp_unsupported,
	ixgbe_phy_generic
	ixgbe_phy_generic
};
};