From ac0fdeca9379ce2ceea7a626e63414cd5255238d Mon Sep 17 00:00:00 2001 From: Wenzhuo Lu Date: Wed, 24 Jun 2015 11:25:53 +0800 Subject: [PATCH] ixgbe/base: fix X550em link setup without SFP This patch updates the x550em SFP link setup by adding ixgbe_sfp_type_unknown and ixgbe_sfp_type_not_present case expression to the ixgbe_setup_mac_link_sfp_x550em SFP type switch statement. This handles the case when no module is present. Signed-off-by: Wenzhuo Lu Acked-by: Helin Zhang --- drivers/net/ixgbe/base/ixgbe_x550.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c b/drivers/net/ixgbe/base/ixgbe_x550.c index d9d8ab395b..3a0a7e8161 100644 --- a/drivers/net/ixgbe/base/ixgbe_x550.c +++ b/drivers/net/ixgbe/base/ixgbe_x550.c @@ -990,7 +990,7 @@ enum ixgbe_media_type ixgbe_get_media_type_X550em(struct ixgbe_hw *hw) } /** - * ixgbe_setup_sfp_modules_X550em - Setup SFP module + * ixgbe_setup_sfp_modules_X550em - Setup MAC link ops * @hw: pointer to hardware structure */ s32 ixgbe_setup_sfp_modules_X550em(struct ixgbe_hw *hw) @@ -1637,10 +1637,10 @@ STATIC s32 ixgbe_setup_ixfi_x550em(struct ixgbe_hw *hw, ixgbe_link_speed *speed) } /** - * ixgbe_setup_mac_link_sfp_x550em - Configure the KR PHY for SFP. + * ixgbe_setup_mac_link_sfp_x550em - Configure the CS4227 & KR PHY for SFP * @hw: pointer to hardware structure * - * Configures the integrated KR PHY for SFP support. + * Configure the external CS4227 PHY and the integrated KR PHY for SFP support. **/ s32 ixgbe_setup_mac_link_sfp_x550em(struct ixgbe_hw *hw, ixgbe_link_speed speed, @@ -1653,6 +1653,10 @@ s32 ixgbe_setup_mac_link_sfp_x550em(struct ixgbe_hw *hw, /* Configure the external PHY. */ switch (hw->phy.sfp_type) { + case ixgbe_sfp_type_unknown: + return IXGBE_ERR_SFP_NOT_SUPPORTED; + case ixgbe_sfp_type_not_present: + return IXGBE_SUCCESS; case ixgbe_sfp_type_da_cu_core0: case ixgbe_sfp_type_da_cu_core1: setup_linear = true; -- 2.20.1