diff --git sys/dev/ixgbe/ixgbe_x550.c sys/dev/ixgbe/ixgbe_x550.c index 1199d38..071df89 100644 --- sys/dev/ixgbe/ixgbe_x550.c +++ sys/dev/ixgbe/ixgbe_x550.c @@ -323,28 +323,37 @@ static void ixgbe_setup_mux_ctl(struct ixgbe_hw *hw) } /** * ixgbe_identify_phy_x550em - Get PHY type based on device id * @hw: pointer to hardware structure * * Returns error code */ static s32 ixgbe_identify_phy_x550em(struct ixgbe_hw *hw) { + s32 ret_val; + switch (hw->device_id) { case IXGBE_DEV_ID_X550EM_X_SFP: /* set up for CS4227 usage */ hw->phy.phy_semaphore_mask = IXGBE_GSSR_SHARED_I2C_SM; ixgbe_setup_mux_ctl(hw); ixgbe_check_cs4227(hw); - return ixgbe_identify_module_generic(hw); + ret_val = ixgbe_identify_module_generic(hw); + + /* Set PHY type none if no SFP detected */ + if (ret_val == IXGBE_ERR_SFP_NOT_PRESENT) { + hw->phy.type = ixgbe_phy_none; + return IXGBE_SUCCESS; + } + return ret_val; break; case IXGBE_DEV_ID_X550EM_X_KX4: hw->phy.type = ixgbe_phy_x550em_kx4; break; case IXGBE_DEV_ID_X550EM_X_KR: hw->phy.type = ixgbe_phy_x550em_kr; break; case IXGBE_DEV_ID_X550EM_X_1G_T: case IXGBE_DEV_ID_X550EM_X_10G_T: return ixgbe_identify_phy_generic(hw);