X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fixgbe%2Fbase%2Fixgbe_x550.c;h=8810d1658e919ba93d3d9ed6fe208045c6d986e0;hb=8716f9942a408a79a114ac0496e4e7d55bc9944c;hp=d3363ff1d42b73c37c56915a15ed6d6995a20307;hpb=d8e52b2cf771c31b523b46852fd86225b5a2c721;p=dpdk.git diff --git a/drivers/net/ixgbe/base/ixgbe_x550.c b/drivers/net/ixgbe/base/ixgbe_x550.c index d3363ff1d4..8810d1658e 100644 --- a/drivers/net/ixgbe/base/ixgbe_x550.c +++ b/drivers/net/ixgbe/base/ixgbe_x550.c @@ -1642,7 +1642,6 @@ STATIC s32 ixgbe_restart_an_internal_phy_x550em(struct ixgbe_hw *hw) return status; } -#ifndef PREBOOT_SUPPORT /** * ixgbe_setup_sgmii - Set up link for sgmii * @hw: pointer to hardware structure @@ -1712,7 +1711,6 @@ STATIC s32 ixgbe_setup_sgmii(struct ixgbe_hw *hw, ixgbe_link_speed speed, return hw->phy.ops.setup_link_speed(hw, speed, autoneg_wait); } -#endif /* PREBOOT_SUPPORT */ /** * ixgbe_setup_sgmii_fw - Set up link for internal PHY SGMII auto-negotiation * @hw: pointer to hardware structure @@ -1837,11 +1835,7 @@ void ixgbe_init_mac_link_ops_X550em(struct ixgbe_hw *hw) case ixgbe_media_type_backplane: if (hw->device_id == IXGBE_DEV_ID_X550EM_A_SGMII || hw->device_id == IXGBE_DEV_ID_X550EM_A_SGMII_L) -#ifdef PREBOOT_SUPPORT - mac->ops.setup_link = ixgbe_setup_sgmii_fw; -#else mac->ops.setup_link = ixgbe_setup_sgmii; -#endif /* PREBOOT_SUPPORT */ break; default: break; @@ -1900,18 +1894,8 @@ s32 ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw, *autoneg = false; break; case ixgbe_phy_ext_1g_t: -#ifdef PREBOOT_SUPPORT - *speed = IXGBE_LINK_SPEED_1GB_FULL; - break; -#endif /* PREBOOT_SUPPORT */ case ixgbe_phy_sgmii: -#ifdef PREBOOT_SUPPORT - *speed = IXGBE_LINK_SPEED_1GB_FULL | - IXGBE_LINK_SPEED_100_FULL | - IXGBE_LINK_SPEED_10_FULL; -#else *speed = IXGBE_LINK_SPEED_1GB_FULL; -#endif /* PREBOOT_SUPPORT */ break; case ixgbe_phy_x550em_kr: if (hw->mac.type == ixgbe_mac_X550EM_a) { @@ -3126,6 +3110,7 @@ s32 ixgbe_read_ee_hostif_X550(struct ixgbe_hw *hw, u16 offset, u16 *data) /* one word */ buffer.length = IXGBE_CPU_TO_BE16(sizeof(u16)); buffer.pad2 = 0; + buffer.data = 0; buffer.pad3 = 0; status = hw->mac.ops.acquire_swfw_sync(hw, mask); @@ -3186,6 +3171,7 @@ s32 ixgbe_read_ee_hostif_buffer_X550(struct ixgbe_hw *hw, buffer.address = IXGBE_CPU_TO_BE32((offset + current_word) * 2); buffer.length = IXGBE_CPU_TO_BE16(words_to_read * 2); buffer.pad2 = 0; + buffer.data = 0; buffer.pad3 = 0; status = ixgbe_hic_unlocked(hw, (u32 *)&buffer, sizeof(buffer), @@ -3246,7 +3232,18 @@ s32 ixgbe_write_ee_hostif_data_X550(struct ixgbe_hw *hw, u16 offset, status = ixgbe_host_interface_command(hw, (u32 *)&buffer, sizeof(buffer), - IXGBE_HI_COMMAND_TIMEOUT, false); + IXGBE_HI_COMMAND_TIMEOUT, true); + if (status != IXGBE_SUCCESS) { + DEBUGOUT2("for offset %04x failed with status %d\n", + offset, status); + return status; + } + + if (buffer.hdr.rsp.buf_lenh_status != FW_CEM_RESP_STATUS_SUCCESS) { + DEBUGOUT2("for offset %04x host interface return status %02x\n", + offset, buffer.hdr.rsp.buf_lenh_status); + return IXGBE_ERR_HOST_INTERFACE_COMMAND; + } return status; } @@ -3660,13 +3657,7 @@ u64 ixgbe_get_supported_physical_layer_X550em(struct ixgbe_hw *hw) physical_layer |= IXGBE_PHYSICAL_LAYER_10BASE_T; break; case ixgbe_phy_sgmii: -#ifdef PREBOOT_SUPPORT - physical_layer = IXGBE_PHYSICAL_LAYER_1000BASE_KX | - IXGBE_PHYSICAL_LAYER_100BASE_TX | - IXGBE_PHYSICAL_LAYER_10BASE_T; -#else physical_layer = IXGBE_PHYSICAL_LAYER_1000BASE_KX; -#endif /* PREBOOT_SUPPORT */ break; case ixgbe_phy_ext_1g_t: physical_layer |= IXGBE_PHYSICAL_LAYER_1000BASE_T;