ixgbe/base: remove lan id from phy struct
[dpdk.git] / lib / librte_pmd_ixgbe / ixgbe / ixgbe_x550.c
index 06d66dd..86cf691 100644 (file)
@@ -54,30 +54,30 @@ s32 ixgbe_init_ops_X550(struct ixgbe_hw *hw)
        DEBUGFUNC("ixgbe_init_ops_X550");
 
        ret_val = ixgbe_init_ops_X540(hw);
-       mac->ops.dmac_config = &ixgbe_dmac_config_X550;
-       mac->ops.dmac_config_tcs = &ixgbe_dmac_config_tcs_X550;
-       mac->ops.dmac_update_tcs = &ixgbe_dmac_update_tcs_X550;
-       mac->ops.setup_eee = &ixgbe_setup_eee_X550;
+       mac->ops.dmac_config = ixgbe_dmac_config_X550;
+       mac->ops.dmac_config_tcs = ixgbe_dmac_config_tcs_X550;
+       mac->ops.dmac_update_tcs = ixgbe_dmac_update_tcs_X550;
+       mac->ops.setup_eee = ixgbe_setup_eee_X550;
        mac->ops.set_source_address_pruning =
-                       &ixgbe_set_source_address_pruning_X550;
+                       ixgbe_set_source_address_pruning_X550;
        mac->ops.set_ethertype_anti_spoofing =
-                       &ixgbe_set_ethertype_anti_spoofing_X550;
-
-       mac->ops.get_rtrup2tc = &ixgbe_dcb_get_rtrup2tc_generic;
-       eeprom->ops.init_params = &ixgbe_init_eeprom_params_X550;
-       eeprom->ops.calc_checksum = &ixgbe_calc_eeprom_checksum_X550;
-       eeprom->ops.read = &ixgbe_read_ee_hostif_X550;
-       eeprom->ops.read_buffer = &ixgbe_read_ee_hostif_buffer_X550;
-       eeprom->ops.write = &ixgbe_write_ee_hostif_X550;
-       eeprom->ops.write_buffer = &ixgbe_write_ee_hostif_buffer_X550;
-       eeprom->ops.update_checksum = &ixgbe_update_eeprom_checksum_X550;
-       eeprom->ops.validate_checksum = &ixgbe_validate_eeprom_checksum_X550;
-
-       mac->ops.disable_mdd = &ixgbe_disable_mdd_X550;
-       mac->ops.enable_mdd = &ixgbe_enable_mdd_X550;
-       mac->ops.mdd_event = &ixgbe_mdd_event_X550;
-       mac->ops.restore_mdd_vf = &ixgbe_restore_mdd_vf_X550;
-       mac->ops.disable_rx = &ixgbe_disable_rx_x550;
+                       ixgbe_set_ethertype_anti_spoofing_X550;
+
+       mac->ops.get_rtrup2tc = ixgbe_dcb_get_rtrup2tc_generic;
+       eeprom->ops.init_params = ixgbe_init_eeprom_params_X550;
+       eeprom->ops.calc_checksum = ixgbe_calc_eeprom_checksum_X550;
+       eeprom->ops.read = ixgbe_read_ee_hostif_X550;
+       eeprom->ops.read_buffer = ixgbe_read_ee_hostif_buffer_X550;
+       eeprom->ops.write = ixgbe_write_ee_hostif_X550;
+       eeprom->ops.write_buffer = ixgbe_write_ee_hostif_buffer_X550;
+       eeprom->ops.update_checksum = ixgbe_update_eeprom_checksum_X550;
+       eeprom->ops.validate_checksum = ixgbe_validate_eeprom_checksum_X550;
+
+       mac->ops.disable_mdd = ixgbe_disable_mdd_X550;
+       mac->ops.enable_mdd = ixgbe_enable_mdd_X550;
+       mac->ops.mdd_event = ixgbe_mdd_event_X550;
+       mac->ops.restore_mdd_vf = ixgbe_restore_mdd_vf_X550;
+       mac->ops.disable_rx = ixgbe_disable_rx_x550;
        return ret_val;
 }
 
