Update IXGBE base codes
cover Update IXGBE base codes
This patch set update IXGBE base codes to the version of cid-10g-shared-code.2015.02.03. and this patch set add 2 new device id as following:
#define IXGBE_DEV_ID_X550EM_X_10G_T 0x15AD
#define IXGBE_DEV_ID_X550EM_X_1G_T 0x15AE
Changchun Ouyang (36):
ixgbe base codes: Code cleanup and minor changes ixgbe base codes: Debug output macro
ixgbe base codes: Fix bus type issue
ixgbe base codes: Fix link speed issue
ixgbe base codes: Fix early return
ixgbe base codes: Update the CS address
ixgbe base codes: Extract function for management capability ixgbe base codes: Set phy power
ixgbe base codes: Use mng present function
ixgbe base codes: Get host interface command status ixgbe base codes: Refine function for host interface command ixgbe base codes: Refine struct for physical information ixgbe base codes: Clear Tx pending
ixgbe base codes: Use IOMEM
ixgbe base codes: Update macros
ixgbe base codes: New phy ID
ixgbe base codes: Get bus info
ixgbe base codes: Restructure host interface command ixgbe base codes: Fix mac type issue
ixgbe base codes: API for setup internal phy
ixgbe base codes: API for set phy power
ixgbe base codes: API for read i2c combined
ixgbe base codes: API for write i2c combined
ixgbe base codes: Support 5G link speed
ixgbe base codes: Refine branch statement
ixgbe base codes: SFP probe
ixgbe base codes: Set LAN ID
ixgbe base codes: Calculate checksum
ixgbe base codes: Command for flow director
ixgbe base codes: Auto-negotiation
ixgbe base codes: Bit-bang mode
ixgbe base codes: Setup kx4 phy
ixgbe base codes: Read/write iosf sb stat
ixgbe base codes: New device id
ixgbe base codes: Update readme
eal: Add 2 device ids for ixgbe
lib/librte_eal/common/include/rte_pci_dev_ids.h | 6 +- lib/librte_pmd_ixgbe/ixgbe/README | 2 +- lib/librte_pmd_ixgbe/ixgbe/ixgbe_82598.c | 55 ++- lib/librte_pmd_ixgbe/ixgbe/ixgbe_82598.h | 1 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c | 237 +++++----- lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.h | 1 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.c | 61 ++- lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.h | 5 +- lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c | 189 +++++--- lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.h | 5 +- lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb.c | 1 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb.h | 2 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb_82598.c | 1 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb_82598.h | 1 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb_82599.c | 3 +- lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb_82599.h | 1 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_osdep.h | 4 +- lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c | 220 +++++++-- lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.h | 7 +- lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h | 131 +++++- lib/librte_pmd_ixgbe/ixgbe/ixgbe_vf.c | 1 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_vf.h | 5 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_x540.c | 82 ++-- lib/librte_pmd_ixgbe/ixgbe/ixgbe_x540.h | 1 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c | 582 ++++++++++++++++++------ lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.h | 9 +- 26 files changed, 1158 insertions(+), 455 deletions(-)
Signature · 1 line
1.8.4.2
A message that is not in the archive (sent off-list or not yet received): 1423742468-30404-1-git-send-email-changchun.ouyang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
PATCH 1/36 ixgbe base codes: Code cleanup and minor changes
Remove '&' before function name;
Adjust the spaces etc.
--- lib/librte_pmd_ixgbe/ixgbe/ixgbe_82598.c | 55 +++++++------- lib/librte_pmd_ixgbe/ixgbe/ixgbe_82598.h | 1 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c | 105 +++++++++++++-------------- lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.h | 1 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.c | 1 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.h | 1 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c | 73 +++++++++---------- lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.h | 1 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb.c | 1 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb.h | 2 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb_82598.c | 1 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb_82598.h | 1 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb_82599.c | 1 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb_82599.h | 1 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_osdep.h | 2 +- lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c | 37 +++++----- lib/librte_pmd_ixgbe/ixgbe/ixgbe_vf.c | 1 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_vf.h | 5 -- lib/librte_pmd_ixgbe/ixgbe/ixgbe_x540.c | 78 ++++++++++---------- lib/librte_pmd_ixgbe/ixgbe/ixgbe_x540.h | 1 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c | 73 +++++++++---------- lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.h | 3 +- 22 files changed, 210 insertions(+), 235 deletions(-)
lib/librte_pmd_ixgbe/ixgbe/ixgbe_82598.c +27 -28
@@ -36,7 +36,6 @@ POSSIBILITY OF SUCH DAMAGE.#include "ixgbe_api.h" #include "ixgbe_common.h" #include "ixgbe_phy.h" -#ident "$Id: ixgbe_82598.c,v 1.199 2013/05/22 23:26:31 jtkirshe Exp $"#define IXGBE_82598_MAX_TX_QUEUES 32#define IXGBE_82598_MAX_RX_QUEUES 64
@@ -128,29 +127,29 @@ s32 ixgbe_init_ops_82598(struct ixgbe_hw *hw) ret_val =ixgbe_init_ops_generic (hw);/* PHY */ - phy->ops.init = &ixgbe_init_phy_ops_82598; + phy->ops.init = ixgbe_init_phy_ops_82598;/* MAC */ - mac->ops.start_hw = &ixgbe_start_hw_82598; - mac->ops.enable_relaxed_ordering = &ixgbe_enable_relaxed_ordering_82598; - mac->ops.reset_hw = &ixgbe_reset_hw_82598; - mac->ops.get_media_type = &ixgbe_get_media_type_82598; + mac->ops.start_hw = ixgbe_start_hw_82598; + mac->ops.enable_relaxed_ordering = ixgbe_enable_relaxed_ordering_82598; + mac->ops.reset_hw = ixgbe_reset_hw_82598; + mac->ops.get_media_type = ixgbe_get_media_type_82598; mac->ops.get_supported_physical_layer = - &ixgbe_get_supported_physical_layer_82598; - mac->ops.read_analog_reg8 = &ixgbe_read_analog_reg8_82598; - mac->ops.write_analog_reg8 = &ixgbe_write_analog_reg8_82598; - mac->ops.set_lan_id = &ixgbe_set_lan_id_multi_port_pcie_82598; - mac->ops.enable_rx_dma = &ixgbe_enable_rx_dma_82598; + ixgbe_get_supported_physical_layer_82598; + mac->ops.read_analog_reg8 = ixgbe_read_analog_reg8_82598; + mac->ops.write_analog_reg8 = ixgbe_write_analog_reg8_82598; + mac->ops.set_lan_id = ixgbe_set_lan_id_multi_port_pcie_82598; + mac->ops.enable_rx_dma = ixgbe_enable_rx_dma_82598;/* RAR, Multicast, VLAN */ - mac->ops.set_vmdq = &ixgbe_set_vmdq_82598; - mac->ops.clear_vmdq = &ixgbe_clear_vmdq_82598; - mac->ops.set_vfta = &ixgbe_set_vfta_82598; + mac->ops.set_vmdq = ixgbe_set_vmdq_82598; + mac->ops.clear_vmdq = ixgbe_clear_vmdq_82598; + mac->ops.set_vfta = ixgbe_set_vfta_82598; mac->ops.set_vlvf =NULL ; - mac->ops.clear_vfta = &ixgbe_clear_vfta_82598; + mac->ops.clear_vfta = ixgbe_clear_vfta_82598;/* Flow Control */ - mac->ops.fc_enable = &ixgbe_fc_enable_82598; + mac->ops.fc_enable = ixgbe_fc_enable_82598; mac->mcft_size =IXGBE_82598_MC_TBL_SIZE ; mac->vft_size =IXGBE_82598_VFT_TBL_SIZE ;
@@ -161,15 +160,15 @@ s32 ixgbe_init_ops_82598(struct ixgbe_hw *hw) mac->max_msix_vectors =ixgbe_get_pcie_msix_count_generic (hw);/* SFP+ Module */ - phy->ops.read_i2c_eeprom = &ixgbe_read_i2c_eeprom_82598; - phy->ops.read_i2c_sff8472 = &ixgbe_read_i2c_sff8472_82598; + phy->ops.read_i2c_eeprom = ixgbe_read_i2c_eeprom_82598; + phy->ops.read_i2c_sff8472 = ixgbe_read_i2c_sff8472_82598;/* Link */ - mac->ops.check_link = &ixgbe_check_mac_link_82598; - mac->ops.setup_link = &ixgbe_setup_mac_link_82598; + mac->ops.check_link = ixgbe_check_mac_link_82598; + mac->ops.setup_link = ixgbe_setup_mac_link_82598; mac->ops.flap_tx_laser =NULL ; - mac->ops.get_link_capabilities = &ixgbe_get_link_capabilities_82598; - mac->ops.setup_rxpba = &ixgbe_set_rxpba_82598; + mac->ops.get_link_capabilities = ixgbe_get_link_capabilities_82598; + mac->ops.setup_rxpba = ixgbe_set_rxpba_82598;/* Manageability interface */ mac->ops.set_fw_drv_ver =NULL ;
@@ -202,20 +201,20 @@ s32 ixgbe_init_phy_ops_82598(struct ixgbe_hw *hw)/* Overwrite the link function pointers if copper PHY */ if (mac->ops.get_media_type (hw) == ixgbe_media_type_copper) { - mac->ops.setup_link = &ixgbe_setup_copper_link_82598; + mac->ops.setup_link = ixgbe_setup_copper_link_82598; mac->ops.get_link_capabilities = - &ixgbe_get_copper_link_capabilities_generic; + ixgbe_get_copper_link_capabilities_generic; }switch (hw->phy.type) {case ixgbe_phy_tn: - phy->ops.setup_link = &ixgbe_setup_phy_link_tnx; - phy->ops.check_link = &ixgbe_check_phy_link_tnx; + phy->ops.setup_link = ixgbe_setup_phy_link_tnx; + phy->ops.check_link = ixgbe_check_phy_link_tnx; phy->ops.get_firmware_version = - &ixgbe_get_phy_firmware_version_tnx; + ixgbe_get_phy_firmware_version_tnx;break ;case ixgbe_phy_nl: - phy->ops.reset = &ixgbe_reset_phy_nl; + phy->ops.reset = ixgbe_reset_phy_nl;/* Call SFP+ identify routine to get the SFP+ module type */ ret_val = phy->ops.identify_sfp (hw);
lib/librte_pmd_ixgbe/ixgbe/ixgbe_82598.h +0 -1
@@ -33,7 +33,6 @@ POSSIBILITY OF SUCH DAMAGE.#ifndef _IXGBE_82598_H_#define _IXGBE_82598_H_ -#ident "$Id: ixgbe_82598.h,v 1.3 2012/03/27 22:16:51 jtkirshe Exp $"u32 ixgbe_get_pcie_msix_count_82598 (struct ixgbe_hw *hw);s32 ixgbe_fc_enable_82598 (struct ixgbe_hw *hw);
lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c +52 -53
175 lines not on this page · raw message
lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.h +0 -1
@@ -33,7 +33,6 @@ POSSIBILITY OF SUCH DAMAGE.#ifndef _IXGBE_82599_H_#define _IXGBE_82599_H_ -#ident "$Id: ixgbe_82599.h,v 1.12 2013/10/30 10:19:10 jtkirshe Exp $"s32 ixgbe_get_link_capabilities_82599 (struct ixgbe_hw *hw,ixgbe_link_speed *speed,bool *autoneg);
lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.c +0 -1
@@ -33,7 +33,6 @@ POSSIBILITY OF SUCH DAMAGE.#include "ixgbe_api.h" #include "ixgbe_common.h" -#ident "$Id: ixgbe_api.c,v 1.207 2013/11/22 01:02:01 jtkirshe Exp $"/** * ixgbe_dcb_get_rtrup2tc - read rtrup2tc reg
lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.h +0 -1
@@ -35,7 +35,6 @@ POSSIBILITY OF SUCH DAMAGE.#define _IXGBE_API_H_#include "ixgbe_type.h" -#ident "$Id: ixgbe_api.h,v 1.123 2013/11/22 01:02:01 jtkirshe Exp $"void ixgbe_dcb_get_rtrup2tc (struct ixgbe_hw *hw,u8 *map);
lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c +36 -37
109 lines not on this page · raw message
lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.h +0 -1
@@ -35,7 +35,6 @@ POSSIBILITY OF SUCH DAMAGE.#define _IXGBE_COMMON_H_#include "ixgbe_type.h" -#ident "$Id: ixgbe_common.h,v 1.143 2013/11/22 01:02:01 jtkirshe Exp $"#define IXGBE_WRITE_REG64 (hw, reg, value) \ do { \ IXGBE_WRITE_REG(hw, reg, (u32) value); \
lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb.c +0 -1
@@ -36,7 +36,6 @@ POSSIBILITY OF SUCH DAMAGE.#include "ixgbe_dcb.h" #include "ixgbe_dcb_82598.h" #include "ixgbe_dcb_82599.h" -#ident "$Id: ixgbe_dcb.c,v 1.55 2013/11/22 01:02:01 jtkirshe Exp $"/** * ixgbe_dcb_calculate_tc_credits - This calculates the ieee traffic class
lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb.h +0 -2
@@ -34,8 +34,6 @@ POSSIBILITY OF SUCH DAMAGE.#ifndef _IXGBE_DCB_H_#define _IXGBE_DCB_H_ -#ident "$Id: ixgbe_dcb.h,v 1.39 2012/04/17 00:07:40 jtkirshe Exp $" -#include "ixgbe_type.h" /* DCB defines */
lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb_82598.c +0 -1
@@ -35,7 +35,6 @@ POSSIBILITY OF SUCH DAMAGE.#include "ixgbe_type.h" #include "ixgbe_dcb.h" #include "ixgbe_dcb_82598.h" -#ident "$Id: ixgbe_dcb_82598.c,v 1.29 2012/03/30 06:45:33 jtkirshe Exp $"/** * ixgbe_dcb_get_tc_stats_82598 - Return status data for each traffic class
lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb_82598.h +0 -1
@@ -33,7 +33,6 @@ POSSIBILITY OF SUCH DAMAGE.#ifndef _IXGBE_DCB_82598_H_#define _IXGBE_DCB_82598_H_ -#ident "$Id: ixgbe_dcb_82598.h,v 1.12 2012/03/26 22:28:19 jtkirshe Exp $"/* DCB register definitions */
lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb_82599.c +0 -1
@@ -35,7 +35,6 @@ POSSIBILITY OF SUCH DAMAGE.#include "ixgbe_type.h" #include "ixgbe_dcb.h" #include "ixgbe_dcb_82599.h" -#ident "$Id: ixgbe_dcb_82599.c,v 1.67 2012/03/30 06:45:33 jtkirshe Exp $"/** * ixgbe_dcb_get_tc_stats_82599 - Returns status for each traffic class
lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb_82599.h +0 -1
@@ -33,7 +33,6 @@ POSSIBILITY OF SUCH DAMAGE.#ifndef _IXGBE_DCB_82599_H_#define _IXGBE_DCB_82599_H_ -#ident "$Id: ixgbe_dcb_82599.h,v 1.34 2013/03/20 21:52:47 jtkirshe Exp $"/* DCB register definitions */ #define IXGBE_RTTDCS_TDPAC 0x00000001/* 0 Round Robin,
lib/librte_pmd_ixgbe/ixgbe/ixgbe_osdep.h +1 -1
@@ -103,7 +103,7 @@ enum {typedef uint8_t u8 ;typedef int8_t s8 ;typedef uint16_t u16 ; -typedef int16_t s16 ; +typedef int16_t s16 ;typedef uint32_t u32 ;typedef int32_t s32 ;typedef uint64_t u64 ;
lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c +18 -19
@@ -34,7 +34,6 @@ POSSIBILITY OF SUCH DAMAGE.#include "ixgbe_api.h" #include "ixgbe_common.h" #include "ixgbe_phy.h" -#ident "$Id: ixgbe_phy.c,v 1.155 2013/08/14 22:34:03 jtkirshe Exp $" STATIC void ixgbe_i2c_start(struct ixgbe_hw *hw); STATIC void ixgbe_i2c_stop(struct ixgbe_hw *hw);
@@ -245,27 +244,27 @@ s32 ixgbe_init_phy_ops_generic(struct ixgbe_hw *hw)DEBUGFUNC ("ixgbe_init_phy_ops_generic" );/* PHY */ - phy->ops.identify = &ixgbe_identify_phy_generic; - phy->ops.reset = &ixgbe_reset_phy_generic; - phy->ops.read_reg = &ixgbe_read_phy_reg_generic; - phy->ops.write_reg = &ixgbe_write_phy_reg_generic; - phy->ops.read_reg_mdi = &ixgbe_read_phy_reg_mdi; - phy->ops.write_reg_mdi = &ixgbe_write_phy_reg_mdi; - phy->ops.setup_link = &ixgbe_setup_phy_link_generic; - phy->ops.setup_link_speed = &ixgbe_setup_phy_link_speed_generic; + phy->ops.identify = ixgbe_identify_phy_generic; + phy->ops.reset = ixgbe_reset_phy_generic; + phy->ops.read_reg = ixgbe_read_phy_reg_generic; + phy->ops.write_reg = ixgbe_write_phy_reg_generic; + phy->ops.read_reg_mdi = ixgbe_read_phy_reg_mdi; + phy->ops.write_reg_mdi = ixgbe_write_phy_reg_mdi; + phy->ops.setup_link = ixgbe_setup_phy_link_generic; + phy->ops.setup_link_speed = ixgbe_setup_phy_link_speed_generic; phy->ops.check_link =NULL ; phy->ops.get_firmware_version = ixgbe_get_phy_firmware_version_generic; - phy->ops.read_i2c_byte = &ixgbe_read_i2c_byte_generic; - phy->ops.write_i2c_byte = &ixgbe_write_i2c_byte_generic; - phy->ops.read_i2c_sff8472 = &ixgbe_read_i2c_sff8472_generic; - phy->ops.read_i2c_eeprom = &ixgbe_read_i2c_eeprom_generic; - phy->ops.write_i2c_eeprom = &ixgbe_write_i2c_eeprom_generic; - phy->ops.i2c_bus_clear = &ixgbe_i2c_bus_clear; - phy->ops.identify_sfp = &ixgbe_identify_module_generic; + phy->ops.read_i2c_byte = ixgbe_read_i2c_byte_generic; + phy->ops.write_i2c_byte = ixgbe_write_i2c_byte_generic; + phy->ops.read_i2c_sff8472 = ixgbe_read_i2c_sff8472_generic; + phy->ops.read_i2c_eeprom = ixgbe_read_i2c_eeprom_generic; + phy->ops.write_i2c_eeprom = ixgbe_write_i2c_eeprom_generic; + phy->ops.i2c_bus_clear = ixgbe_i2c_bus_clear; + phy->ops.identify_sfp = ixgbe_identify_module_generic; phy->sfp_type = ixgbe_sfp_type_unknown; - phy->ops.read_i2c_combined = &ixgbe_read_i2c_combined_generic; - phy->ops.write_i2c_combined = &ixgbe_write_i2c_combined_generic; - phy->ops.check_overtemp = &ixgbe_tn_check_overtemp; + phy->ops.read_i2c_combined = ixgbe_read_i2c_combined_generic; + phy->ops.write_i2c_combined = ixgbe_write_i2c_combined_generic; + phy->ops.check_overtemp = ixgbe_tn_check_overtemp;return IXGBE_SUCCESS ; }
lib/librte_pmd_ixgbe/ixgbe/ixgbe_vf.c +0 -1
@@ -35,7 +35,6 @@ POSSIBILITY OF SUCH DAMAGE.#include "ixgbe_api.h" #include "ixgbe_type.h" #include "ixgbe_vf.h" -#ident "$Id: ixgbe_vf.c,v 1.62 2013/06/27 21:30:59 jtkirshe Exp $"#ifndef IXGBE_VFWRITE_REG #define IXGBE_VFWRITE_REG IXGBE_WRITE_REG
lib/librte_pmd_ixgbe/ixgbe/ixgbe_vf.h +0 -5
@@ -33,7 +33,6 @@ POSSIBILITY OF SUCH DAMAGE.#ifndef __IXGBE_VF_H__#define __IXGBE_VF_H__ -#ident "$Id: ixgbe_vf.h,v 1.37 2013/11/07 08:18:53 jtkirshe Exp $"#define IXGBE_VF_IRQ_CLEAR_MASK 7#define IXGBE_VF_MAX_TX_QUEUES 8
@@ -138,8 +137,4 @@ int ixgbevf_negotiate_api_version(struct ixgbe_hw *hw, int api);int ixgbevf_get_queues (struct ixgbe_hw *hw,unsigned int *num_tcs,unsigned int *default_tc); -#ifdef IXGBEVF_OSDEP2 -#include "ixgbevf_osdep2.h" - -#endif /* IXGBEVF_OSDEP2 */ #endif /* __IXGBE_VF_H__ */
lib/librte_pmd_ixgbe/ixgbe/ixgbe_x540.c +39 -39
105 lines not on this page · raw message
lib/librte_pmd_ixgbe/ixgbe/ixgbe_x540.h +0 -1
@@ -35,7 +35,6 @@ POSSIBILITY OF SUCH DAMAGE.#define _IXGBE_X540_H_#include "ixgbe_type.h" -#ident "$Id: ixgbe_x540.h,v 1.11 2013/10/11 08:36:03 jtkirshe Exp $"s32 ixgbe_get_link_capabilities_X540 (struct ixgbe_hw *hw,ixgbe_link_speed *speed,bool *autoneg);
lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c +36 -37
100 lines not on this page · raw message
lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.h +1 -2
@@ -43,8 +43,7 @@ s32 ixgbe_dmac_update_tcs_X550(struct ixgbe_hw *hw);s32 ixgbe_init_eeprom_params_X550 (struct ixgbe_hw *hw);s32 ixgbe_update_eeprom_checksum_X550 (struct ixgbe_hw *hw);s32 ixgbe_calc_eeprom_checksum_X550 (struct ixgbe_hw *hw); -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 ixgbe_update_flash_X550 (struct ixgbe_hw *hw);s32 ixgbe_write_ee_hostif_buffer_X550 (struct ixgbe_hw *hw,u16 offset,u16 words,u16 *data);
Signature · 1 line
1.8.4.2
PATCH 2/36 ixgbe base codes: Debug output macro
In reply to a message not in the archiveUse DEBUGOUT to replace ERROR_REPORT1.
--- lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c +3 -6
@@ -2899,8 +2899,7 @@ STATIC s32 ixgbe_fc_autoneg_fiber(struct ixgbe_hw *hw) linkstat =IXGBE_READ_REG (hw,IXGBE_PCS1GLSTA );if ((!!(linkstat &IXGBE_PCS1GLSTA_AN_COMPLETE ) ==0 ) || (!!(linkstat &IXGBE_PCS1GLSTA_AN_TIMED_OUT ) ==1 )) { -ERROR_REPORT1 (IXGBE_ERROR_POLLING , -"Auto-Negotiation did not complete or timed out" ); +DEBUGOUT ("Auto-Negotiation did not complete or timed out\n" ); goto out; }
@@ -2935,16 +2934,14 @@ STATIC s32 ixgbe_fc_autoneg_backplane(struct ixgbe_hw *hw)*/ links =IXGBE_READ_REG (hw,IXGBE_LINKS );if ((links &IXGBE_LINKS_KX_AN_COMP ) ==0 ) { -ERROR_REPORT1 (IXGBE_ERROR_POLLING , -"Auto-Negotiation did not complete" ); +DEBUGOUT ("Auto-Negotiation did not complete\n" ); goto out; }if (hw->mac.type == ixgbe_mac_82599EB) { links2 =IXGBE_READ_REG (hw,IXGBE_LINKS2 );if ((links2 &IXGBE_LINKS2_AN_SUPPORTED ) ==0 ) { -ERROR_REPORT1 (IXGBE_ERROR_UNSUPPORTED , -"Link partner is not AN enabled" ); +DEBUGOUT ("Link partner is not AN enabled\n" ); goto out; } }
Signature · 1 line
1.8.4.2
PATCH 3/36 ixgbe base codes: Fix bus type issue
In reply to a message not in the archiveIt needs check if the bus type is the unknown type or not.
--- lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c +2 -1
@@ -953,7 +953,8 @@ void ixgbe_set_pci_config_data_generic(struct ixgbe_hw *hw, u16 link_status) {struct ixgbe_mac_info *mac = &hw->mac; - hw->bus.type = ixgbe_bus_type_pci_express; +if (hw->bus.type == ixgbe_bus_type_unknown) + hw->bus.type = ixgbe_bus_type_pci_express;switch (link_status &IXGBE_PCI_LINK_WIDTH ) {case IXGBE_PCI_LINK_WIDTH_1 :
Signature · 1 line
1.8.4.2
PATCH 4/36 ixgbe base codes: Fix link speed issue
In reply to a message not in the archiveRemove unnecessary '|' for the link speed.
--- lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c +4 -4
@@ -882,13 +882,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; }
Signature · 1 line
1.8.4.2
PATCH 5/36 ixgbe base codes: Fix early return
In reply to a message not in the archiveIt could early return according to read status.
--- lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c | 2 ++ 1 file changed, 2 insertions(+)
lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c +2 -0
@@ -1060,6 +1060,8 @@ s32 ixgbe_setup_kr_x550em(struct ixgbe_hw *hw) status =ixgbe_read_iosf_sb_reg_x550 (hw,IXGBE_KRM_LINK_CTRL_1 (hw->phy.lan_id),IXGBE_SB_IOSF_TARGET_KR_PHY , ®_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 ;
Signature · 1 line
1.8.4.2
PATCH 6/36 ixgbe base codes: Update the CS address
In reply to a message not in the archiveUpdate the adress of IXGBE_CS4227.
--- lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.h | 2 +- lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.h +1 -1
@@ -82,7 +82,7 @@ POSSIBILITY OF SUCH DAMAGE.#define IXGBE_I2C_EEPROM_STATUS_FAIL 0x2#define IXGBE_I2C_EEPROM_STATUS_IN_PROGRESS 0x3 -#define IXGBE_CS4227 0x9E/* CS4227 address */ +#define IXGBE_CS4227 0xBE/* CS4227 address */ #define IXGBE_CS4227_SPARE24_LSB 0x12B0/* Reg to program EDC */ #define IXGBE_CS4227_EDC_MODE_CX1 0x0002#define IXGBE_CS4227_EDC_MODE_SR 0x0004
lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c +1 -1
@@ -819,7 +819,7 @@ 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 );
Signature · 1 line
1.8.4.2
PATCH 7/36 ixgbe base codes: Extract function for management capability
In reply to a message not in the archiveDefine function ixgbe_mng_present to check if management capability is present or not.
--- lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c | 16 ++++++++++++++++ lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.h | 1 + 2 files changed, 17 insertions(+)
lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c +16 -0
@@ -4839,6 +4839,22 @@ void ixgbe_enable_rx_generic(struct ixgbe_hw *hw) }/** +* ixgbe_mng_present - returns true when management capability is present +* @hw: pointer to hardware structure +*/ +bool ixgbe_mng_present (struct ixgbe_hw *hw) +{ +u32 fwsm; + +if (hw->mac.type < ixgbe_mac_82599EB) +return false; + + fwsm =IXGBE_READ_REG (hw,IXGBE_FWSM ); + fwsm &=IXGBE_FWSM_MODE_MASK ; +return fwsm ==IXGBE_FWSM_FW_MODE_PT ; +} + +/** * ixgbe_mng_enabled - Is the manageability engine enabled? * @hw: pointer to hardware structure *
lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.h +1 -0
@@ -162,6 +162,7 @@ void ixgbe_clear_tx_pending(struct ixgbe_hw *hw);extern s32 ixgbe_reset_pipeline_82599 (struct ixgbe_hw *hw);extern void ixgbe_stop_mac_link_on_d3_82599 (struct ixgbe_hw *hw); +bool ixgbe_mng_present (struct ixgbe_hw *hw);bool ixgbe_mng_enabled (struct ixgbe_hw *hw);#define IXGBE_I2C_THERMAL_SENSOR_ADDR 0xF8
Signature · 1 line
1.8.4.2
PATCH 8/36 ixgbe base codes: Set phy power
In reply to a message not in the archiveDefine the function of setting phy power;
Set copper phy power for x540.
--- lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c | 30 ++++++++++++++++++++++++++++++ lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.h | 1 + lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h | 1 + lib/librte_pmd_ixgbe/ixgbe/ixgbe_x540.c | 2 ++ lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c | 7 ++++--- 5 files changed, 38 insertions(+), 3 deletions(-)
lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c +30 -0
@@ -2420,3 +2420,33 @@ s32 ixgbe_tn_check_overtemp(struct ixgbe_hw *hw) out:return status; } + +/** +* ixgbe_set_copper_phy_power - Control power for copper phy +* @hw: pointer to hardware structure +* @on: true for on, false for off +*/ +s32 ixgbe_set_copper_phy_power (struct ixgbe_hw *hw,bool on) +{ +u32 status; +u16 reg; + + status = hw->phy.ops.read_reg (hw,IXGBE_MDIO_VENDOR_SPECIFIC_1_CONTROL , +IXGBE_MDIO_VENDOR_SPECIFIC_1_DEV_TYPE , + ®); +if (status) +return status; + +if (on) { + reg &= ~IXGBE_MDIO_PHY_SET_LOW_POWER_MODE ; + }else { +if (ixgbe_check_reset_blocked (hw)) +return 0 ; + reg |=IXGBE_MDIO_PHY_SET_LOW_POWER_MODE ; + } + + status = hw->phy.ops.write_reg (hw,IXGBE_MDIO_VENDOR_SPECIFIC_1_CONTROL , +IXGBE_MDIO_VENDOR_SPECIFIC_1_DEV_TYPE , + reg); +return status; +}
lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.h +1 -0
@@ -156,6 +156,7 @@ s32 ixgbe_get_phy_firmware_version_generic(struct ixgbe_hw *hw, u16 *firmware_version);s32 ixgbe_reset_phy_nl (struct ixgbe_hw *hw); +s32 ixgbe_set_copper_phy_power (struct ixgbe_hw *hw,bool on);s32 ixgbe_identify_module_generic (struct ixgbe_hw *hw);s32 ixgbe_identify_sfp_module_generic (struct ixgbe_hw *hw);s32 ixgbe_get_supported_phy_sfp_layer_generic (struct ixgbe_hw *hw);
lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h +1 -0
@@ -3539,6 +3539,7 @@ struct ixgbe_phy_operations {s32 (*read_i2c_combined)(struct ixgbe_hw *,u8 addr,u16 reg,u16 *val);s32 (*write_i2c_combined)(struct ixgbe_hw *,u8 addr,u16 reg,u16 val);s32 (*check_overtemp)(struct ixgbe_hw *); +s32 (*set_phy_power)(struct ixgbe_hw *,bool on); };struct ixgbe_eeprom_info {
lib/librte_pmd_ixgbe/ixgbe/ixgbe_x540.c +2 -0
@@ -81,6 +81,8 @@ s32 ixgbe_init_ops_X540(struct ixgbe_hw *hw)/* PHY */ phy->ops.init = ixgbe_init_phy_ops_generic; phy->ops.reset =NULL ; +if (!ixgbe_mng_present (hw)) + phy->ops.set_phy_power = ixgbe_set_copper_phy_power;/* MAC */ mac->ops.reset_hw = ixgbe_reset_hw_X540;
lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c +4 -3
@@ -186,11 +186,12 @@ s32 ixgbe_init_ops_X550EM(struct ixgbe_hw *hw) 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 */
Signature · 1 line
1.8.4.2
PATCH 9/36 ixgbe base codes: Use mng present function
In reply to a message not in the archive82599 use mng present to check if MNG FW could be enabled.
--- lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c +2 -6
@@ -578,17 +578,13 @@ out:**/ void ixgbe_stop_mac_link_on_d3_82599 (struct ixgbe_hw *hw) { -u32 autoc2_reg, fwsm; +u32 autoc2_reg;u16 ee_ctrl_2 =0 ;DEBUGFUNC ("ixgbe_stop_mac_link_on_d3_82599" );ixgbe_read_eeprom (hw,IXGBE_EEPROM_CTRL_2 , &ee_ctrl_2); -/* Check to see if MNG FW could be enabled */ - fwsm =IXGBE_READ_REG (hw,IXGBE_FWSM ); - -if (((fwsm &IXGBE_FWSM_MODE_MASK ) !=IXGBE_FWSM_FW_MODE_PT ) && - !hw->wol_enabled && +if (!ixgbe_mng_present (hw) && !hw->wol_enabled && ee_ctrl_2 &IXGBE_EEPROM_CCD_BIT ) { autoc2_reg =IXGBE_READ_REG (hw,IXGBE_AUTOC2 ); autoc2_reg |=IXGBE_AUTOC2_LINK_DISABLE_ON_D3_MASK ;
Signature · 1 line
1.8.4.2
PATCH 10/36 ixgbe base codes: Get host interface command status
In reply to a message not in the archiveAdd new function ixgbe_get_hi_status to get host interface command status.
--- lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c | 30 ++++++++++++++++++++++++++++++ lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.h | 1 + 2 files changed, 31 insertions(+)
lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c +30 -0
@@ -4341,6 +4341,36 @@ u8 ixgbe_calculate_checksum(u8 *buffer, u32 length) }/** +* ixgbe_get_hi_status - Get host interface command status +* @hw: pointer to the HW structure +* @return_code: reads and returns code +* +* Check if command returned with success. On success return IXGBE_SUCCESS +* else return IXGBE_ERR_HOST_INTERFACE_COMMAND. +**/ +s32 ixgbe_get_hi_status (struct ixgbe_hw *hw,u8 *ret_status) +{ +struct ixgbe_hic_hdr response; +u32 *response_val = (u32 *)&response; + +DEBUGFUNC ("ixgbe_get_host_interface_status" ); + +/* Read the command response */ + *response_val =IXGBE_CPU_TO_LE32 (IXGBE_READ_REG (hw,IXGBE_FLEX_MNG )); + +if (ret_status) + *ret_status = response.cmd_or_resp.ret_status; + +if (response.cmd_or_resp.ret_status !=FW_CEM_RESP_STATUS_SUCCESS ) { +DEBUGOUT1 ("Host interface error=%x.\n" , + response.cmd_or_resp.ret_status); +return IXGBE_ERR_HOST_INTERFACE_COMMAND ; + } + +return IXGBE_SUCCESS ; +} + +/** * ixgbe_host_interface_command - Issue command to manageability block * @hw: pointer to the HW structure * @buffer: contains the command to write and where the return status will
lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.h +1 -0
@@ -155,6 +155,7 @@ void ixgbe_enable_relaxed_ordering_gen2(struct ixgbe_hw *hw);s32 ixgbe_set_fw_drv_ver_generic (struct ixgbe_hw *hw,u8 maj,u8 min,u8 build,u8 ver);u8 ixgbe_calculate_checksum (u8 *buffer,u32 length); +s32 ixgbe_get_hi_status (struct ixgbe_hw *hw,u8 *ret_status);s32 ixgbe_host_interface_command (struct ixgbe_hw *hw,u32 *buffer,u32 length,bool return_data);
Signature · 1 line
1.8.4.2
PATCH 11/36 ixgbe base codes: Refine function for host interface command
In reply to a message not in the archiveAdd timeout as new argument in host interface command.
--- lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c | 13 ++++++++----- lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.h | 2 +- lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h | 5 ++++- lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c | 15 ++++++++++----- 4 files changed, 23 insertions(+), 12 deletions(-)
lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c +8 -5
@@ -4376,6 +4376,7 @@ s32 ixgbe_get_hi_status(struct ixgbe_hw *hw, u8 *ret_status)* @buffer: contains the command to write and where the return status will * be placed * @length: length of buffer, must be multiple of 4 bytes +* @timeout: time in ms to wait for command completion * @return_data: read and return data from the buffer (true) or not (false) * Needed because FW structures are big endian and decoding of * these fields can be 8 bit or 16 bit based on command. Decoding
@@ -4387,12 +4388,12 @@ s32 ixgbe_get_hi_status(struct ixgbe_hw *hw, u8 *ret_status)* else return IXGBE_ERR_HOST_INTERFACE_COMMAND. **/ s32 ixgbe_host_interface_command (struct ixgbe_hw *hw,u32 *buffer, -u32 length,bool return_data) +u32 length,u32 timeout,bool return_data) {u32 hicr, i, bi, fwsts;u32 hdr_size =sizeof (struct ixgbe_hic_hdr );u16 buf_len; -u8 dword_len; +u16 dword_len;DEBUGFUNC ("ixgbe_host_interface_command" );
@@ -4429,7 +4430,7 @@ s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u32 *buffer,/* Setting this bit tells the ARC that a new command is pending. */ IXGBE_WRITE_REG (hw,IXGBE_HICR , hicr |IXGBE_HICR_C ); -for (i =0 ; i <IXGBE_HI_COMMAND_TIMEOUT ; i++) { +for (i =0 ; i < timeout; i++) { hicr =IXGBE_READ_REG (hw,IXGBE_HICR );if (!(hicr &IXGBE_HICR_C ))break ;
@@ -4437,7 +4438,7 @@ s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u32 *buffer, }/* Check command completion */ -if (i ==IXGBE_HI_COMMAND_TIMEOUT || +if ((timeout !=0 && i == timeout) || !(IXGBE_READ_REG (hw,IXGBE_HICR ) &IXGBE_HICR_SV )) {ERROR_REPORT1 (IXGBE_ERROR_CAUTION ,"Command has failed with no status valid.\n" );
@@ -4522,7 +4523,9 @@ s32 ixgbe_set_fw_drv_ver_generic(struct ixgbe_hw *hw, u8 maj, u8 min,for (i =0 ; i <=FW_CEM_MAX_RETRIES ; i++) { ret_val =ixgbe_host_interface_command (hw, (u32 *)&fw_cmd, -sizeof (fw_cmd), true); +sizeof (fw_cmd), +IXGBE_HI_COMMAND_TIMEOUT , + true);if (ret_val !=IXGBE_SUCCESS )continue ;
lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.h +1 -1
@@ -157,7 +157,7 @@ s32 ixgbe_set_fw_drv_ver_generic(struct ixgbe_hw *hw, u8 maj, u8 min,u8 ixgbe_calculate_checksum (u8 *buffer,u32 length);s32 ixgbe_get_hi_status (struct ixgbe_hw *hw,u8 *ret_status);s32 ixgbe_host_interface_command (struct ixgbe_hw *hw,u32 *buffer, -u32 length,bool return_data); +u32 length,u32 timeout,bool return_data);void ixgbe_clear_tx_pending (struct ixgbe_hw *hw);
lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h +4 -1
@@ -74,7 +74,7 @@ POSSIBILITY OF SUCH DAMAGE.#include "ixgbe_osdep.h" -#ident "$Id: ixgbe_type.h,v 1.630 2013/11/22 22:48:40 jtkirshe Exp $" +/* Override this by setting IOMEM in your ixgbe_osdep.h header */ /* Vendor ID */ #define IXGBE_INTEL_VENDOR_ID 0x8086
@@ -2731,6 +2731,9 @@ enum ixgbe_fdir_pballoc_type {#define IXGBE_HI_MAX_BLOCK_BYTE_LENGTH 1792/* Num of bytes in range */ #define IXGBE_HI_MAX_BLOCK_DWORD_LENGTH 448/* Num of dwords in range */ #define IXGBE_HI_COMMAND_TIMEOUT 500/* Process HI command limit */ +#define IXGBE_HI_FLASH_ERASE_TIMEOUT 1000/* Process Erase command limit */ +#define IXGBE_HI_FLASH_UPDATE_TIMEOUT 5000/* Process Update command limit */ +#define IXGBE_HI_FLASH_APPLY_TIMEOUT 0/* Process Apply command limit */ /* CEM Support */ #define FW_CEM_HDR_LEN 0x4
lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c +10 -5
@@ -1278,7 +1278,8 @@ s32 ixgbe_read_ee_hostif_data_X550(struct ixgbe_hw *hw, u16 offset, buffer.length =IXGBE_CPU_TO_BE16 (sizeof (u16)); status =ixgbe_host_interface_command (hw, (u32 *)&buffer, -sizeof (buffer), false); +sizeof (buffer), +IXGBE_HI_COMMAND_TIMEOUT , false);if (status)return status;
@@ -1357,7 +1358,9 @@ s32 ixgbe_read_ee_hostif_buffer_X550(struct ixgbe_hw *hw, buffer.length =IXGBE_CPU_TO_BE16 (words_to_read *2 ); status =ixgbe_host_interface_command (hw, (u32 *)&buffer, -sizeof (buffer), false); +sizeof (buffer), +IXGBE_HI_COMMAND_TIMEOUT , + false);if (status) {DEBUGOUT ("Host interface command failed\n" );
@@ -1413,7 +1416,8 @@ s32 ixgbe_write_ee_hostif_data_X550(struct ixgbe_hw *hw, u16 offset, buffer.address =IXGBE_CPU_TO_BE32 (offset *2 ); status =ixgbe_host_interface_command (hw, (u32 *)&buffer, -sizeof (buffer), false); +sizeof (buffer), +IXGBE_HI_COMMAND_TIMEOUT , false);return status; }
@@ -1728,7 +1732,8 @@ s32 ixgbe_update_flash_X550(struct ixgbe_hw *hw) buffer.checksum =FW_DEFAULT_CHECKSUM ; status =ixgbe_host_interface_command (hw, (u32 *)&buffer, -sizeof (buffer), false); +sizeof (buffer), +IXGBE_HI_COMMAND_TIMEOUT , false);return status; }
@@ -1797,7 +1802,7 @@ void ixgbe_disable_rx_x550(struct ixgbe_hw *hw) status =ixgbe_host_interface_command (hw, (u32 *)&fw_cmd,sizeof (struct ixgbe_hic_disable_rxen ), - true); +IXGBE_HI_COMMAND_TIMEOUT , true);/* If we fail - disable RX using register write */ if (status) {
Signature · 1 line
1.8.4.2
PATCH 12/36 ixgbe base codes: Refine struct for physical information
In reply to a message not in the archiveRemove lan_id from struct ixgbe_phy_info.
--- lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c | 4 +- lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h | 1 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_x540.c | 2 +- lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c | 66 ++++++++++++++++----------------- 4 files changed, 34 insertions(+), 39 deletions(-)
lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c +1 -3
@@ -283,9 +283,7 @@ s32 ixgbe_identify_phy_generic(struct ixgbe_hw *hw)DEBUGFUNC ("ixgbe_identify_phy_generic" );if (!hw->phy.phy_semaphore_mask) { - hw->phy.lan_id =IXGBE_READ_REG (hw,IXGBE_STATUS ) & -IXGBE_STATUS_LAN_ID_1 ; -if (hw->phy.lan_id) +if (hw->bus.lan_id) hw->phy.phy_semaphore_mask =IXGBE_GSSR_PHY1_SM ;else hw->phy.phy_semaphore_mask =IXGBE_GSSR_PHY0_SM ;
lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h +0 -1
@@ -3600,7 +3600,6 @@ struct ixgbe_phy_info {u32 revision;enum ixgbe_media_type media_type;u32 phy_semaphore_mask; -u8 lan_id;bool reset_disable;ixgbe_autoneg_advertised autoneg_advertised;enum ixgbe_smart_speed smart_speed;
lib/librte_pmd_ixgbe/ixgbe/ixgbe_x540.c +1 -1
@@ -747,7 +747,7 @@ STATIC void ixgbe_set_mux(struct ixgbe_hw *hw, u8 state) {u32 esdp; -if (!hw->phy.lan_id) +if (!hw->bus.lan_id)return ; esdp =IXGBE_READ_REG (hw,IXGBE_ESDP );if (state)
lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c +32 -34
243 lines not on this page · raw message
Signature · 1 line
1.8.4.2
PATCH 13/36 ixgbe base codes: Clear Tx pending
In reply to a message not in the archiveWait for a last completion before clearing buffers,
and before proceeding, it needs make sure that the PCIe block does not have transactions pending.
--- lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-)
lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c +21 -1
@@ -4612,7 +4612,8 @@ void ixgbe_set_rxpba_generic(struct ixgbe_hw *hw, int num_pb, u32 headroom,**/ void ixgbe_clear_tx_pending (struct ixgbe_hw *hw) { -u32 gcr_ext, hlreg0; +u32 gcr_ext, hlreg0, i, poll; +u16 value;/* * If double reset is not requested then all transactions should
@@ -4629,6 +4630,25 @@ void ixgbe_clear_tx_pending(struct ixgbe_hw *hw) hlreg0 =IXGBE_READ_REG (hw,IXGBE_HLREG0 );IXGBE_WRITE_REG (hw,IXGBE_HLREG0 , hlreg0 |IXGBE_HLREG0_LPBK ); +/* Wait for a last completion before clearing buffers */ +IXGBE_WRITE_FLUSH (hw); +msec_delay (3 ); + +/* +* Before proceeding, make sure that the PCIe block does not have +* transactions pending. +*/ + poll =ixgbe_pcie_timeout_poll (hw); +for (i =0 ; i < poll; i++) { +usec_delay (100 ); + value =IXGBE_READ_PCIE_WORD (hw,IXGBE_PCI_DEVICE_STATUS ); +if (IXGBE_REMOVED (hw->hw_addr)) + goto out; +if (!(value &IXGBE_PCI_DEVICE_STATUS_TRANSACTION_PENDING )) + goto out; + } + +out:/* initiate cleaning flow for buffers in the PCIe transaction layer */ gcr_ext =IXGBE_READ_REG (hw,IXGBE_GCR_EXT ); IXGBE_WRITE_REG(hw, IXGBE_GCR_EXT,
Signature · 1 line
1.8.4.2
PATCH 14/36 ixgbe base codes: Use IOMEM
In reply to a message not in the archiveUse IOMEM for hw addr.
--- lib/librte_pmd_ixgbe/ixgbe/ixgbe_osdep.h | 2 ++ lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-)
lib/librte_pmd_ixgbe/ixgbe/ixgbe_osdep.h +2 -0
@@ -113,6 +113,8 @@ typedef int bool;#define wmb () rte_wmb()#define rmb () rte_rmb() +#define IOMEM +#define prefetch (x) rte_prefetch0(x)#define IXGBE_PCI_REG (reg) (*((volatile uint32_t *)(reg)))
lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h +1 -1
@@ -3641,7 +3641,7 @@ struct ixgbe_mbx_info { };struct ixgbe_hw { -u8 *hw_addr; + u8 IOMEM *hw_addr;void *back;struct ixgbe_mac_info mac;struct ixgbe_addr_filter_info addr_ctrl;
Signature · 1 line
1.8.4.2
PATCH 15/36 ixgbe base codes: Update macros
In reply to a message not in the archiveUpdate macros in ixgbe_type header files.
--- lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h | 59 +++++++++++++++++++++++++++++---- 1 file changed, 53 insertions(+), 6 deletions(-)
lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h +53 -6
@@ -1369,6 +1369,7 @@ struct ixgbe_dmac_config {#define IXGBE_MDIO_AUTO_NEG_CONTROL 0x0/* AUTO_NEG Control Reg */ #define IXGBE_MDIO_AUTO_NEG_STATUS 0x1/* AUTO_NEG Status Reg */ +#define IXGBE_MDIO_AUTO_NEG_VENDOR_STAT 0xC800/* AUTO_NEG Vendor Status Reg */ #define IXGBE_MDIO_AUTO_NEG_ADVT 0x10/* AUTO_NEG Advt Reg */ #define IXGBE_MDIO_AUTO_NEG_LP 0x13/* AUTO_NEG LP Status Reg */ #define IXGBE_MDIO_AUTO_NEG_EEE_ADVT 0x3C/* AUTO_NEG EEE Advt Reg */
@@ -1403,6 +1404,21 @@ struct ixgbe_dmac_config {/* MII clause 22/28 definitions */ #define IXGBE_MDIO_PHY_LOW_POWER_MODE 0x0800 +#define IXGBE_MDIO_XENPAK_LASI_STATUS 0x9005/* XENPAK LASI Status register*/ +#define IXGBE_XENPAK_LASI_LINK_STATUS_ALARM 0x1/* Link Status Alarm change */ + +#define IXGBE_MDIO_AUTO_NEG_LINK_STATUS 0x4/* Indicates if link is up */ + +#define IXGBE_MDIO_AUTO_NEG_VENDOR_STATUS_MASK 0x7/* Speed/Duplex Mask */ +#define IXGBE_MDIO_AUTO_NEG_VENDOR_STATUS_10M_HALF 0x0/* 10Mb/s Half Duplex */ +#define IXGBE_MDIO_AUTO_NEG_VENDOR_STATUS_10M_FULL 0x1/* 10Mb/s Full Duplex */ +#define IXGBE_MDIO_AUTO_NEG_VENDOR_STATUS_100M_HALF 0x2/* 100Mb/s Half Duplex */ +#define IXGBE_MDIO_AUTO_NEG_VENDOR_STATUS_100M_FULL 0x3/* 100Mb/s Full Duplex */ +#define IXGBE_MDIO_AUTO_NEG_VENDOR_STATUS_1GB_HALF 0x4/* 1Gb/s Half Duplex */ +#define IXGBE_MDIO_AUTO_NEG_VENDOR_STATUS_1GB_FULL 0x5/* 1Gb/s Full Duplex */ +#define IXGBE_MDIO_AUTO_NEG_VENDOR_STATUS_10GB_HALF 0x6/* 10Gb/s Half Duplex */ +#define IXGBE_MDIO_AUTO_NEG_VENDOR_STATUS_10GB_FULL 0x7/* 10Gb/s Full Duplex */ +#define IXGBE_MII_10GBASE_T_AUTONEG_CTRL_REG 0x20/* 10G Control Reg */ #define IXGBE_MII_AUTONEG_VENDOR_PROVISION_1_REG 0xC400/* 1G Provisioning 1 */ #define IXGBE_MII_AUTONEG_XNP_TX_REG 0x17/* 1G XNP Transmit */
@@ -1448,6 +1464,15 @@ struct ixgbe_dmac_config {#define IXGBE_SDP0_GPIEN 0x00000001/* SDP0 */ #define IXGBE_SDP1_GPIEN 0x00000002/* SDP1 */ #define IXGBE_SDP2_GPIEN 0x00000004/* SDP2 */ +#define IXGBE_SDP0_GPIEN_X540 0x00000002/* SDP0 on X540 and X550 */ +#define IXGBE_SDP1_GPIEN_X540 0x00000004/* SDP1 on X540 and X550 */ +#define IXGBE_SDP2_GPIEN_X540 0x00000008/* SDP2 on X540 and X550 */ +#define IXGBE_SDP0_GPIEN_BY_MAC (_hw) ((_hw)->mac.type >= ixgbe_mac_X540 ? \ + IXGBE_SDP0_GPIEN_X540 : IXGBE_SDP0_GPIEN) +#define IXGBE_SDP1_GPIEN_BY_MAC (_hw) ((_hw)->mac.type >= ixgbe_mac_X540 ? \ + IXGBE_SDP1_GPIEN_X540 : IXGBE_SDP1_GPIEN) +#define IXGBE_SDP2_GPIEN_BY_MAC (_hw) ((_hw)->mac.type >= ixgbe_mac_X540 ? \ + IXGBE_SDP2_GPIEN_X540 : IXGBE_SDP2_GPIEN)#define IXGBE_GPIE_MSIX_MODE 0x00000010/* MSI-X mode */ #define IXGBE_GPIE_OCD 0x00000020/* Other Clear Disable */ #define IXGBE_GPIE_EIMEN 0x00000040/* Immediate Interrupt Enable */
@@ -1625,6 +1650,18 @@ enum {#define IXGBE_EICR_GPI_SDP1 0x02000000/* Gen Purpose Interrupt on SDP1 */ #define IXGBE_EICR_GPI_SDP2 0x04000000/* Gen Purpose Interrupt on SDP2 */ #define IXGBE_EICR_ECC 0x10000000/* ECC Error */ +#define IXGBE_EICR_GPI_SDP0_X540 0x02000000/* Gen Purpose Interrupt on SDP0 */ +#define IXGBE_EICR_GPI_SDP1_X540 0x04000000/* Gen Purpose Interrupt on SDP1 */ +#define IXGBE_EICR_GPI_SDP2_X540 0x08000000/* Gen Purpose Interrupt on SDP2 */ +#define IXGBE_EICR_GPI_SDP0_BY_MAC (_hw) ((_hw)->mac.type >= ixgbe_mac_X540 ? \ + IXGBE_EICR_GPI_SDP0_X540 : \ + IXGBE_EICR_GPI_SDP0) +#define IXGBE_EICR_GPI_SDP1_BY_MAC (_hw) ((_hw)->mac.type >= ixgbe_mac_X540 ? \ + IXGBE_EICR_GPI_SDP1_X540 : \ + IXGBE_EICR_GPI_SDP1) +#define IXGBE_EICR_GPI_SDP2_BY_MAC (_hw) ((_hw)->mac.type >= ixgbe_mac_X540 ? \ + IXGBE_EICR_GPI_SDP2_X540 : \ + IXGBE_EICR_GPI_SDP2)#define IXGBE_EICR_PBUR 0x10000000/* Packet Buffer Handler Error */ #define IXGBE_EICR_DHER 0x20000000/* Descriptor Handler Error */ #define IXGBE_EICR_TCP_TIMER 0x40000000/* TCP Timer */
@@ -1643,6 +1680,9 @@ enum {#define IXGBE_EICS_GPI_SDP1 IXGBE_EICR_GPI_SDP1/* SDP1 Gen Purpose Int */ #define IXGBE_EICS_GPI_SDP2 IXGBE_EICR_GPI_SDP2/* SDP2 Gen Purpose Int */ #define IXGBE_EICS_ECC IXGBE_EICR_ECC/* ECC Error */ +#define IXGBE_EICS_GPI_SDP0_BY_MAC (_hw) IXGBE_EICR_GPI_SDP0_BY_MAC(_hw) +#define IXGBE_EICS_GPI_SDP1_BY_MAC (_hw) IXGBE_EICR_GPI_SDP1_BY_MAC(_hw) +#define IXGBE_EICS_GPI_SDP2_BY_MAC (_hw) IXGBE_EICR_GPI_SDP2_BY_MAC(_hw)#define IXGBE_EICS_PBUR IXGBE_EICR_PBUR/* Pkt Buf Handler Err */ #define IXGBE_EICS_DHER IXGBE_EICR_DHER/* Desc Handler Error */ #define IXGBE_EICS_TCP_TIMER IXGBE_EICR_TCP_TIMER/* TCP Timer */
@@ -1662,6 +1702,9 @@ enum {#define IXGBE_EIMS_GPI_SDP1 IXGBE_EICR_GPI_SDP1/* SDP1 Gen Purpose Int */ #define IXGBE_EIMS_GPI_SDP2 IXGBE_EICR_GPI_SDP2/* SDP2 Gen Purpose Int */ #define IXGBE_EIMS_ECC IXGBE_EICR_ECC/* ECC Error */ +#define IXGBE_EIMS_GPI_SDP0_BY_MAC (_hw) IXGBE_EICR_GPI_SDP0_BY_MAC(_hw) +#define IXGBE_EIMS_GPI_SDP1_BY_MAC (_hw) IXGBE_EICR_GPI_SDP1_BY_MAC(_hw) +#define IXGBE_EIMS_GPI_SDP2_BY_MAC (_hw) IXGBE_EICR_GPI_SDP2_BY_MAC(_hw)#define IXGBE_EIMS_PBUR IXGBE_EICR_PBUR/* Pkt Buf Handler Err */ #define IXGBE_EIMS_DHER IXGBE_EICR_DHER/* Descr Handler Error */ #define IXGBE_EIMS_TCP_TIMER IXGBE_EICR_TCP_TIMER/* TCP Timer */
@@ -1680,6 +1723,9 @@ enum {#define IXGBE_EIMC_GPI_SDP1 IXGBE_EICR_GPI_SDP1/* SDP1 Gen Purpose Int */ #define IXGBE_EIMC_GPI_SDP2 IXGBE_EICR_GPI_SDP2/* SDP2 Gen Purpose Int */ #define IXGBE_EIMC_ECC IXGBE_EICR_ECC/* ECC Error */ +#define IXGBE_EIMC_GPI_SDP0_BY_MAC (_hw) IXGBE_EICR_GPI_SDP0_BY_MAC(_hw) +#define IXGBE_EIMC_GPI_SDP1_BY_MAC (_hw) IXGBE_EICR_GPI_SDP1_BY_MAC(_hw) +#define IXGBE_EIMC_GPI_SDP2_BY_MAC (_hw) IXGBE_EICR_GPI_SDP2_BY_MAC(_hw)#define IXGBE_EIMC_PBUR IXGBE_EICR_PBUR/* Pkt Buf Handler Err */ #define IXGBE_EIMC_DHER IXGBE_EICR_DHER/* Desc Handler Err */ #define IXGBE_EIMC_TCP_TIMER IXGBE_EICR_TCP_TIMER/* TCP Timer */
@@ -1975,12 +2021,13 @@ enum {#define IXGBE_SWFW_REGSMP 0x80000000/* Register Semaphore bit 31 */ /* SW_FW_SYNC/GSSR definitions */ -#define IXGBE_GSSR_EEP_SM 0x0001 -#define IXGBE_GSSR_PHY0_SM 0x0002 -#define IXGBE_GSSR_PHY1_SM 0x0004 -#define IXGBE_GSSR_MAC_CSR_SM 0x0008 -#define IXGBE_GSSR_FLASH_SM 0x0010 -#define IXGBE_GSSR_SW_MNG_SM 0x0400 +#define IXGBE_GSSR_EEP_SM 0x0001 +#define IXGBE_GSSR_PHY0_SM 0x0002 +#define IXGBE_GSSR_PHY1_SM 0x0004 +#define IXGBE_GSSR_MAC_CSR_SM 0x0008 +#define IXGBE_GSSR_FLASH_SM 0x0010 +#define IXGBE_GSSR_NVM_UPDATE_SM 0x0200 +#define IXGBE_GSSR_SW_MNG_SM 0x0400#define IXGBE_GSSR_SHARED_I2C_SM 0x1806/* Wait for both phys and both I2Cs */ #define IXGBE_GSSR_I2C_MASK 0x1800#define IXGBE_GSSR_NVM_PHY_MASK 0xF
Signature · 1 line
1.8.4.2
PATCH 16/36 ixgbe base codes: New phy ID
In reply to a message not in the archiveAdd new phy ID: X557_PHY_ID, and implement its internal setup function and external init function.
--- lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c | 3 + lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h | 10 ++ lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c | 204 +++++++++++++++++++++++++++++++- lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.h | 4 +- 4 files changed, 215 insertions(+), 6 deletions(-)
lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c +3 -0
@@ -435,6 +435,9 @@ enum ixgbe_phy_type ixgbe_get_phy_type_from_id(u32 phy_id)case ATH_PHY_ID : phy_type = ixgbe_phy_nl;break ; +case X557_PHY_ID : + phy_type = ixgbe_phy_x550em_ext_t; +break ;default : phy_type = ixgbe_phy_unknown;break ;
lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h +10 -0
@@ -1390,10 +1390,17 @@ struct ixgbe_dmac_config {#define IXGBE_MDIO_PHY_100BASETX_ABILITY 0x0080/* 100BaseTX capable */ #define IXGBE_MDIO_PHY_SET_LOW_POWER_MODE 0x0800/* Set low power mode */ +#define IXGBE_MDIO_TX_VENDOR_ALARMS_3 0xCC02/* Vendor Alarms 3 Reg */ +#define IXGBE_MDIO_TX_VENDOR_ALARMS_3_RST_MASK 0x3/* PHY Reset Complete Mask */ +#define IXGBE_MDIO_GLOBAL_RES_PR_10 0xC479/* Global Resv Provisioning 10 Reg */ +#define IXGBE_MDIO_POWER_UP_STALL 0x8000/* Power Up Stall */ +#define IXGBE_MDIO_PMA_PMD_CONTROL_ADDR 0x0000/* PMA/PMD Control Reg */ #define IXGBE_MDIO_PMA_PMD_SDA_SCL_ADDR 0xC30A/* PHY_XS SDA/SCL Addr Reg */ #define IXGBE_MDIO_PMA_PMD_SDA_SCL_DATA 0xC30B/* PHY_XS SDA/SCL Data Reg */ #define IXGBE_MDIO_PMA_PMD_SDA_SCL_STAT 0xC30C/* PHY_XS SDA/SCL Status Reg */ +#define IXGBE_MDIO_PMD_STD_TX_DISABLE_CNTR 0x9/* Standard Transmit Dis Reg */ +#define IXGBE_MDIO_PMD_GLOBAL_TX_DISABLE 0x0001/* PMD Global Transmit Dis */ #define IXGBE_PCRC8ECL 0x0E810/* PCR CRC-8 Error Count Lo */ #define IXGBE_PCRC8ECH 0x0E811/* PCR CRC-8 Error Count Hi */
@@ -1441,6 +1448,7 @@ struct ixgbe_dmac_config {#define TNX_FW_REV 0xB#define X540_PHY_ID 0x01540200#define X550_PHY_ID 0x01540220 +#define X557_PHY_ID 0x01540240#define AQ_FW_REV 0x20#define QT2022_PHY_ID 0x0043A400#define ATH_PHY_ID 0x03429050
@@ -3228,6 +3236,7 @@ enum ixgbe_phy_type { ixgbe_phy_aq, ixgbe_phy_x550em_kr, ixgbe_phy_x550em_kx4, + ixgbe_phy_x550em_ext_t, ixgbe_phy_cu_unknown, ixgbe_phy_qt, ixgbe_phy_xaui,
@@ -3577,6 +3586,7 @@ struct ixgbe_phy_operations {s32 (*read_reg_mdi)(struct ixgbe_hw *,u32 ,u32 ,u16 *);s32 (*write_reg_mdi)(struct ixgbe_hw *,u32 ,u32 ,u16 );s32 (*setup_link)(struct ixgbe_hw *); +s32 (*setup_internal_link)(struct ixgbe_hw *);s32 (*setup_link_speed)(struct ixgbe_hw *,ixgbe_link_speed ,bool );s32 (*check_link)(struct ixgbe_hw *,ixgbe_link_speed *,bool *);s32 (*get_firmware_version)(struct ixgbe_hw *,u16 *);
lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c +199 -5
260 lines not on this page · raw message
lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.h +3 -1
@@ -79,7 +79,9 @@ void ixgbe_init_mac_link_ops_X550em(struct ixgbe_hw *hw);s32 ixgbe_reset_hw_X550em (struct ixgbe_hw *hw);s32 ixgbe_init_phy_ops_X550em (struct ixgbe_hw *hw);s32 ixgbe_setup_kr_x550em (struct ixgbe_hw *hw); -s32 ixgbe_setup_ixfi_x550em (struct ixgbe_hw *hw); +s32 ixgbe_setup_kx4_x550em (struct ixgbe_hw *hw); +s32 ixgbe_init_ext_t_x550em (struct ixgbe_hw *hw); +s32 ixgbe_setup_internal_phy_x550em (struct ixgbe_hw *hw);s32 ixgbe_setup_phy_loopback_x550em (struct ixgbe_hw *hw);u32 ixgbe_get_supported_physical_layer_X550em (struct ixgbe_hw *hw);void ixgbe_disable_rx_x550 (struct ixgbe_hw *hw);
Signature · 1 line
1.8.4.2
PATCH 17/36 ixgbe base codes: Get bus info
In reply to a message not in the archiveNew function to get bus information for x550em;
--- lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h | 1 + lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c | 23 +++++++++++++++++++++-- lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.h | 1 + 3 files changed, 23 insertions(+), 2 deletions(-)
lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h +1 -0
@@ -3324,6 +3324,7 @@ enum ixgbe_bus_type { ixgbe_bus_type_pci, ixgbe_bus_type_pcix, ixgbe_bus_type_pci_express, + ixgbe_bus_type_internal, ixgbe_bus_type_reserved };
lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c +21 -2
@@ -171,8 +171,9 @@ 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;
@@ -1964,6 +1965,24 @@ u32 ixgbe_get_supported_physical_layer_X550em(struct ixgbe_hw *hw) }/** +* 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 * * Enables the Rx DMA unit for x550
lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.h +1 -0
@@ -40,6 +40,7 @@ s32 ixgbe_dmac_config_X550(struct ixgbe_hw *hw);s32 ixgbe_dmac_config_tcs_X550 (struct ixgbe_hw *hw);s32 ixgbe_dmac_update_tcs_X550 (struct ixgbe_hw *hw); +s32 ixgbe_get_bus_info_X550em (struct ixgbe_hw *hw);s32 ixgbe_init_eeprom_params_X550 (struct ixgbe_hw *hw);s32 ixgbe_update_eeprom_checksum_X550 (struct ixgbe_hw *hw);s32 ixgbe_calc_eeprom_checksum_X550 (struct ixgbe_hw *hw);
Signature · 1 line
1.8.4.2
PATCH 18/36 ixgbe base codes: Restructure host interface command
In reply to a message not in the archiveRequest and response command have different struct.
--- lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h | 22 ++++++++++++++++----- lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c | 34 ++++++++++++++++----------------- 2 files changed, 34 insertions(+), 22 deletions(-)
lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h +17 -5
@@ -2821,13 +2821,25 @@ struct ixgbe_hic_hdr {u8 checksum; }; -struct ixgbe_hic_hdr2 { +struct ixgbe_hic_hdr2_req {u8 cmd; -u8 buf_len1; -u8 buf_len2; +u8 buf_lenh; +u8 buf_lenl;u8 checksum; }; +struct ixgbe_hic_hdr2_rsp { +u8 cmd; +u8 buf_lenl; +u8 buf_lenh_status;/* 7-5: high bits of buf_len, 4-0: status */ +u8 checksum; +}; + +union ixgbe_hic_hdr2 { +struct ixgbe_hic_hdr2_req req; +struct ixgbe_hic_hdr2_rsp rsp; +}; +struct ixgbe_hic_drv_info {struct ixgbe_hic_hdr hdr;u8 port_num;
@@ -2841,7 +2853,7 @@ struct ixgbe_hic_drv_info {/* These need to be dword aligned */ struct ixgbe_hic_read_shadow_ram { -struct ixgbe_hic_hdr2 hdr; +union ixgbe_hic_hdr2 hdr;u32 address;u16 length;u16 pad2;
@@ -2850,7 +2862,7 @@ struct ixgbe_hic_read_shadow_ram { };struct ixgbe_hic_write_shadow_ram { -struct ixgbe_hic_hdr2 hdr; +union ixgbe_hic_hdr2 hdr;u32 address;u16 length;u16 pad2;
lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c +17 -17
@@ -1450,10 +1450,10 @@ s32 ixgbe_read_ee_hostif_data_X550(struct ixgbe_hw *hw, u16 offset,struct ixgbe_hic_read_shadow_ram buffer;DEBUGFUNC ("ixgbe_read_ee_hostif_data_X550" ); - buffer.hdr.cmd =FW_READ_SHADOW_RAM_CMD ; - buffer.hdr.buf_len1 =0 ; - buffer.hdr.buf_len2 =FW_READ_SHADOW_RAM_LEN ; - buffer.hdr.checksum =FW_DEFAULT_CHECKSUM ; + buffer.hdr.req.cmd =FW_READ_SHADOW_RAM_CMD ; + buffer.hdr.req.buf_lenh =0 ; + buffer.hdr.req.buf_lenl =FW_READ_SHADOW_RAM_LEN ; + buffer.hdr.req.checksum =FW_DEFAULT_CHECKSUM ;/* convert offset from words to bytes */ buffer.address =IXGBE_CPU_TO_BE32 (offset *2 );
@@ -1531,10 +1531,10 @@ s32 ixgbe_read_ee_hostif_buffer_X550(struct ixgbe_hw *hw,else words_to_read = words; - buffer.hdr.cmd =FW_READ_SHADOW_RAM_CMD ; - buffer.hdr.buf_len1 =0 ; - buffer.hdr.buf_len2 =FW_READ_SHADOW_RAM_LEN ; - buffer.hdr.checksum =FW_DEFAULT_CHECKSUM ; + buffer.hdr.req.cmd =FW_READ_SHADOW_RAM_CMD ; + buffer.hdr.req.buf_lenh =0 ; + buffer.hdr.req.buf_lenl =FW_READ_SHADOW_RAM_LEN ; + buffer.hdr.req.checksum =FW_DEFAULT_CHECKSUM ;/* convert offset from words to bytes */ buffer.address =IXGBE_CPU_TO_BE32 ((offset + current_word) *2 );
@@ -1588,10 +1588,10 @@ s32 ixgbe_write_ee_hostif_data_X550(struct ixgbe_hw *hw, u16 offset,DEBUGFUNC ("ixgbe_write_ee_hostif_data_X550" ); - buffer.hdr.cmd =FW_WRITE_SHADOW_RAM_CMD ; - buffer.hdr.buf_len1 =0 ; - buffer.hdr.buf_len2 =FW_WRITE_SHADOW_RAM_LEN ; - buffer.hdr.checksum =FW_DEFAULT_CHECKSUM ; + buffer.hdr.req.cmd =FW_WRITE_SHADOW_RAM_CMD ; + buffer.hdr.req.buf_lenh =0 ; + buffer.hdr.req.buf_lenl =FW_WRITE_SHADOW_RAM_LEN ; + buffer.hdr.req.checksum =FW_DEFAULT_CHECKSUM ;/* one word */ buffer.length =IXGBE_CPU_TO_BE16 (sizeof (u16));
@@ -1905,14 +1905,14 @@ s32 ixgbe_update_eeprom_checksum_X550(struct ixgbe_hw *hw)s32 ixgbe_update_flash_X550 (struct ixgbe_hw *hw) {s32 status =IXGBE_SUCCESS ; -struct ixgbe_hic_hdr2 buffer; +union ixgbe_hic_hdr2 buffer;DEBUGFUNC ("ixgbe_update_flash_X550" ); - buffer.cmd =FW_SHADOW_RAM_DUMP_CMD ; - buffer.buf_len1 =0 ; - buffer.buf_len2 =FW_SHADOW_RAM_DUMP_LEN ; - buffer.checksum =FW_DEFAULT_CHECKSUM ; + buffer.req.cmd =FW_SHADOW_RAM_DUMP_CMD ; + buffer.req.buf_lenh =0 ; + buffer.req.buf_lenl =FW_SHADOW_RAM_DUMP_LEN ; + buffer.req.checksum =FW_DEFAULT_CHECKSUM ; status = ixgbe_host_interface_command(hw, (u32 *)&buffer, sizeof(buffer),
Signature · 1 line
1.8.4.2
PATCH 19/36 ixgbe base codes: Fix mac type issue
In reply to a message not in the archiveIt needs '>=' rather than '=='.
--- lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c | 2 +- lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb_82599.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c +1 -1
@@ -4082,7 +4082,7 @@ s32 ixgbe_check_mac_link_generic(struct ixgbe_hw *hw, ixgbe_link_speed *speed,if ((links_reg &IXGBE_LINKS_SPEED_82599 ) ==IXGBE_LINKS_SPEED_10G_82599 ) { *speed =IXGBE_LINK_SPEED_10GB_FULL ; -if (hw->mac.type > ixgbe_mac_X550) { +if (hw->mac.type >= ixgbe_mac_X550) {if (links_reg &IXGBE_LINKS_SPEED_NON_STD ) *speed =IXGBE_LINK_SPEED_2_5GB_FULL ; }
lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb_82599.c +1 -1
@@ -298,7 +298,7 @@ s32 ixgbe_dcb_config_pfc_82599(struct ixgbe_hw *hw, u8 pfc_en, u8 *map)*/ reg &= ~(IXGBE_MFLCN_RPFCE_MASK |IXGBE_MFLCN_RFCE ); -if (hw->mac.type == ixgbe_mac_X540) +if (hw->mac.type >= ixgbe_mac_X540) reg |= pfc_en <<IXGBE_MFLCN_RPFCE_SHIFT ;if (pfc_en)
Signature · 1 line
1.8.4.2
PATCH 20/36 ixgbe base codes: API for setup internal phy
In reply to a message not in the archiveNew API for setup internal phy.
--- lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.c | 14 ++++++++++++++ lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.h | 1 + 2 files changed, 15 insertions(+)
lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.c +14 -0
@@ -537,6 +537,20 @@ s32 ixgbe_setup_phy_link(struct ixgbe_hw *hw) }/** +* ixgbe_setup_internal_phy - Configure integrated PHY +* @hw: pointer to hardware structure +* +* Reconfigure the integrated PHY in order to enable talk to the external PHY. +* Returns success if not implemented, since nothing needs to be done in this +* case. +*/ +s32 ixgbe_setup_internal_phy (struct ixgbe_hw *hw) +{ +return ixgbe_call_func (hw, hw->phy.ops.setup_internal_link, (hw), +IXGBE_SUCCESS ); +} + +/** * ixgbe_check_phy_link - Determine link and speed status * @hw: pointer to hardware structure *
lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.h +1 -0
@@ -70,6 +70,7 @@ s32 ixgbe_write_phy_reg(struct ixgbe_hw *hw, u32 reg_addr, u32 device_type, u16 phy_data);s32 ixgbe_setup_phy_link (struct ixgbe_hw *hw); +s32 ixgbe_setup_internal_phy (struct ixgbe_hw *hw);s32 ixgbe_check_phy_link (struct ixgbe_hw *hw,ixgbe_link_speed *speed,bool *link_up);
Signature · 1 line
1.8.4.2
PATCH 21/36 ixgbe base codes: API for set phy power
In reply to a message not in the archiveNew API to control the phy power state.
--- lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.c | 11 +++++++++++ lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.h | 1 + 2 files changed, 12 insertions(+)
lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.c +11 -0
@@ -580,6 +580,17 @@ s32 ixgbe_setup_phy_link_speed(struct ixgbe_hw *hw, ixgbe_link_speed speed, }/** +* ixgbe_set_phy_power - Control the phy power state +* @hw: pointer to hardware structure +* @on: true for on, false for off +*/ +s32 ixgbe_set_phy_power (struct ixgbe_hw *hw,bool on) +{ +return ixgbe_call_func (hw, hw->phy.ops.set_phy_power, (hw, on), +IXGBE_NOT_IMPLEMENTED ); +} + +/** * ixgbe_check_link - Get link and speed status * @hw: pointer to hardware structure *
lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.h +1 -0
@@ -77,6 +77,7 @@ s32 ixgbe_check_phy_link(struct ixgbe_hw *hw,s32 ixgbe_setup_phy_link_speed (struct ixgbe_hw *hw,ixgbe_link_speed speed,bool autoneg_wait_to_complete); +s32 ixgbe_set_phy_power (struct ixgbe_hw *,bool on);void ixgbe_disable_tx_laser (struct ixgbe_hw *hw);void ixgbe_enable_tx_laser (struct ixgbe_hw *hw);void ixgbe_flap_tx_laser (struct ixgbe_hw *hw);
Signature · 1 line
1.8.4.2
PATCH 22/36 ixgbe base codes: API for read i2c combined
In reply to a message not in the archiveNew API to perform I2C read combined operation.
--- lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.c | 16 ++++++++++++++++ lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.h | 1 + 2 files changed, 17 insertions(+)
lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.c +16 -0
@@ -1295,6 +1295,7 @@ s32 ixgbe_init_uta_tables(struct ixgbe_hw *hw)* ixgbe_read_i2c_byte - Reads 8 bit word over I2C at specified device address * @hw: pointer to hardware structure * @byte_offset: byte offset to read +* @dev_addr: I2C bus address to read from * @data: value read * * Performs byte read operation to SFP module's EEPROM over I2C interface.
@@ -1307,6 +1308,21 @@ s32 ixgbe_read_i2c_byte(struct ixgbe_hw *hw, u8 byte_offset, u8 dev_addr, }/** +* ixgbe_read_i2c_combined - Perform I2C read combined operation +* @hw: pointer to the hardware structure +* @addr: I2C bus address to read from +* @reg: I2C device register to read from +* @val: pointer to location to receive read value +* +* Returns an error code on error. +*/ +s32 ixgbe_read_i2c_combined (struct ixgbe_hw *hw,u8 addr,u16 reg,u16 *val) +{ +return ixgbe_call_func (hw, hw->phy.ops.read_i2c_combined, (hw, addr, + reg, val),IXGBE_NOT_IMPLEMENTED ); +} + +/** * ixgbe_write_i2c_byte - Writes 8 bit word over I2C * @hw: pointer to hardware structure * @byte_offset: byte offset to write
lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.h +1 -0
@@ -171,6 +171,7 @@ u32 ixgbe_atr_compute_sig_hash_82599(union ixgbe_atr_hash_dword input,bool ixgbe_verify_lesm_fw_enabled_82599 (struct ixgbe_hw *hw);s32 ixgbe_read_i2c_byte (struct ixgbe_hw *hw,u8 byte_offset,u8 dev_addr,u8 *data); +s32 ixgbe_read_i2c_combined (struct ixgbe_hw *hw,u8 addr,u16 reg,u16 *val);s32 ixgbe_write_i2c_byte (struct ixgbe_hw *hw,u8 byte_offset,u8 dev_addr,u8 data);s32 ixgbe_write_i2c_eeprom (struct ixgbe_hw *hw,u8 byte_offset,u8 eeprom_data);
Signature · 1 line
1.8.4.2
PATCH 23/36 ixgbe base codes: API for write i2c combined
In reply to a message not in the archiveNew API to perform I2C write combined operation.
--- lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.c | 16 ++++++++++++++++ lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.h | 1 + lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c | 11 +++++++++-- 3 files changed, 26 insertions(+), 2 deletions(-)
lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.c +16 -0
@@ -1326,6 +1326,7 @@ s32 ixgbe_read_i2c_combined(struct ixgbe_hw *hw, u8 addr, u16 reg, u16 *val)* ixgbe_write_i2c_byte - Writes 8 bit word over I2C * @hw: pointer to hardware structure * @byte_offset: byte offset to write +* @dev_addr: I2C bus address to write to * @data: value to write * * Performs byte write operation to SFP module's EEPROM over I2C interface
@@ -1339,6 +1340,21 @@ s32 ixgbe_write_i2c_byte(struct ixgbe_hw *hw, u8 byte_offset, u8 dev_addr, }/** +* ixgbe_write_i2c_combined - Perform I2C write combined operation +* @hw: pointer to the hardware structure +* @addr: I2C bus address to write to +* @reg: I2C device register to write to +* @val: value to write +* +* Returns an error code on error. +*/ +s32 ixgbe_write_i2c_combined (struct ixgbe_hw *hw,u8 addr,u16 reg,u16 val) +{ +return ixgbe_call_func (hw, hw->phy.ops.write_i2c_combined, (hw, addr, + reg, val),IXGBE_NOT_IMPLEMENTED ); +} + +/** * ixgbe_write_i2c_eeprom - Writes 8 bit EEPROM word over I2C interface * @hw: pointer to hardware structure * @byte_offset: EEPROM byte offset to write
lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.h +1 -0
@@ -174,6 +174,7 @@ s32 ixgbe_read_i2c_byte(struct ixgbe_hw *hw, u8 byte_offset, u8 dev_addr,s32 ixgbe_read_i2c_combined (struct ixgbe_hw *hw,u8 addr,u16 reg,u16 *val);s32 ixgbe_write_i2c_byte (struct ixgbe_hw *hw,u8 byte_offset,u8 dev_addr,u8 data); +s32 ixgbe_write_i2c_combined (struct ixgbe_hw *hw,u8 addr,u16 reg,u16 val);s32 ixgbe_write_i2c_eeprom (struct ixgbe_hw *hw,u8 byte_offset,u8 eeprom_data);s32 ixgbe_get_san_mac_addr (struct ixgbe_hw *hw,u8 *san_mac_addr);s32 ixgbe_set_san_mac_addr (struct ixgbe_hw *hw,u8 *san_mac_addr);
lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c +9 -2
@@ -787,6 +787,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" );
@@ -827,8 +828,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; }/**
Signature · 1 line
1.8.4.2
PATCH 24/36 ixgbe base codes: Support 5G link speed
In reply to a message not in the archiveSupport 5G link speed for X550.
--- lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c | 4 ++++ lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c | 15 +++++++++++++++ lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h | 3 ++- 3 files changed, 21 insertions(+), 1 deletion(-)
lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c +4 -0
@@ -4094,6 +4094,10 @@ s32 ixgbe_check_mac_link_generic(struct ixgbe_hw *hw, ixgbe_link_speed *speed, IXGBE_LINKS_SPEED_100_82599) *speed =IXGBE_LINK_SPEED_100_FULL ; else + if (hw->mac.type >= ixgbe_mac_X550) { +if (links_reg &IXGBE_LINKS_SPEED_NON_STD ) + *speed =IXGBE_LINK_SPEED_5GB_FULL ; + } *speed =IXGBE_LINK_SPEED_UNKNOWN ;return IXGBE_SUCCESS ;
lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c +15 -0
@@ -816,6 +816,12 @@ s32 ixgbe_setup_phy_link_speed_generic(struct ixgbe_hw *hw,if (speed &IXGBE_LINK_SPEED_10GB_FULL ) hw->phy.autoneg_advertised |=IXGBE_LINK_SPEED_10GB_FULL ; +if (speed &IXGBE_LINK_SPEED_5GB_FULL ) + hw->phy.autoneg_advertised |=IXGBE_LINK_SPEED_5GB_FULL ; + +if (speed &IXGBE_LINK_SPEED_2_5GB_FULL ) + hw->phy.autoneg_advertised |=IXGBE_LINK_SPEED_2_5GB_FULL ; +if (speed &IXGBE_LINK_SPEED_1GB_FULL ) hw->phy.autoneg_advertised |=IXGBE_LINK_SPEED_1GB_FULL ;
@@ -861,6 +867,15 @@ s32 ixgbe_get_copper_link_capabilities_generic(struct ixgbe_hw *hw, *speed |=IXGBE_LINK_SPEED_100_FULL ; } +/* Internal PHY does not support 100 Mbps */ +if (hw->mac.type == ixgbe_mac_X550EM_x) + *speed &= ~IXGBE_LINK_SPEED_100_FULL ; + +if (hw->mac.type == ixgbe_mac_X550) { + *speed |=IXGBE_LINK_SPEED_2_5GB_FULL ; + *speed |=IXGBE_LINK_SPEED_5GB_FULL ; + } +return status; }
lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h +2 -1
@@ -3032,7 +3032,8 @@ typedef u32 ixgbe_link_speed;#define IXGBE_LINK_SPEED_UNKNOWN 0#define IXGBE_LINK_SPEED_100_FULL 0x0008#define IXGBE_LINK_SPEED_1GB_FULL 0x0020 -#define IXGBE_LINK_SPEED_2_5GB_FULL 0x0040 +#define IXGBE_LINK_SPEED_2_5GB_FULL 0x0400 +#define IXGBE_LINK_SPEED_5GB_FULL 0x0800#define IXGBE_LINK_SPEED_10GB_FULL 0x0080#define IXGBE_LINK_SPEED_82598_AUTONEG (IXGBE_LINK_SPEED_1GB_FULL | \ IXGBE_LINK_SPEED_10GB_FULL)
Signature · 1 line
1.8.4.2
PATCH 25/36 ixgbe base codes: Refine branch statement
In reply to a message not in the archiveUse switch-case statement to replace if-else statement.
--- lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-)
lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c +9 -8
@@ -4079,26 +4079,27 @@ s32 ixgbe_check_mac_link_generic(struct ixgbe_hw *hw, ixgbe_link_speed *speed, *link_up = false; } -if ((links_reg &IXGBE_LINKS_SPEED_82599 ) == -IXGBE_LINKS_SPEED_10G_82599 ) { +switch (links_reg &IXGBE_LINKS_SPEED_82599 ) { +case IXGBE_LINKS_SPEED_10G_82599 : *speed =IXGBE_LINK_SPEED_10GB_FULL ;if (hw->mac.type >= ixgbe_mac_X550) {if (links_reg &IXGBE_LINKS_SPEED_NON_STD ) *speed =IXGBE_LINK_SPEED_2_5GB_FULL ; } - } -else if ((links_reg &IXGBE_LINKS_SPEED_82599 ) == -IXGBE_LINKS_SPEED_1G_82599 ) +break ; +case IXGBE_LINKS_SPEED_1G_82599 : *speed =IXGBE_LINK_SPEED_1GB_FULL ; -else if ((links_reg &IXGBE_LINKS_SPEED_82599 ) == -IXGBE_LINKS_SPEED_100_82599 ) +break ; +case IXGBE_LINKS_SPEED_100_82599 : *speed =IXGBE_LINK_SPEED_100_FULL ; -else if (hw->mac.type >= ixgbe_mac_X550) {if (links_reg &IXGBE_LINKS_SPEED_NON_STD ) *speed =IXGBE_LINK_SPEED_5GB_FULL ; } +break ; +default : *speed =IXGBE_LINK_SPEED_UNKNOWN ; + }return IXGBE_SUCCESS ; }
Signature · 1 line
1.8.4.2
PATCH 26/36 ixgbe base codes: SFP probe
In reply to a message not in the archiveCheck if SFP is detected or not.
--- lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c | 18 ++++++++++++++++++ lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.h | 4 ++++ 2 files changed, 22 insertions(+)
lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c +18 -0
@@ -1890,6 +1890,21 @@ s32 ixgbe_write_i2c_eeprom_generic(struct ixgbe_hw *hw, u8 byte_offset, }/** +* ixgbe_is_sfp_probe - Returns true if SFP is being detected +* @hw: pointer to hardware structure +* @offset: eeprom offset to be read +* @addr: I2C address to be read +*/ +STATIC bool ixgbe_is_sfp_probe(struct ixgbe_hw *hw, u8 offset, u8 addr) +{ +if (addr ==IXGBE_I2C_EEPROM_DEV_ADDR && + offset ==IXGBE_SFF_IDENTIFIER && + hw->phy.sfp_type == ixgbe_sfp_type_not_present) +return true; +return false; +} + +/** * ixgbe_read_i2c_byte_generic - Reads 8 bit word over I2C * @hw: pointer to hardware structure * @byte_offset: byte offset to read
@@ -1910,6 +1925,9 @@ s32 ixgbe_read_i2c_byte_generic(struct ixgbe_hw *hw, u8 byte_offset,DEBUGFUNC ("ixgbe_read_i2c_byte_generic" ); +if (ixgbe_is_sfp_probe (hw, byte_offset, dev_addr)) + max_retry =IXGBE_SFP_DETECT_RETRIES ; + do { if (hw->mac.ops.acquire_swfw_sync(hw, swfw_mask)) return IXGBE_ERR_SWFW_SYNC;
lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.h +4 -0
@@ -114,6 +114,10 @@ POSSIBILITY OF SUCH DAMAGE.#define IXGBE_I2C_T_SU_STO 4#define IXGBE_I2C_T_BUF 5 +#ifndef IXGBE_SFP_DETECT_RETRIES +#define IXGBE_SFP_DETECT_RETRIES 10 + +#endif /* IXGBE_SFP_DETECT_RETRIES */ #define IXGBE_TN_LASI_STATUS_REG 0x9005#define IXGBE_TN_LASI_STATUS_TEMP_ALARM 0x0008
Signature · 1 line
1.8.4.2
PATCH 27/36 ixgbe base codes: Set LAN ID
In reply to a message not in the archiveLAN ID is needed for i2c access, so move it before reading I2C eeprom.
--- lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c +3 -3
@@ -1217,6 +1217,9 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw) goto out; } +/* LAN ID is needed for I2C access */ + hw->mac.ops.set_lan_id (hw); + status = hw->phy.ops.read_i2c_eeprom (hw,IXGBE_SFF_IDENTIFIER , &identifier);
@@ -1224,9 +1227,6 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)if (status !=IXGBE_SUCCESS ) goto err_read_i2c_eeprom; -/* LAN ID is needed for sfp_type determination */ - hw->mac.ops.set_lan_id (hw); -if (identifier !=IXGBE_SFF_IDENTIFIER_SFP ) { hw->phy.type = ixgbe_phy_sfp_unsupported; status =IXGBE_ERR_SFP_NOT_SUPPORTED ;
Signature · 1 line
1.8.4.2
PATCH 28/36 ixgbe base codes: Calculate checksum
In reply to a message not in the archiveAdd function to calculate checksum for X550; and add buffer into argument list to hold the eeprom image.
--- lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c | 74 ++++++++++++++++++++++++--------- lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.h | 1 + 2 files changed, 55 insertions(+), 20 deletions(-)
lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c +54 -20
@@ -1689,19 +1689,28 @@ out:* Returns error status for any failure */ STATIC s32 ixgbe_checksum_ptr_x550(struct ixgbe_hw *hw, u16 ptr, -u16 size,u16 *csum) +u16 size,u16 *csum,u16 *buffer, +u32 buffer_size) {u16 buf[256 ];s32 status;u16 length, bufsz, i, start; +u16 *local_buffer; bufsz =sizeof (buf) /sizeof (buf[0 ]);/* Read a chunk at the pointer location */ - status =ixgbe_read_ee_hostif_buffer_X550 (hw, ptr, bufsz, buf); -if (status) { -DEBUGOUT ("Failed to read EEPROM image\n" ); -return status; +if (!buffer) { + status =ixgbe_read_ee_hostif_buffer_X550 (hw, ptr, bufsz, buf); +if (status) { +DEBUGOUT ("Failed to read EEPROM image\n" ); +return status; + } + local_buffer = buf; + }else { +if (buffer_size < ptr) +return IXGBE_ERR_PARAM ; + local_buffer = &buffer[ptr]; }if (size) {
@@ -1709,7 +1718,7 @@ STATIC s32 ixgbe_checksum_ptr_x550(struct ixgbe_hw *hw, u16 ptr, length = size; }else { start =1 ; - length = buf[0 ]; + length = local_buffer[0 ];/* Skip pointer section if length is invalid. */ if (length == 0xFFFF || length == 0 ||
@@ -1717,8 +1726,11 @@ STATIC s32 ixgbe_checksum_ptr_x550(struct ixgbe_hw *hw, u16 ptr,return IXGBE_SUCCESS ; } +if (buffer && ((u32 )start + (u32 )length > buffer_size)) +return IXGBE_ERR_PARAM ; +for (i = start; length; i++, length--) { -if (i == bufsz) { +if (i == bufsz && !buffer) { ptr += bufsz; i =0 ;if (length < bufsz)
@@ -1732,20 +1744,23 @@ STATIC s32 ixgbe_checksum_ptr_x550(struct ixgbe_hw *hw, u16 ptr,return status; } } - *csum += buf[i]; + *csum += local_buffer[i]; }return IXGBE_SUCCESS ; }/** -* ixgbe_calc_eeprom_checksum_X550 - Calculates and returns the checksum +* ixgbe_calc_checksum_X550 - Calculates and returns the checksum * @hw: pointer to hardware structure +* @buffer: pointer to buffer containing calculated checksum +* @buffer_size: size of buffer * * Returns a negative error code on error, or the 16-bit checksum **/ -s32 ixgbe_calc_eeprom_checksum_X550 (struct ixgbe_hw *hw) +s32 ixgbe_calc_checksum_X550 (struct ixgbe_hw *hw,u16 *buffer,u32 buffer_size) {u16 eeprom_ptrs[IXGBE_EEPROM_LAST_WORD +1 ]; +u16 *local_buffer;s32 status;u16 checksum =0 ;u16 pointer, i, size;
@@ -1754,13 +1769,20 @@ s32 ixgbe_calc_eeprom_checksum_X550(struct ixgbe_hw *hw) hw->eeprom.ops.init_params (hw); -/* Read pointer area */ - status =ixgbe_read_ee_hostif_buffer_X550 (hw,0 , -IXGBE_EEPROM_LAST_WORD +1 , - eeprom_ptrs); -if (status) { -DEBUGOUT ("Failed to read EEPROM image\n" ); -return status; +if (!buffer) { +/* Read pointer area */ + status =ixgbe_read_ee_hostif_buffer_X550 (hw,0 , +IXGBE_EEPROM_LAST_WORD +1 , + eeprom_ptrs); +if (status) { +DEBUGOUT ("Failed to read EEPROM image\n" ); +return status; + } + local_buffer = eeprom_ptrs; + }else { +if (buffer_size <IXGBE_EEPROM_LAST_WORD ) +return IXGBE_ERR_PARAM ; + local_buffer = buffer; }/*
@@ -1769,7 +1791,7 @@ s32 ixgbe_calc_eeprom_checksum_X550(struct ixgbe_hw *hw)*/ for (i =0 ; i <=IXGBE_EEPROM_LAST_WORD ; i++)if (i !=IXGBE_EEPROM_CHECKSUM ) - checksum += eeprom_ptrs[i]; + checksum += local_buffer[i];/* * Include all data from pointers 0x3, 0x6-0xE. This excludes the
@@ -1779,7 +1801,7 @@ s32 ixgbe_calc_eeprom_checksum_X550(struct ixgbe_hw *hw)if (i ==IXGBE_PHY_PTR || i ==IXGBE_OPTION_ROM_PTR )continue ; - pointer = eeprom_ptrs[i]; + pointer = local_buffer[i];/* Skip pointer section if the pointer is invalid. */ if (pointer == 0xFFFF || pointer == 0 ||
@@ -1799,7 +1821,8 @@ s32 ixgbe_calc_eeprom_checksum_X550(struct ixgbe_hw *hw)break ; } - status =ixgbe_checksum_ptr_x550 (hw, pointer, size, &checksum); + status =ixgbe_checksum_ptr_x550 (hw, pointer, size, &checksum, + buffer, buffer_size);if (status)return status; }
@@ -1810,6 +1833,17 @@ s32 ixgbe_calc_eeprom_checksum_X550(struct ixgbe_hw *hw) }/** +* ixgbe_calc_eeprom_checksum_X550 - Calculates and returns the checksum +* @hw: pointer to hardware structure +* +* Returns a negative error code on error, or the 16-bit checksum +**/ +s32 ixgbe_calc_eeprom_checksum_X550 (struct ixgbe_hw *hw) +{ +return ixgbe_calc_checksum_X550 (hw,NULL ,0 ); +} + +/** * ixgbe_validate_eeprom_checksum_X550 - Validate EEPROM checksum * @hw: pointer to hardware structure * @checksum_val: calculated checksum
lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.h +1 -0
@@ -44,6 +44,7 @@ s32 ixgbe_get_bus_info_X550em(struct ixgbe_hw *hw);s32 ixgbe_init_eeprom_params_X550 (struct ixgbe_hw *hw);s32 ixgbe_update_eeprom_checksum_X550 (struct ixgbe_hw *hw);s32 ixgbe_calc_eeprom_checksum_X550 (struct ixgbe_hw *hw); +s32 ixgbe_calc_checksum_X550 (struct ixgbe_hw *hw,u16 *buffer,u32 buffer_size);s32 ixgbe_validate_eeprom_checksum_X550 (struct ixgbe_hw *hw,u16 *checksum_val);s32 ixgbe_update_flash_X550 (struct ixgbe_hw *hw); s32 ixgbe_write_ee_hostif_buffer_X550(struct ixgbe_hw *hw,
Signature · 1 line
1.8.4.2
PATCH 29/36 ixgbe base codes: Command for flow director
In reply to a message not in the archiveAdd flow director command into argument to hold the current value of FDIRCMD register; handle flow director mask for non-clound mode.
--- lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c | 124 ++++++++++++++++++------------- 1 file changed, 73 insertions(+), 51 deletions(-)
lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c +73 -51
@@ -1333,14 +1333,15 @@ reset_hw_out:/** * ixgbe_fdir_check_cmd_complete - poll to check whether FDIRCMD is complete * @hw: pointer to hardware structure +* @fdircmd: current value of FDIRCMD register */ -STATIC s32 ixgbe_fdir_check_cmd_complete(struct ixgbe_hw *hw) +STATIC s32 ixgbe_fdir_check_cmd_complete(struct ixgbe_hw *hw, u32 *fdircmd) {int i;for (i =0 ; i <IXGBE_FDIRCMD_CMD_POLL ; i++) { -if (!(IXGBE_READ_REG (hw,IXGBE_FDIRCMD ) & -IXGBE_FDIRCMD_CMD_MASK )) + *fdircmd =IXGBE_READ_REG (hw,IXGBE_FDIRCMD ); +if (!(*fdircmd &IXGBE_FDIRCMD_CMD_MASK ))return IXGBE_SUCCESS ;usec_delay (10 ); }
@@ -1357,6 +1358,7 @@ s32 ixgbe_reinit_fdir_tables_82599(struct ixgbe_hw *hw)s32 err;int i;u32 fdirctrl =IXGBE_READ_REG (hw,IXGBE_FDIRCTRL ); +u32 fdircmd; fdirctrl &= ~IXGBE_FDIRCTRL_INIT_DONE ;DEBUGFUNC ("ixgbe_reinit_fdir_tables_82599" );
@@ -1365,7 +1367,7 @@ s32 ixgbe_reinit_fdir_tables_82599(struct ixgbe_hw *hw)* Before starting reinitialization process, * FDIRCMD.CMD must be zero. */ - err =ixgbe_fdir_check_cmd_complete (hw); + err =ixgbe_fdir_check_cmd_complete (hw, &fdircmd);if (err) {DEBUGOUT ("Flow Director previous command did not complete, aborting table re-initialization.\n" );return err;
@@ -1621,6 +1623,9 @@ u32 ixgbe_atr_compute_sig_hash_82599(union ixgbe_atr_hash_dword input,* @input: unique input dword * @common: compressed common input dword * @queue: queue index to direct traffic to +* +* Note that the tunnel bit in input must not be set when the hardware +* tunneling support does not exist. **/ s32 ixgbe_fdir_add_signature_filter_82599(struct ixgbe_hw *hw, union ixgbe_atr_hash_dword input,
@@ -1628,6 +1633,8 @@ s32 ixgbe_fdir_add_signature_filter_82599(struct ixgbe_hw *hw, u8 queue) {u64 fdirhashcmd; +u8 flow_type; +bool tunnel;u32 fdircmd;s32 err;
@@ -1638,7 +1645,10 @@ s32 ixgbe_fdir_add_signature_filter_82599(struct ixgbe_hw *hw,* lowest 2 bits are FDIRCMD.L4TYPE, third lowest bit is FDIRCMD.IPV6 * fifth is FDIRCMD.TUNNEL_FILTER */ -switch (input.formatted.flow_type) { + tunnel = !!(input.formatted.flow_type &IXGBE_ATR_L4TYPE_TUNNEL_MASK ); + flow_type = input.formatted.flow_type & + (IXGBE_ATR_L4TYPE_TUNNEL_MASK -1 ); +switch (flow_type) {case IXGBE_ATR_FLOW_TYPE_TCPV4 :case IXGBE_ATR_FLOW_TYPE_UDPV4 :case IXGBE_ATR_FLOW_TYPE_SCTPV4 :
@@ -1654,8 +1664,10 @@ s32 ixgbe_fdir_add_signature_filter_82599(struct ixgbe_hw *hw,/* configure FDIRCMD register */ fdircmd =IXGBE_FDIRCMD_CMD_ADD_FLOW |IXGBE_FDIRCMD_FILTER_UPDATE |IXGBE_FDIRCMD_LAST |IXGBE_FDIRCMD_QUEUE_EN ; - fdircmd |= input.formatted.flow_type <<IXGBE_FDIRCMD_FLOW_TYPE_SHIFT ; + fdircmd |= (u32 )flow_type <<IXGBE_FDIRCMD_FLOW_TYPE_SHIFT ; fdircmd |= (u32 )queue <<IXGBE_FDIRCMD_RX_QUEUE_SHIFT ; +if (tunnel) + fdircmd |=IXGBE_FDIRCMD_TUNNEL_FILTER ;/* * The lower 32-bits of fdirhashcmd is for FDIRHASH, the upper 32-bits
@@ -1665,7 +1677,7 @@ s32 ixgbe_fdir_add_signature_filter_82599(struct ixgbe_hw *hw, fdirhashcmd |=ixgbe_atr_compute_sig_hash_82599 (input, common);IXGBE_WRITE_REG64 (hw,IXGBE_FDIRHASH , fdirhashcmd); - err =ixgbe_fdir_check_cmd_complete (hw); + err =ixgbe_fdir_check_cmd_complete (hw, &fdircmd);if (err) {DEBUGOUT ("Flow Director command did not complete!\n" );return err;
@@ -1902,33 +1914,39 @@ s32 ixgbe_fdir_set_input_mask_82599(struct ixgbe_hw *hw,return IXGBE_ERR_CONFIG ; }IXGBE_WRITE_REG_BE32 (hw,IXGBE_FDIRIP6M , fdirip6m); + +/* Set all bits in FDIRSIP4M and FDIRDIP4M cloud mode */ +IXGBE_WRITE_REG_BE32 (hw,IXGBE_FDIRDIP4M ,0xFFFFFFFF ); +IXGBE_WRITE_REG_BE32 (hw,IXGBE_FDIRSIP4M ,0xFFFFFFFF ); }/* Now mask VM pool and destination IPv6 - bits 5 and 2 */ IXGBE_WRITE_REG (hw,IXGBE_FDIRM , fdirm); -/* store the TCP/UDP port masks, bit reversed from port layout */ - fdirtcpm =ixgbe_get_fdirtcpm_82599 (input_mask); - -/* write both the same so that UDP and TCP use the same mask */ -IXGBE_WRITE_REG (hw,IXGBE_FDIRTCPM , ~fdirtcpm); -IXGBE_WRITE_REG (hw,IXGBE_FDIRUDPM , ~fdirtcpm); -/* also use it for SCTP */ -switch (hw->mac.type) { -case ixgbe_mac_X550: -case ixgbe_mac_X550EM_x: -IXGBE_WRITE_REG (hw,IXGBE_FDIRSCTPM , ~fdirtcpm); -break ; -default : -break ; - } - -/* store source and destination IP masks (big-endian) */ -IXGBE_WRITE_REG_BE32 (hw,IXGBE_FDIRSIP4M , - ~input_mask->formatted.src_ip[0 ]); -IXGBE_WRITE_REG_BE32 (hw,IXGBE_FDIRDIP4M , - ~input_mask->formatted.dst_ip[0 ]); +if (!cloud_mode) { +/* store the TCP/UDP port masks, bit reversed from port +* layout */ + fdirtcpm =ixgbe_get_fdirtcpm_82599 (input_mask); + +/* write both the same so that UDP and TCP use the same mask */ +IXGBE_WRITE_REG (hw,IXGBE_FDIRTCPM , ~fdirtcpm); +IXGBE_WRITE_REG (hw,IXGBE_FDIRUDPM , ~fdirtcpm); +/* also use it for SCTP */ +switch (hw->mac.type) { +case ixgbe_mac_X550: +case ixgbe_mac_X550EM_x: +IXGBE_WRITE_REG (hw,IXGBE_FDIRSCTPM , ~fdirtcpm); +break ; +default : +break ; + } +/* store source and destination IP masks (big-enian) */ +IXGBE_WRITE_REG_BE32 (hw,IXGBE_FDIRSIP4M , + ~input_mask->formatted.src_ip[0 ]); +IXGBE_WRITE_REG_BE32 (hw,IXGBE_FDIRDIP4M , + ~input_mask->formatted.dst_ip[0 ]); + }return IXGBE_SUCCESS ; }
@@ -1942,26 +1960,30 @@ s32 ixgbe_fdir_write_perfect_filter_82599(struct ixgbe_hw *hw,s32 err;DEBUGFUNC ("ixgbe_fdir_write_perfect_filter_82599" ); - -/* currently IPv6 is not supported, must be programmed with 0 */ -IXGBE_WRITE_REG_BE32 (hw,IXGBE_FDIRSIPv6 (0 ), - input->formatted.src_ip[0 ]); -IXGBE_WRITE_REG_BE32 (hw,IXGBE_FDIRSIPv6 (1 ), - input->formatted.src_ip[1 ]); -IXGBE_WRITE_REG_BE32 (hw,IXGBE_FDIRSIPv6 (2 ), - input->formatted.src_ip[2 ]); - -/* record the source address (big-endian) */ -IXGBE_WRITE_REG_BE32 (hw,IXGBE_FDIRIPSA , input->formatted.src_ip[0 ]); - -/* record the first 32 bits of the destination address (big-endian) */ -IXGBE_WRITE_REG_BE32 (hw,IXGBE_FDIRIPDA , input->formatted.dst_ip[0 ]); - -/* record source and destination port (little-endian)*/ - fdirport =IXGBE_NTOHS (input->formatted.dst_port); - fdirport <<=IXGBE_FDIRPORT_DESTINATION_SHIFT ; - fdirport |=IXGBE_NTOHS (input->formatted.src_port); -IXGBE_WRITE_REG (hw,IXGBE_FDIRPORT , fdirport); +if (!cloud_mode) { +/* currently IPv6 is not supported, must be programmed with 0 */ +IXGBE_WRITE_REG_BE32 (hw,IXGBE_FDIRSIPv6 (0 ), + input->formatted.src_ip[0 ]); +IXGBE_WRITE_REG_BE32 (hw,IXGBE_FDIRSIPv6 (1 ), + input->formatted.src_ip[1 ]); +IXGBE_WRITE_REG_BE32 (hw,IXGBE_FDIRSIPv6 (2 ), + input->formatted.src_ip[2 ]); + +/* record the source address (big-endian) */ +IXGBE_WRITE_REG_BE32 (hw,IXGBE_FDIRIPSA , + input->formatted.src_ip[0 ]); + +/* record the first 32 bits of the destination address +* (big-endian) */ +IXGBE_WRITE_REG_BE32 (hw,IXGBE_FDIRIPDA , + input->formatted.dst_ip[0 ]); + +/* record source and destination port (little-endian)*/ + fdirport =IXGBE_NTOHS (input->formatted.dst_port); + fdirport <<=IXGBE_FDIRPORT_DESTINATION_SHIFT ; + fdirport |=IXGBE_NTOHS (input->formatted.src_port); +IXGBE_WRITE_REG (hw,IXGBE_FDIRPORT , fdirport); + }/* record VLAN (little-endian) and flex_bytes(big-endian) */ fdirvlan =IXGBE_STORE_AS_BE16 (input->formatted.flex_bytes);
@@ -2008,7 +2030,7 @@ s32 ixgbe_fdir_write_perfect_filter_82599(struct ixgbe_hw *hw, fdircmd |= (u32 )input->formatted.vm_pool <<IXGBE_FDIRCMD_VT_POOL_SHIFT ;IXGBE_WRITE_REG (hw,IXGBE_FDIRCMD , fdircmd); - err =ixgbe_fdir_check_cmd_complete (hw); + err =ixgbe_fdir_check_cmd_complete (hw, &fdircmd);if (err) {DEBUGOUT ("Flow Director command did not complete!\n" );return err;
@@ -2022,7 +2044,7 @@ s32 ixgbe_fdir_erase_perfect_filter_82599(struct ixgbe_hw *hw, u16 soft_id) {u32 fdirhash; -u32 fdircmd =0 ; +u32 fdircmd;s32 err;/* configure FDIRHASH register */
@@ -2036,7 +2058,7 @@ s32 ixgbe_fdir_erase_perfect_filter_82599(struct ixgbe_hw *hw,/* Query if filter is present */ IXGBE_WRITE_REG (hw,IXGBE_FDIRCMD ,IXGBE_FDIRCMD_CMD_QUERY_REM_FILT ); - err =ixgbe_fdir_check_cmd_complete (hw); + err =ixgbe_fdir_check_cmd_complete (hw, &fdircmd);if (err) {DEBUGOUT ("Flow Director command did not complete!\n" );return err;
Signature · 1 line
1.8.4.2
PATCH 30/36 ixgbe base codes: Auto-negotiation
In reply to a message not in the archiveAuto-negotiation for link speed of 5G.
--- lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c | 41 ++++++++++++++++++++++++++++++++- lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h | 2 ++ 2 files changed, 42 insertions(+), 1 deletion(-)
lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c +40 -1
@@ -745,6 +745,44 @@ s32 ixgbe_setup_phy_link_generic(struct ixgbe_hw *hw) autoneg_reg); } +if (hw->mac.type == ixgbe_mac_X550) { +if (speed &IXGBE_LINK_SPEED_5GB_FULL ) { +/* Set or unset auto-negotiation 1G advertisement */ + hw->phy.ops.read_reg (hw, +IXGBE_MII_AUTONEG_VENDOR_PROVISION_1_REG , +IXGBE_MDIO_AUTO_NEG_DEV_TYPE , + &autoneg_reg); + + autoneg_reg &= ~IXGBE_MII_5GBASE_T_ADVERTISE ; +if (hw->phy.autoneg_advertised & +IXGBE_LINK_SPEED_5GB_FULL ) + autoneg_reg |=IXGBE_MII_5GBASE_T_ADVERTISE ; + + hw->phy.ops.write_reg (hw, +IXGBE_MII_AUTONEG_VENDOR_PROVISION_1_REG , +IXGBE_MDIO_AUTO_NEG_DEV_TYPE , + autoneg_reg); + } + +if (speed &IXGBE_LINK_SPEED_2_5GB_FULL ) { +/* Set or unset auto-negotiation 1G advertisement */ + hw->phy.ops.read_reg (hw, +IXGBE_MII_AUTONEG_VENDOR_PROVISION_1_REG , +IXGBE_MDIO_AUTO_NEG_DEV_TYPE , + &autoneg_reg); + + autoneg_reg &= ~IXGBE_MII_2_5GBASE_T_ADVERTISE ; +if (hw->phy.autoneg_advertised & +IXGBE_LINK_SPEED_2_5GB_FULL ) + autoneg_reg |=IXGBE_MII_2_5GBASE_T_ADVERTISE ; + + hw->phy.ops.write_reg (hw, +IXGBE_MII_AUTONEG_VENDOR_PROVISION_1_REG , +IXGBE_MDIO_AUTO_NEG_DEV_TYPE , + autoneg_reg); + } + } +if (speed &IXGBE_LINK_SPEED_1GB_FULL ) {/* Set or unset auto-negotiation 1G advertisement */ hw->phy.ops.read_reg(hw,
@@ -840,7 +878,8 @@ s32 ixgbe_setup_phy_link_speed_generic(struct ixgbe_hw *hw,* @speed: pointer to link speed * @autoneg: boolean auto-negotiation value * -* Determines the link capabilities by reading the AUTOC register. +* Determines the supported link capabilities by reading the PHY auto +* negotiation register. **/ s32 ixgbe_get_copper_link_capabilities_generic(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h +2 -0
@@ -1433,6 +1433,8 @@ struct ixgbe_dmac_config {#define IXGBE_MII_10GBASE_T_ADVERTISE 0x1000/* full duplex, bit:12*/ #define IXGBE_MII_1GBASE_T_ADVERTISE_XNP_TX 0x4000/* full duplex, bit:14*/ #define IXGBE_MII_1GBASE_T_ADVERTISE 0x8000/* full duplex, bit:15*/ +#define IXGBE_MII_2_5GBASE_T_ADVERTISE 0x0400 +#define IXGBE_MII_5GBASE_T_ADVERTISE 0x0800#define IXGBE_MII_100BASE_T_ADVERTISE 0x0100/* full duplex, bit:8 */ #define IXGBE_MII_100BASE_T_ADVERTISE_HALF 0x0080/* half duplex, bit:7 */ #define IXGBE_MII_RESTART 0x200
Signature · 1 line
1.8.4.2
PATCH 31/36 ixgbe base codes: Bit-bang mode
In reply to a message not in the archiveSupport the bit-bang mode on X550;
And negate I2C output enable;
--- lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c | 66 +++++++++++++++++++++++++++++++-- lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h | 6 +++ 2 files changed, 68 insertions(+), 4 deletions(-)
lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c +62 -4
@@ -2103,6 +2103,7 @@ write_byte_out:* @hw: pointer to hardware structure * * Sets I2C start condition (High -> Low on SDA while SCL is High) +* Set bit-bang mode on X550 hardware. **/ STATIC void ixgbe_i2c_start(struct ixgbe_hw *hw) {
@@ -2110,6 +2111,8 @@ STATIC void ixgbe_i2c_start(struct ixgbe_hw *hw)DEBUGFUNC ("ixgbe_i2c_start" ); + i2cctl |=IXGBE_I2C_BB_EN_BY_MAC (hw); +/* Start condition must begin with data and clock high */ ixgbe_set_i2c_data (hw, &i2cctl,1 );ixgbe_raise_i2c_clk (hw, &i2cctl);
@@ -2134,10 +2137,15 @@ STATIC void ixgbe_i2c_start(struct ixgbe_hw *hw)* @hw: pointer to hardware structure * * Sets I2C stop condition (Low -> High on SDA while SCL is High) +* Disables bit-bang mode and negates data output enable on X550 +* hardware. **/ STATIC void ixgbe_i2c_stop(struct ixgbe_hw *hw) {u32 i2cctl =IXGBE_READ_REG (hw,IXGBE_I2CCTL_BY_MAC (hw)); +u32 data_oe_bit =IXGBE_I2C_DATA_OE_N_EN_BY_MAC (hw); +u32 clk_oe_bit =IXGBE_I2C_CLK_OE_N_EN_BY_MAC (hw); +u32 bb_en_bit =IXGBE_I2C_BB_EN_BY_MAC (hw);DEBUGFUNC ("ixgbe_i2c_stop" );
@@ -2152,6 +2160,13 @@ STATIC void ixgbe_i2c_stop(struct ixgbe_hw *hw)/* bus free time between stop and start (4.7us)*/ usec_delay (IXGBE_I2C_T_BUF ); + +if (bb_en_bit || data_oe_bit || clk_oe_bit) { + i2cctl &= ~bb_en_bit; + i2cctl |= data_oe_bit | clk_oe_bit; +IXGBE_WRITE_REG (hw,IXGBE_I2CCTL_BY_MAC (hw), i2cctl); +IXGBE_WRITE_FLUSH (hw); + } }/**
@@ -2168,6 +2183,7 @@ STATIC s32 ixgbe_clock_in_i2c_byte(struct ixgbe_hw *hw, u8 *data)DEBUGFUNC ("ixgbe_clock_in_i2c_byte" ); + *data =0 ;for (i =7 ; i >=0 ; i--) {ixgbe_clock_in_i2c_bit (hw, &bit); *data |= bit << i;
@@ -2203,6 +2219,7 @@ STATIC s32 ixgbe_clock_out_i2c_byte(struct ixgbe_hw *hw, u8 data)/* Release SDA line (set high) */ i2cctl =IXGBE_READ_REG (hw,IXGBE_I2CCTL_BY_MAC (hw)); i2cctl |=IXGBE_I2C_DATA_OUT_BY_MAC (hw); + i2cctl |=IXGBE_I2C_DATA_OE_N_EN_BY_MAC (hw);IXGBE_WRITE_REG (hw,IXGBE_I2CCTL_BY_MAC (hw), i2cctl);IXGBE_WRITE_FLUSH (hw);
@@ -2217,6 +2234,7 @@ STATIC s32 ixgbe_clock_out_i2c_byte(struct ixgbe_hw *hw, u8 data)**/ STATIC s32 ixgbe_get_i2c_ack(struct ixgbe_hw *hw) { +u32 data_oe_bit =IXGBE_I2C_DATA_OE_N_EN_BY_MAC (hw);s32 status =IXGBE_SUCCESS ;u32 i =0 ;u32 i2cctl =IXGBE_READ_REG (hw,IXGBE_I2CCTL_BY_MAC (hw));
@@ -2225,9 +2243,14 @@ STATIC s32 ixgbe_get_i2c_ack(struct ixgbe_hw *hw)DEBUGFUNC ("ixgbe_get_i2c_ack" ); +if (data_oe_bit) { + i2cctl |=IXGBE_I2C_DATA_OUT_BY_MAC (hw); + i2cctl |= data_oe_bit; +IXGBE_WRITE_REG (hw,IXGBE_I2CCTL_BY_MAC (hw), i2cctl); +IXGBE_WRITE_FLUSH (hw); + }ixgbe_raise_i2c_clk (hw, &i2cctl); -/* Minimum high period of clock is 4us */ usec_delay (IXGBE_I2C_T_HIGH );
@@ -2265,9 +2288,16 @@ STATIC s32 ixgbe_get_i2c_ack(struct ixgbe_hw *hw) STATIC s32 ixgbe_clock_in_i2c_bit(struct ixgbe_hw *hw, bool *data) {u32 i2cctl =IXGBE_READ_REG (hw,IXGBE_I2CCTL_BY_MAC (hw)); +u32 data_oe_bit =IXGBE_I2C_DATA_OE_N_EN_BY_MAC (hw);DEBUGFUNC ("ixgbe_clock_in_i2c_bit" ); +if (data_oe_bit) { + i2cctl |=IXGBE_I2C_DATA_OUT_BY_MAC (hw); + i2cctl |= data_oe_bit; +IXGBE_WRITE_REG (hw,IXGBE_I2CCTL_BY_MAC (hw), i2cctl); +IXGBE_WRITE_FLUSH (hw); + }ixgbe_raise_i2c_clk (hw, &i2cctl);/* Minimum high period of clock is 4us */
@@ -2326,15 +2356,22 @@ STATIC s32 ixgbe_clock_out_i2c_bit(struct ixgbe_hw *hw, bool data)* @i2cctl: Current value of I2CCTL register * * Raises the I2C clock line '0'->'1' +* Negates the I2C clock output enable on X550 hardware. **/ STATIC void ixgbe_raise_i2c_clk(struct ixgbe_hw *hw, u32 *i2cctl) { +u32 clk_oe_bit =IXGBE_I2C_CLK_OE_N_EN_BY_MAC (hw);u32 i =0 ;u32 timeout =IXGBE_I2C_CLOCK_STRETCHING_TIMEOUT ;u32 i2cctl_r =0 ;DEBUGFUNC ("ixgbe_raise_i2c_clk" ); +if (clk_oe_bit) { + *i2cctl |= clk_oe_bit; +IXGBE_WRITE_REG (hw,IXGBE_I2CCTL_BY_MAC (hw), *i2cctl); + } +for (i =0 ; i < timeout; i++) { *i2cctl |=IXGBE_I2C_CLK_OUT_BY_MAC (hw);
@@ -2355,13 +2392,14 @@ STATIC void ixgbe_raise_i2c_clk(struct ixgbe_hw *hw, u32 *i2cctl)* @i2cctl: Current value of I2CCTL register * * Lowers the I2C clock line '1'->'0' +* Asserts the I2C clock output enable on X550 hardware. **/ STATIC void ixgbe_lower_i2c_clk(struct ixgbe_hw *hw, u32 *i2cctl) { -DEBUGFUNC ("ixgbe_lower_i2c_clk" ); *i2cctl &= ~(IXGBE_I2C_CLK_OUT_BY_MAC (hw)); + *i2cctl &= ~IXGBE_I2C_CLK_OE_N_EN_BY_MAC (hw);IXGBE_WRITE_REG (hw,IXGBE_I2CCTL_BY_MAC (hw), *i2cctl);IXGBE_WRITE_FLUSH (hw);
@@ -2377,9 +2415,11 @@ STATIC void ixgbe_lower_i2c_clk(struct ixgbe_hw *hw, u32 *i2cctl)* @data: I2C data value (0 or 1) to set * * Sets the I2C data bit +* Asserts the I2C data output enable on X550 hardware. **/ STATIC s32 ixgbe_set_i2c_data(struct ixgbe_hw *hw, u32 *i2cctl, bool data) { +u32 data_oe_bit =IXGBE_I2C_DATA_OE_N_EN_BY_MAC (hw);s32 status =IXGBE_SUCCESS ;DEBUGFUNC ("ixgbe_set_i2c_data" );
@@ -2388,6 +2428,7 @@ STATIC s32 ixgbe_set_i2c_data(struct ixgbe_hw *hw, u32 *i2cctl, bool data) *i2cctl |=IXGBE_I2C_DATA_OUT_BY_MAC (hw); else *i2cctl &= ~(IXGBE_I2C_DATA_OUT_BY_MAC (hw)); + *i2cctl &= ~data_oe_bit;IXGBE_WRITE_REG (hw,IXGBE_I2CCTL_BY_MAC (hw), *i2cctl);IXGBE_WRITE_FLUSH (hw);
@@ -2395,6 +2436,14 @@ STATIC s32 ixgbe_set_i2c_data(struct ixgbe_hw *hw, u32 *i2cctl, bool data)/* Data rise/fall (1000ns/300ns) and set-up time (250ns) */ usec_delay (IXGBE_I2C_T_RISE +IXGBE_I2C_T_FALL +IXGBE_I2C_T_SU_DATA ); +if (!data)/* Can't verify data in this case */ +return IXGBE_SUCCESS ; +if (data_oe_bit) { + *i2cctl |= data_oe_bit; +IXGBE_WRITE_REG (hw,IXGBE_I2CCTL_BY_MAC (hw), *i2cctl); +IXGBE_WRITE_FLUSH (hw); + } +/* Verify data was set correctly */ *i2cctl =IXGBE_READ_REG (hw,IXGBE_I2CCTL_BY_MAC (hw));if (data !=ixgbe_get_i2c_data (hw, i2cctl)) {
@@ -2413,14 +2462,22 @@ STATIC s32 ixgbe_set_i2c_data(struct ixgbe_hw *hw, u32 *i2cctl, bool data)* @i2cctl: Current value of I2CCTL register * * Returns the I2C data bit value +* Negates the I2C data output enable on X550 hardware. **/ STATIC bool ixgbe_get_i2c_data(struct ixgbe_hw *hw, u32 *i2cctl) { +u32 data_oe_bit =IXGBE_I2C_DATA_OE_N_EN_BY_MAC (hw);bool data; -UNREFERENCED_1PARAMETER (hw);DEBUGFUNC ("ixgbe_get_i2c_data" ); +if (data_oe_bit) { + *i2cctl |= data_oe_bit; +IXGBE_WRITE_REG (hw,IXGBE_I2CCTL_BY_MAC (hw), *i2cctl); +IXGBE_WRITE_FLUSH (hw); +usec_delay (IXGBE_I2C_T_FALL ); + } +if (*i2cctl &IXGBE_I2C_DATA_IN_BY_MAC (hw)) data =1 ;else
@@ -2438,12 +2495,13 @@ STATIC bool ixgbe_get_i2c_data(struct ixgbe_hw *hw, u32 *i2cctl)**/ void ixgbe_i2c_bus_clear (struct ixgbe_hw *hw) { -u32 i2cctl =IXGBE_READ_REG (hw,IXGBE_I2CCTL_BY_MAC (hw)); +u32 i2cctl;u32 i;DEBUGFUNC ("ixgbe_i2c_bus_clear" );ixgbe_i2c_start (hw); + i2cctl =IXGBE_READ_REG (hw,IXGBE_I2CCTL_BY_MAC (hw));ixgbe_set_i2c_data (hw, &i2cctl,1 );
lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h +6 -0
@@ -188,6 +188,12 @@ POSSIBILITY OF SUCH DAMAGE. 0x00001000 : 0x00000004)#define IXGBE_I2C_DATA_OUT_BY_MAC (_hw)(((_hw)->mac.type) >= ixgbe_mac_X550 ? \ 0x00000400 : 0x00000008) +#define IXGBE_I2C_BB_EN_BY_MAC (hw) ((hw)->mac.type >= ixgbe_mac_X550 ? \ + 0x00000100 : 0) +#define IXGBE_I2C_DATA_OE_N_EN_BY_MAC (hw) ((hw)->mac.type >= ixgbe_mac_X550 ? \ + 0x00000800 : 0) +#define IXGBE_I2C_CLK_OE_N_EN_BY_MAC (hw) ((hw)->mac.type >= ixgbe_mac_X550 ? \ + 0x00002000 : 0)#define IXGBE_I2C_CLOCK_STRETCHING_TIMEOUT 500#define IXGBE_I2C_THERMAL_SENSOR_ADDR 0xF8
Signature · 1 line
1.8.4.2
PATCH 32/36 ixgbe base codes: Setup kx4 phy
In reply to a message not in the archiveSetup kx4 phy for x550em;
--- lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h | 14 +++++++++-- lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c | 44 ++++++++++++++++++++++++++++++++- 2 files changed, 55 insertions(+), 3 deletions(-)
lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h +12 -2
@@ -3825,6 +3825,15 @@ struct ixgbe_hw {#define IXGBE_KRM_TX_COEFF_CTRL_1_CZERO_EN (1 << 3)#define IXGBE_KRM_TX_COEFF_CTRL_1_OVRRD_EN (1 << 31) +#define IXGBE_KX4_LINK_CNTL_1 0x4C +#define IXGBE_KX4_LINK_CNTL_1_TETH_AN_CAP_KX (1 << 16) +#define IXGBE_KX4_LINK_CNTL_1_TETH_AN_CAP_KX4 (1 << 17) +#define IXGBE_KX4_LINK_CNTL_1_TETH_EEE_CAP_KX (1 << 24) +#define IXGBE_KX4_LINK_CNTL_1_TETH_EEE_CAP_KX4 (1 << 25) +#define IXGBE_KX4_LINK_CNTL_1_TETH_AN_ENABLE (1 << 29) +#define IXGBE_KX4_LINK_CNTL_1_TETH_FORCE_LINK_UP (1 << 30) +#define IXGBE_KX4_LINK_CNTL_1_TETH_AN_RESTART (1 << 31) +#define IXGBE_SB_IOSF_INDIRECT_CTRL 0x00011144#define IXGBE_SB_IOSF_INDIRECT_DATA 0x00011148
@@ -3841,7 +3850,8 @@ struct ixgbe_hw {#define IXGBE_SB_IOSF_CTRL_BUSY_SHIFT 31#define IXGBE_SB_IOSF_CTRL_BUSY (1 << IXGBE_SB_IOSF_CTRL_BUSY_SHIFT)#define IXGBE_SB_IOSF_TARGET_KR_PHY 0 -#define IXGBE_SB_IOSF_TARGET_KX4_PHY 1 -#define IXGBE_SB_IOSF_TARGET_KX4_PCS 2 +#define IXGBE_SB_IOSF_TARGET_KX4_UNIPHY 1 +#define IXGBE_SB_IOSF_TARGET_KX4_PCS0 2 +#define IXGBE_SB_IOSF_TARGET_KX4_PCS1 3#endif /* _IXGBE_TYPE_H_ */
lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c +43 -1
56 lines not on this page · raw message
Signature · 1 line
1.8.4.2
PATCH 33/36 ixgbe base codes: Read/write iosf sb stat
In reply to a message not in the archiveUpdate the macro to read/write iosf sb stat.
--- lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c +2 -2
@@ -541,7 +541,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,
@@ -589,7 +589,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,
Signature · 1 line
1.8.4.2
PATCH 34/36 ixgbe base codes: New device id
In reply to a message not in the archiveThe old device id: IXGBE_DEV_ID_X550EM_X is split into 2 new device id:IXGBE_DEV_ID_X550EM_X_10G_T and IXGBE_DEV_ID_X550EM_X_1G_T
--- lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.c | 3 ++- lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h | 5 +++-- lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c | 15 +++++++++------ 3 files changed, 14 insertions(+), 9 deletions(-)
lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.c +2 -1
@@ -167,9 +167,10 @@ s32 ixgbe_set_mac_type(struct ixgbe_hw *hw)case IXGBE_DEV_ID_X550T : hw->mac.type = ixgbe_mac_X550;break ; -case IXGBE_DEV_ID_X550EM_X :case IXGBE_DEV_ID_X550EM_X_KX4 :case IXGBE_DEV_ID_X550EM_X_KR : +case IXGBE_DEV_ID_X550EM_X_10G_T : +case IXGBE_DEV_ID_X550EM_X_1G_T :case IXGBE_DEV_ID_X550EM_X_SFP : hw->mac.type = ixgbe_mac_X550EM_x;break ;
lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h +3 -2
@@ -126,11 +126,12 @@ POSSIBILITY OF SUCH DAMAGE.#define IXGBE_DEV_ID_X540_VF 0x1515#define IXGBE_DEV_ID_X540_VF_HV 0x1530#define IXGBE_DEV_ID_X540T1 0x1560 -#define IXGBE_DEV_ID_X550EM_X 0x15A7 -#define IXGBE_DEV_ID_X550EM_X_SFP 0x15AC#define IXGBE_DEV_ID_X550T 0x1563#define IXGBE_DEV_ID_X550EM_X_KX4 0x15AA#define IXGBE_DEV_ID_X550EM_X_KR 0x15AB +#define IXGBE_DEV_ID_X550EM_X_SFP 0x15AC +#define IXGBE_DEV_ID_X550EM_X_10G_T 0x15AD +#define IXGBE_DEV_ID_X550EM_X_1G_T 0x15AE#define IXGBE_DEV_ID_X550_VF_HV 0x1564#define IXGBE_DEV_ID_X550_VF 0x1565#define IXGBE_DEV_ID_X550EM_X_VF 0x15A8
lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c +9 -6
@@ -109,9 +109,11 @@ STATIC s32 ixgbe_identify_phy_x550em(struct ixgbe_hw *hw) hw->phy.type = ixgbe_phy_x550em_kx4;break ;case IXGBE_DEV_ID_X550EM_X_KR : -case IXGBE_DEV_ID_X550EM_X : 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);default :break ; }
@@ -401,8 +403,7 @@ s32 ixgbe_setup_eee_X550(struct ixgbe_hw *hw, bool enable_eee) hw->phy.ops.write_reg (hw,IXGBE_MDIO_AUTO_NEG_EEE_ADVT ,IXGBE_MDIO_AUTO_NEG_DEV_TYPE , autoneg_eee_reg); - }else if (hw->device_id ==IXGBE_DEV_ID_X550EM_X_KR || - hw->device_id ==IXGBE_DEV_ID_X550EM_X ) { + }else if (hw->device_id ==IXGBE_DEV_ID_X550EM_X_KR ) { status =ixgbe_read_iosf_sb_reg_x550 (hw,IXGBE_KRM_LINK_CTRL_1 (hw->bus.lan_id),IXGBE_SB_IOSF_TARGET_KR_PHY , &link_reg);
@@ -432,8 +433,7 @@ s32 ixgbe_setup_eee_X550(struct ixgbe_hw *hw, bool enable_eee) hw->phy.ops.write_reg (hw,IXGBE_MDIO_AUTO_NEG_EEE_ADVT ,IXGBE_MDIO_AUTO_NEG_DEV_TYPE , autoneg_eee_reg); - }else if (hw->device_id ==IXGBE_DEV_ID_X550EM_X_KR || - hw->device_id ==IXGBE_DEV_ID_X550EM_X ) { + }else if (hw->device_id ==IXGBE_DEV_ID_X550EM_X_KR ) { status =ixgbe_read_iosf_sb_reg_x550 (hw,IXGBE_KRM_LINK_CTRL_1 (hw->bus.lan_id),IXGBE_SB_IOSF_TARGET_KR_PHY , &link_reg);
@@ -764,7 +764,6 @@ enum ixgbe_media_type ixgbe_get_media_type_X550em(struct ixgbe_hw *hw)/* Detect if there is a copper PHY attached. */ switch (hw->device_id) { -case IXGBE_DEV_ID_X550EM_X :case IXGBE_DEV_ID_X550EM_X_KR :case IXGBE_DEV_ID_X550EM_X_KX4 : media_type = ixgbe_media_type_backplane;
@@ -772,6 +771,10 @@ enum ixgbe_media_type ixgbe_get_media_type_X550em(struct ixgbe_hw *hw)case IXGBE_DEV_ID_X550EM_X_SFP : media_type = ixgbe_media_type_fiber;break ; +case IXGBE_DEV_ID_X550EM_X_1G_T : +case IXGBE_DEV_ID_X550EM_X_10G_T : + media_type = ixgbe_media_type_copper; +break ;default : media_type = ixgbe_media_type_unknown;break ;
Signature · 1 line
1.8.4.2
PATCH 36/36 eal: Add 2 device ids for ixgbe
In reply to a message not in the archiveAccordingly, add 2 new device id into lib_eal.
--- lib/librte_eal/common/include/rte_pci_dev_ids.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
lib/librte_eal/common/include/rte_pci_dev_ids.h +4 -2
@@ -393,8 +393,9 @@ RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_DH89XXCC_SFP)#define IXGBE_DEV_ID_82599_LS 0x154F#define IXGBE_DEV_ID_X540T 0x1528#define IXGBE_DEV_ID_X540T1 0x1560 -#define IXGBE_DEV_ID_X550EM_X 0x15A7#define IXGBE_DEV_ID_X550EM_X_SFP 0x15AC +#define IXGBE_DEV_ID_X550EM_X_10G_T 0x15AD +#define IXGBE_DEV_ID_X550EM_X_1G_T 0x15AE#define IXGBE_DEV_ID_X550T 0x1563#define IXGBE_DEV_ID_X550EM_X_KX4 0x15AA#define IXGBE_DEV_ID_X550EM_X_KR 0x15AB
@@ -442,8 +443,9 @@ RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_T3_LOM) RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_LS) RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X540T) RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X540T1) -RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X) RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_SFP) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_10G_T) +RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_1G_T) RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550T) RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_KX4)RTE_PCI_DEV_ID_DECL_IXGBE (PCI_VENDOR_ID_INTEL ,IXGBE_DEV_ID_X550EM_X_KR )
Signature · 1 line
1.8.4.2
Liu, Jijiang
Acked-byQuoted 80 lines
-----Original Message-----
From: dev [mailto:[email protected]] On Behalf Of Ouyang Changchun
Sent: Thursday, February 12, 2015 8:01 PM
To: [email protected]
Subject: [dpdk-dev] [PATCH 00/36] Update IXGBE base codesThis patch set update IXGBE base codes to the version of cid-10g-shared- code.2015.02.03.
and this patch set add 2 new device id as following:
#defineIXGBE_DEV_ID_X550EM_X_10G_T0x15AD
#defineIXGBE_DEV_ID_X550EM_X_1G_T0x15AEChangchun Ouyang (36):
ixgbe base codes: Code cleanup and minor changes ixgbe base codes: Debug output macro
ixgbe base codes: Fix bus type issue
ixgbe base codes: Fix link speed issue
ixgbe base codes: Fix early return
ixgbe base codes: Update the CS address
ixgbe base codes: Extract function for management capability ixgbe base codes: Set phy power
ixgbe base codes: Use mng present function
ixgbe base codes: Get host interface command status ixgbe base codes: Refine function for host interface command ixgbe base codes: Refine struct for physical information ixgbe base codes: Clear Tx pending
ixgbe base codes: Use IOMEM
ixgbe base codes: Update macros
ixgbe base codes: New phy ID
ixgbe base codes: Get bus info
ixgbe base codes: Restructure host interface command ixgbe base codes: Fix mac type issue
ixgbe base codes: API for setup internal phy
ixgbe base codes: API for set phy power
ixgbe base codes: API for read i2c combined
ixgbe base codes: API for write i2c combined
ixgbe base codes: Support 5G link speed
ixgbe base codes: Refine branch statement
ixgbe base codes: SFP probe
ixgbe base codes: Set LAN ID
ixgbe base codes: Calculate checksum
ixgbe base codes: Command for flow director
ixgbe base codes: Auto-negotiation
ixgbe base codes: Bit-bang mode
ixgbe base codes: Setup kx4 phy
ixgbe base codes: Read/write iosf sb stat
ixgbe base codes: New device id
ixgbe base codes: Update readme
eal: Add 2 device ids for ixgbelib/librte_eal/common/include/rte_pci_dev_ids.h | 6 +- lib/librte_pmd_ixgbe/ixgbe/README | 2 +- lib/librte_pmd_ixgbe/ixgbe/ixgbe_82598.c | 55 ++- lib/librte_pmd_ixgbe/ixgbe/ixgbe_82598.h | 1 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.c | 237 +++++----- lib/librte_pmd_ixgbe/ixgbe/ixgbe_82599.h | 1 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.c | 61 ++- lib/librte_pmd_ixgbe/ixgbe/ixgbe_api.h | 5 +- lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.c | 189 +++++--- lib/librte_pmd_ixgbe/ixgbe/ixgbe_common.h | 5 +- lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb.c | 1 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb.h | 2 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb_82598.c | 1 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb_82598.h | 1 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb_82599.c | 3 +- lib/librte_pmd_ixgbe/ixgbe/ixgbe_dcb_82599.h | 1 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_osdep.h | 4 +- lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.c | 220 +++++++-- lib/librte_pmd_ixgbe/ixgbe/ixgbe_phy.h | 7 +- lib/librte_pmd_ixgbe/ixgbe/ixgbe_type.h | 131 +++++- lib/librte_pmd_ixgbe/ixgbe/ixgbe_vf.c | 1 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_vf.h | 5 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_x540.c | 82 ++-- lib/librte_pmd_ixgbe/ixgbe/ixgbe_x540.h | 1 - lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.c | 582 ++++++++++++++++++------ lib/librte_pmd_ixgbe/ixgbe/ixgbe_x550.h | 9 +- 26 files changed, 1158 insertions(+), 455 deletions(-)
Quoted 2 lines
--
1.8.4.2
A message that is not in the archive (sent off-list or not yet received): 1ED644BD7E0A5F4091CF203DAFB8E4CC01DDF833-0J0gbvR4kThpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org
Thomas Monjalon
AppliedQuoted 44 lines
Quoted 35 lines
This patch set update IXGBE base codes to the version of cid-10g-shared- code.2015.02.03.
and this patch set add 2 new device id as following:
#defineIXGBE_DEV_ID_X550EM_X_10G_T0x15AD
#defineIXGBE_DEV_ID_X550EM_X_1G_T0x15AEChangchun Ouyang (36):
ixgbe base codes: Code cleanup and minor changes ixgbe base codes: Debug output macro
ixgbe base codes: Fix bus type issue
ixgbe base codes: Fix link speed issue
ixgbe base codes: Fix early return
ixgbe base codes: Update the CS address
ixgbe base codes: Extract function for management capability ixgbe base codes: Set phy power
ixgbe base codes: Use mng present function
ixgbe base codes: Get host interface command status ixgbe base codes: Refine function for host interface command ixgbe base codes: Refine struct for physical information ixgbe base codes: Clear Tx pending
ixgbe base codes: Use IOMEM
ixgbe base codes: Update macros
ixgbe base codes: New phy ID
ixgbe base codes: Get bus info
ixgbe base codes: Restructure host interface command ixgbe base codes: Fix mac type issue
ixgbe base codes: API for setup internal phy
ixgbe base codes: API for set phy power
ixgbe base codes: API for read i2c combined
ixgbe base codes: API for write i2c combined
ixgbe base codes: Support 5G link speed
ixgbe base codes: Refine branch statement
ixgbe base codes: SFP probe
ixgbe base codes: Set LAN ID
ixgbe base codes: Calculate checksumQuoted 8 lines
ixgbe base codes: Command for flow director
ixgbe base codes: Auto-negotiation
ixgbe base codes: Bit-bang mode
ixgbe base codes: Setup kx4 phy
ixgbe base codes: Read/write iosf sb stat
ixgbe base codes: New device id
ixgbe base codes: Update readme
eal: Add 2 device ids for ixgbe
Quoted 1 line
Acked-by Jijiang Liu <[email protected]>
Some changes were put in the wrong patch and some patches required to be merged to improve atomicity.
As it's a long serie, I did these git changes, without impacting the code itself.
Maybe that I'll ask you to do those changes next time :)
Applied, thanks