@@ -94,10 +94,8 @@ STATIC s32 ixgbe_identify_phy_x550em(struct ixgbe_hw *hw)
        switch (hw->device_id) {
        case IXGBE_DEV_ID_X550EM_X_SFP:
                /* set up for CS4227 usage */
-               hw->phy.lan_id = IXGBE_READ_REG(hw, IXGBE_STATUS) &
-                                IXGBE_STATUS_LAN_ID_1;
                hw->phy.phy_semaphore_mask = IXGBE_GSSR_SHARED_I2C_SM;
-               if (hw->phy.lan_id) {
+               if (hw->bus.lan_id) {
 
                        esdp &= ~(IXGBE_ESDP_SDP1_NATIVE | IXGBE_ESDP_SDP1);
                        esdp |= IXGBE_ESDP_SDP1_DIR;
@@ -173,35 +171,37 @@ s32 ixgbe_init_ops_X550EM(struct ixgbe_hw *hw)
        mac->ops.disable_sec_rx_path = NULL;
        mac->ops.enable_sec_rx_path = NULL;
 
-       /* PCIe bus info not supported in X550EM */
-       mac->ops.get_bus_info = NULL;
+       /* X550EM bus type is internal*/
+       hw->bus.type = ixgbe_bus_type_internal;
+       mac->ops.get_bus_info = ixgbe_get_bus_info_X550em;
 
        mac->ops.read_iosf_sb_reg = ixgbe_read_iosf_sb_reg_x550;
        mac->ops.write_iosf_sb_reg = ixgbe_write_iosf_sb_reg_x550;
-       mac->ops.get_media_type = &ixgbe_get_media_type_X550em;
-       mac->ops.setup_sfp = &ixgbe_setup_sfp_modules_X550em;
-       mac->ops.get_link_capabilities = &ixgbe_get_link_capabilities_X550em;
-       mac->ops.reset_hw = &ixgbe_reset_hw_X550em;
+       mac->ops.get_media_type = ixgbe_get_media_type_X550em;
+       mac->ops.setup_sfp = ixgbe_setup_sfp_modules_X550em;
+       mac->ops.get_link_capabilities = ixgbe_get_link_capabilities_X550em;
+       mac->ops.reset_hw = ixgbe_reset_hw_X550em;
        mac->ops.get_supported_physical_layer =
-                                   &ixgbe_get_supported_physical_layer_X550em;
+                                   ixgbe_get_supported_physical_layer_X550em;
 
        /* PHY */
-       phy->ops.init = &ixgbe_init_phy_ops_X550em;
-       phy->ops.identify = &ixgbe_identify_phy_x550em;
        phy->ops.read_reg = ixgbe_read_phy_reg_x550em;
        phy->ops.write_reg = ixgbe_write_phy_reg_x550em;
-       phy->ops.setup_link = ixgbe_setup_kr_x550em;
+       phy->ops.init = ixgbe_init_phy_ops_X550em;
+       phy->ops.identify = ixgbe_identify_phy_x550em;
+       if (mac->ops.get_media_type(hw) != ixgbe_media_type_copper)
+               phy->ops.set_phy_power = NULL;
 
 
        /* EEPROM */
-       eeprom->ops.init_params = &ixgbe_init_eeprom_params_X540;
-       eeprom->ops.read = &ixgbe_read_ee_hostif_X550;
-       eeprom->ops.read_buffer = &ixgbe_read_ee_hostif_buffer_X550;
-       eeprom->ops.write = &ixgbe_write_ee_hostif_X550;
-       eeprom->ops.write_buffer = &ixgbe_write_ee_hostif_buffer_X550;
-       eeprom->ops.update_checksum = &ixgbe_update_eeprom_checksum_X550;
-       eeprom->ops.validate_checksum = &ixgbe_validate_eeprom_checksum_X550;
-       eeprom->ops.calc_checksum = &ixgbe_calc_eeprom_checksum_X550;
+       eeprom->ops.init_params = ixgbe_init_eeprom_params_X540;
+       eeprom->ops.read = ixgbe_read_ee_hostif_X550;
+       eeprom->ops.read_buffer = ixgbe_read_ee_hostif_buffer_X550;
+       eeprom->ops.write = ixgbe_write_ee_hostif_X550;
+       eeprom->ops.write_buffer = ixgbe_write_ee_hostif_buffer_X550;
+       eeprom->ops.update_checksum = ixgbe_update_eeprom_checksum_X550;
+       eeprom->ops.validate_checksum = ixgbe_validate_eeprom_checksum_X550;
+       eeprom->ops.calc_checksum = ixgbe_calc_eeprom_checksum_X550;
 
        return ret_val;
 }
@@ -406,7 +406,7 @@ s32 ixgbe_setup_eee_X550(struct ixgbe_hw *hw, bool enable_eee)
                } else if (hw->device_id == IXGBE_DEV_ID_X550EM_X_KR ||
                           hw->device_id == IXGBE_DEV_ID_X550EM_X) {
                        status = ixgbe_read_iosf_sb_reg_x550(hw,
-                               IXGBE_KRM_LINK_CTRL_1(hw->phy.lan_id),
+                               IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id),
                                IXGBE_SB_IOSF_TARGET_KR_PHY, &link_reg);
                        if (status != IXGBE_SUCCESS)
                                return status;
@@ -415,7 +415,7 @@ s32 ixgbe_setup_eee_X550(struct ixgbe_hw *hw, bool enable_eee)
                                    IXGBE_KRM_LINK_CTRL_1_TETH_EEE_CAP_KX;
 
                        status = ixgbe_write_iosf_sb_reg_x550(hw,
-                               IXGBE_KRM_LINK_CTRL_1(hw->phy.lan_id),
+                               IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id),
                                IXGBE_SB_IOSF_TARGET_KR_PHY, link_reg);
                        if (status != IXGBE_SUCCESS)
                                return status;
@@ -437,7 +437,7 @@ s32 ixgbe_setup_eee_X550(struct ixgbe_hw *hw, bool enable_eee)
                } else if (hw->device_id == IXGBE_DEV_ID_X550EM_X_KR ||
                           hw->device_id == IXGBE_DEV_ID_X550EM_X) {
                        status = ixgbe_read_iosf_sb_reg_x550(hw,
-                               IXGBE_KRM_LINK_CTRL_1(hw->phy.lan_id),
+                               IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id),
                                IXGBE_SB_IOSF_TARGET_KR_PHY, &link_reg);
                        if (status != IXGBE_SUCCESS)
                                return status;
@@ -446,7 +446,7 @@ s32 ixgbe_setup_eee_X550(struct ixgbe_hw *hw, bool enable_eee)
                                IXGBE_KRM_LINK_CTRL_1_TETH_EEE_CAP_KX);
 
                        status = ixgbe_write_iosf_sb_reg_x550(hw,
-                               IXGBE_KRM_LINK_CTRL_1(hw->phy.lan_id),
+                               IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id),
                                IXGBE_SB_IOSF_TARGET_KR_PHY, link_reg);
                        if (status != IXGBE_SUCCESS)
                                return status;
@@ -543,7 +543,7 @@ s32 ixgbe_write_iosf_sb_reg_x550(struct ixgbe_hw *hw, u32 reg_addr,
                        break;
        }
 
-       if ((command & IXGBE_SB_IOSF_CTRL_CMPL_ERR_MASK) != 0) {
+       if ((command & IXGBE_SB_IOSF_CTRL_RESP_STAT_MASK) != 0) {
                error = (command & IXGBE_SB_IOSF_CTRL_CMPL_ERR_MASK) >>
                         IXGBE_SB_IOSF_CTRL_CMPL_ERR_SHIFT;
                ERROR_REPORT2(IXGBE_ERROR_POLLING,
@@ -591,7 +591,7 @@ s32 ixgbe_read_iosf_sb_reg_x550(struct ixgbe_hw *hw, u32 reg_addr,
                        break;
        }
 
-       if ((command & IXGBE_SB_IOSF_CTRL_CMPL_ERR_MASK) != 0) {
+       if ((command & IXGBE_SB_IOSF_CTRL_RESP_STAT_MASK) != 0) {
                error = (command & IXGBE_SB_IOSF_CTRL_CMPL_ERR_MASK) >>
                         IXGBE_SB_IOSF_CTRL_CMPL_ERR_SHIFT;
                ERROR_REPORT2(IXGBE_ERROR_POLLING,
@@ -789,6 +789,7 @@ s32 ixgbe_setup_sfp_modules_X550em(struct ixgbe_hw *hw)
 {
        bool setup_linear;
        u16 reg_slice, edc_mode;
+       s32 ret_val;
 
        DEBUGFUNC("ixgbe_setup_sfp_modules_X550em");
 
@@ -819,9 +820,9 @@ s32 ixgbe_setup_sfp_modules_X550em(struct ixgbe_hw *hw)
        hw->phy.ops.reset = NULL;
 
        /* The CS4227 slice address is the base address + the port-pair reg
-        * offset. I.e. Slice 0 = 0x0000 and slice 1 = 0x1000.
+        * offset. I.e. Slice 0 = 0x12B0 and slice 1 = 0x22B0.
         */
-       reg_slice = IXGBE_CS4227_SPARE24_LSB + (hw->phy.lan_id << 12);
+       reg_slice = IXGBE_CS4227_SPARE24_LSB + (hw->bus.lan_id << 12);
 
        if (setup_linear)
                edc_mode = (IXGBE_CS4227_EDC_MODE_CX1 << 1) | 0x1;
@@ -829,8 +830,14 @@ s32 ixgbe_setup_sfp_modules_X550em(struct ixgbe_hw *hw)
                edc_mode = (IXGBE_CS4227_EDC_MODE_SR << 1) | 0x1;
 
        /* Configure CS4227 for connection type. */
-       return hw->phy.ops.write_i2c_combined(hw, IXGBE_CS4227,
-                                             reg_slice, edc_mode);
+       ret_val = ixgbe_write_i2c_combined(hw, IXGBE_CS4227, reg_slice,
+                                          edc_mode);
+
+       if (ret_val != IXGBE_SUCCESS)
+               ret_val = ixgbe_write_i2c_combined(hw, 0x80, reg_slice,
+                                                  edc_mode);
+
+       return ret_val;
 }
 
 /**
@@ -882,13 +889,13 @@ s32 ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw,
 
                /* Link capabilities are based on SFP */
                if (hw->phy.multispeed_fiber)
-                       *speed |= IXGBE_LINK_SPEED_10GB_FULL |
-                                 IXGBE_LINK_SPEED_1GB_FULL;
+                       *speed = IXGBE_LINK_SPEED_10GB_FULL |
+                                IXGBE_LINK_SPEED_1GB_FULL;
                else
                        *speed = IXGBE_LINK_SPEED_10GB_FULL;
        } else {
-               *speed |= IXGBE_LINK_SPEED_10GB_FULL |
-                         IXGBE_LINK_SPEED_1GB_FULL;
+               *speed = IXGBE_LINK_SPEED_10GB_FULL |
+                        IXGBE_LINK_SPEED_1GB_FULL;
                *autoneg = true;
        }
 
@@ -913,10 +920,9 @@ s32 ixgbe_init_phy_ops_X550em(struct ixgbe_hw *hw)
 
        if (hw->device_id == IXGBE_DEV_ID_X550EM_X_SFP) {
                esdp = IXGBE_READ_REG(hw, IXGBE_ESDP);
-               phy->lan_id = IXGBE_READ_REG(hw, IXGBE_STATUS) &
-                             IXGBE_STATUS_LAN_ID_1;
                phy->phy_semaphore_mask = IXGBE_GSSR_SHARED_I2C_SM;
-               if (phy->lan_id) {
+
+               if (hw->bus.lan_id) {
                        esdp &= ~(IXGBE_ESDP_SDP1_NATIVE | IXGBE_ESDP_SDP1);
                        esdp |= IXGBE_ESDP_SDP1_DIR;
                }
@@ -1058,8 +1064,10 @@ s32 ixgbe_setup_kr_x550em(struct ixgbe_hw *hw)
        u32 reg_val;
 
        status = ixgbe_read_iosf_sb_reg_x550(hw,
-               IXGBE_KRM_LINK_CTRL_1(hw->phy.lan_id),
+               IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id),
                IXGBE_SB_IOSF_TARGET_KR_PHY, &reg_val);
+       if (status)
+               return status;
 
        reg_val |= IXGBE_KRM_LINK_CTRL_1_TETH_AN_ENABLE;
        reg_val |= IXGBE_KRM_LINK_CTRL_1_TETH_AN_FEC_REQ;
@@ -1078,7 +1086,7 @@ s32 ixgbe_setup_kr_x550em(struct ixgbe_hw *hw)
        /* Restart auto-negotiation. */
        reg_val |= IXGBE_KRM_LINK_CTRL_1_TETH_AN_RESTART;
        status = ixgbe_write_iosf_sb_reg_x550(hw,
-               IXGBE_KRM_LINK_CTRL_1(hw->phy.lan_id),
+               IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id),
                IXGBE_SB_IOSF_TARGET_KR_PHY, reg_val);
 
        return status;
@@ -1097,35 +1105,36 @@ s32 ixgbe_setup_ixfi_x550em(struct ixgbe_hw *hw)
 
        /* Disable AN and force speed to 10G Serial. */
        status = ixgbe_read_iosf_sb_reg_x550(hw,
-                                       IXGBE_KRM_LINK_CTRL_1(hw->phy.lan_id),
+                                       IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id),
                                        IXGBE_SB_IOSF_TARGET_KR_PHY, &reg_val);
        if (status != IXGBE_SUCCESS)
                return status;
+
        reg_val &= ~IXGBE_KRM_LINK_CTRL_1_TETH_AN_ENABLE;
        reg_val &= ~IXGBE_KRM_LINK_CTRL_1_TETH_FORCE_SPEED_MASK;
        reg_val |= IXGBE_KRM_LINK_CTRL_1_TETH_FORCE_SPEED_10G;
        status = ixgbe_write_iosf_sb_reg_x550(hw,
-                                       IXGBE_KRM_LINK_CTRL_1(hw->phy.lan_id),
+                                       IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id),
                                        IXGBE_SB_IOSF_TARGET_KR_PHY, reg_val);
        if (status != IXGBE_SUCCESS)
                return status;
 
        /* Disable training protocol FSM. */
        status = ixgbe_read_iosf_sb_reg_x550(hw,
-                               IXGBE_KRM_RX_TRN_LINKUP_CTRL(hw->phy.lan_id),
+                               IXGBE_KRM_RX_TRN_LINKUP_CTRL(hw->bus.lan_id),
                                IXGBE_SB_IOSF_TARGET_KR_PHY, &reg_val);
        if (status != IXGBE_SUCCESS)
                return status;
        reg_val |= IXGBE_KRM_RX_TRN_LINKUP_CTRL_CONV_WO_PROTOCOL;
        status = ixgbe_write_iosf_sb_reg_x550(hw,
-                               IXGBE_KRM_RX_TRN_LINKUP_CTRL(hw->phy.lan_id),
+                               IXGBE_KRM_RX_TRN_LINKUP_CTRL(hw->bus.lan_id),
                                IXGBE_SB_IOSF_TARGET_KR_PHY, reg_val);
        if (status != IXGBE_SUCCESS)
                return status;
 
        /* Disable Flex from training TXFFE. */
        status = ixgbe_read_iosf_sb_reg_x550(hw,
-                               IXGBE_KRM_DSP_TXFFE_STATE_4(hw->phy.lan_id),
+                               IXGBE_KRM_DSP_TXFFE_STATE_4(hw->bus.lan_id),
                                IXGBE_SB_IOSF_TARGET_KR_PHY, &reg_val);
        if (status != IXGBE_SUCCESS)
                return status;
@@ -1133,12 +1142,12 @@ s32 ixgbe_setup_ixfi_x550em(struct ixgbe_hw *hw)
        reg_val &= ~IXGBE_KRM_DSP_TXFFE_STATE_CP1_CN1_EN;
        reg_val &= ~IXGBE_KRM_DSP_TXFFE_STATE_CO_ADAPT_EN;
        status = ixgbe_write_iosf_sb_reg_x550(hw,
-                               IXGBE_KRM_DSP_TXFFE_STATE_4(hw->phy.lan_id),
+                               IXGBE_KRM_DSP_TXFFE_STATE_4(hw->bus.lan_id),
                                IXGBE_SB_IOSF_TARGET_KR_PHY, reg_val);
        if (status != IXGBE_SUCCESS)
                return status;
        status = ixgbe_read_iosf_sb_reg_x550(hw,
-                               IXGBE_KRM_DSP_TXFFE_STATE_5(hw->phy.lan_id),
+                               IXGBE_KRM_DSP_TXFFE_STATE_5(hw->bus.lan_id),
                                IXGBE_SB_IOSF_TARGET_KR_PHY, &reg_val);
        if (status != IXGBE_SUCCESS)
                return status;
@@ -1146,14 +1155,14 @@ s32 ixgbe_setup_ixfi_x550em(struct ixgbe_hw *hw)
        reg_val &= ~IXGBE_KRM_DSP_TXFFE_STATE_CP1_CN1_EN;
        reg_val &= ~IXGBE_KRM_DSP_TXFFE_STATE_CO_ADAPT_EN;
        status = ixgbe_write_iosf_sb_reg_x550(hw,
-                               IXGBE_KRM_DSP_TXFFE_STATE_5(hw->phy.lan_id),
+                               IXGBE_KRM_DSP_TXFFE_STATE_5(hw->bus.lan_id),
                                IXGBE_SB_IOSF_TARGET_KR_PHY, reg_val);
        if (status != IXGBE_SUCCESS)
                return status;
 
        /* Enable override for coefficients. */
        status = ixgbe_read_iosf_sb_reg_x550(hw,
-                               IXGBE_KRM_TX_COEFF_CTRL_1(hw->phy.lan_id),
+                               IXGBE_KRM_TX_COEFF_CTRL_1(hw->bus.lan_id),
                                IXGBE_SB_IOSF_TARGET_KR_PHY, &reg_val);
        if (status != IXGBE_SUCCESS)
                return status;
@@ -1162,20 +1171,20 @@ s32 ixgbe_setup_ixfi_x550em(struct ixgbe_hw *hw)
        reg_val |= IXGBE_KRM_TX_COEFF_CTRL_1_CPLUS1_OVRRD_EN;
        reg_val |= IXGBE_KRM_TX_COEFF_CTRL_1_CMINUS1_OVRRD_EN;
        status = ixgbe_write_iosf_sb_reg_x550(hw,
-                               IXGBE_KRM_TX_COEFF_CTRL_1(hw->phy.lan_id),
+                               IXGBE_KRM_TX_COEFF_CTRL_1(hw->bus.lan_id),
                                IXGBE_SB_IOSF_TARGET_KR_PHY, reg_val);
        if (status != IXGBE_SUCCESS)
                return status;
 
        /* Toggle port SW reset by AN reset. */
        status = ixgbe_read_iosf_sb_reg_x550(hw,
-                                       IXGBE_KRM_LINK_CTRL_1(hw->phy.lan_id),
+                                       IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id),
                                        IXGBE_SB_IOSF_TARGET_KR_PHY, &reg_val);
        if (status != IXGBE_SUCCESS)
                return status;
        reg_val |= IXGBE_KRM_LINK_CTRL_1_TETH_AN_RESTART;
        status = ixgbe_write_iosf_sb_reg_x550(hw,
-                                       IXGBE_KRM_LINK_CTRL_1(hw->phy.lan_id),
+                                       IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id),
                                        IXGBE_SB_IOSF_TARGET_KR_PHY, reg_val);
 
        return status;
@@ -1194,7 +1203,7 @@ s32 ixgbe_setup_phy_loopback_x550em(struct ixgbe_hw *hw)
 
        /* Disable AN and force speed to 10G Serial. */
        status = ixgbe_read_iosf_sb_reg_x550(hw,
-               IXGBE_KRM_LINK_CTRL_1(hw->phy.lan_id),
+               IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id),
                IXGBE_SB_IOSF_TARGET_KR_PHY, &reg_val);
        if (status != IXGBE_SUCCESS)
                return status;
@@ -1202,47 +1211,47 @@ s32 ixgbe_setup_phy_loopback_x550em(struct ixgbe_hw *hw)
        reg_val &= ~IXGBE_KRM_LINK_CTRL_1_TETH_FORCE_SPEED_MASK;
        reg_val |= IXGBE_KRM_LINK_CTRL_1_TETH_FORCE_SPEED_10G;
        status = ixgbe_write_iosf_sb_reg_x550(hw,
-               IXGBE_KRM_LINK_CTRL_1(hw->phy.lan_id),
+               IXGBE_KRM_LINK_CTRL_1(hw->bus.lan_id),
                IXGBE_SB_IOSF_TARGET_KR_PHY, reg_val);
        if (status != IXGBE_SUCCESS)
                return status;
 
        /* Set near-end loopback clocks. */
        status = ixgbe_read_iosf_sb_reg_x550(hw,
-               IXGBE_KRM_PORT_CAR_GEN_CTRL(hw->phy.lan_id),
+               IXGBE_KRM_PORT_CAR_GEN_CTRL(hw->bus.lan_id),
                IXGBE_SB_IOSF_TARGET_KR_PHY, &reg_val);
        if (status != IXGBE_SUCCESS)
                return status;
        reg_val |= IXGBE_KRM_PORT_CAR_GEN_CTRL_NELB_32B;
        reg_val |= IXGBE_KRM_PORT_CAR_GEN_CTRL_NELB_KRPCS;
        status = ixgbe_write_iosf_sb_reg_x550(hw,
-               IXGBE_KRM_PORT_CAR_GEN_CTRL(hw->phy.lan_id),
+               IXGBE_KRM_PORT_CAR_GEN_CTRL(hw->bus.lan_id),
                IXGBE_SB_IOSF_TARGET_KR_PHY, reg_val);
        if (status != IXGBE_SUCCESS)
                return status;
 
        /* Set loopback enable. */
        status = ixgbe_read_iosf_sb_reg_x550(hw,
-               IXGBE_KRM_PMD_DFX_BURNIN(hw->phy.lan_id),
+               IXGBE_KRM_PMD_DFX_BURNIN(hw->bus.lan_id),
                IXGBE_SB_IOSF_TARGET_KR_PHY, &reg_val);
        if (status != IXGBE_SUCCESS)
                return status;
        reg_val |= IXGBE_KRM_PMD_DFX_BURNIN_TX_RX_KR_LB_MASK;
        status = ixgbe_write_iosf_sb_reg_x550(hw,
-               IXGBE_KRM_PMD_DFX_BURNIN(hw->phy.lan_id),
+               IXGBE_KRM_PMD_DFX_BURNIN(hw->bus.lan_id),
                IXGBE_SB_IOSF_TARGET_KR_PHY, reg_val);
        if (status != IXGBE_SUCCESS)
                return status;
 
        /* Training bypass. */
        status = ixgbe_read_iosf_sb_reg_x550(hw,
-               IXGBE_KRM_RX_TRN_LINKUP_CTRL(hw->phy.lan_id),
+               IXGBE_KRM_RX_TRN_LINKUP_CTRL(hw->bus.lan_id),
                IXGBE_SB_IOSF_TARGET_KR_PHY, &reg_val);
        if (status != IXGBE_SUCCESS)
                return status;
        reg_val |= IXGBE_KRM_RX_TRN_LINKUP_CTRL_PROTOCOL_BYPASS;
        status = ixgbe_write_iosf_sb_reg_x550(hw,
-               IXGBE_KRM_RX_TRN_LINKUP_CTRL(hw->phy.lan_id),
+               IXGBE_KRM_RX_TRN_LINKUP_CTRL(hw->bus.lan_id),
                IXGBE_SB_IOSF_TARGET_KR_PHY, reg_val);
 
        return status;
@@ -1620,8 +1629,7 @@ s32 ixgbe_calc_eeprom_checksum_X550(struct ixgbe_hw *hw)
  *  Performs checksum calculation and validates the EEPROM checksum.  If the
  *  caller does not need checksum_val, the value can be NULL.
  **/
-s32 ixgbe_validate_eeprom_checksum_X550(struct ixgbe_hw *hw,
-                                       u16 *checksum_val)
+s32 ixgbe_validate_eeprom_checksum_X550(struct ixgbe_hw *hw, u16 *checksum_val)
 {
        s32 status;
        u16 checksum;
@@ -1764,6 +1772,24 @@ u32 ixgbe_get_supported_physical_layer_X550em(struct ixgbe_hw *hw)
        return physical_layer;
 }
 
+/**
+ * ixgbe_get_bus_info_x550em - Set PCI bus info
+ * @hw: pointer to hardware structure
+ *
+ * Sets bus link width and speed to unknown because X550em is
+ * not a PCI device.
+ **/
+s32 ixgbe_get_bus_info_X550em(struct ixgbe_hw *hw)
+{
+
+       DEBUGFUNC("ixgbe_get_bus_info_x550em");
+
+       hw->bus.width = ixgbe_bus_width_unknown;
+       hw->bus.speed = ixgbe_bus_speed_unknown;
+
+       return IXGBE_SUCCESS;
+}
+
 /**
  * ixgbe_disable_rx_x550 - Disable RX unit
  *
@@ -1791,7 +1817,7 @@ void ixgbe_disable_rx_x550(struct ixgbe_hw *hw)
                fw_cmd.hdr.cmd = FW_DISABLE_RXEN_CMD;
                fw_cmd.hdr.buf_len = FW_DISABLE_RXEN_LEN;
                fw_cmd.hdr.checksum = FW_DEFAULT_CHECKSUM;
-               fw_cmd.port_number = hw->phy.lan_id;
+               fw_cmd.port_number = (u8)hw->bus.lan_id;
 
                status = ixgbe_host_interface_command(hw, (u32 *)&fw_cmd,
                                        sizeof(struct ixgbe_hic_disable_rxen),