update ixgbe shared code to version 2017-01-05
v2 cover update ixgbe shared code to version 2017-01-05
This patch set updates ixgbe shared code to cid-ixgbe.2017.01.05.tar.gz . The shared codes are in drivers/net/ixgbe/base/ and are developed by another Intel team.
This patch add more supports to some future new Intel ixgbe X550 platforms. A new device id and two PHY types are introduced and also
add some debug traces to help debugging.
Wei Dai (7):
net/ixgbe/base: support XFI backplane for X550 net/ixgbe/base: remove a compiler warning net/ixgbe/base: configure speeds for KR/KX backplane net/ixgbe/base: support Marvell 1000BASE-T PHYs net/ixgbe/base: use clause 22 MDIO functions for Marvell PHYs net/ixgbe/base: add some debug traces net/ixgbe/base: update version of shared code
drivers/net/ixgbe/base/README | 2 +- drivers/net/ixgbe/base/ixgbe_api.c | 1 + drivers/net/ixgbe/base/ixgbe_common.c | 9 +++- drivers/net/ixgbe/base/ixgbe_phy.c | 20 +++++++-- drivers/net/ixgbe/base/ixgbe_type.h | 3 ++ drivers/net/ixgbe/base/ixgbe_x540.c | 11 ++++- drivers/net/ixgbe/base/ixgbe_x550.c | 77 ++++++++++++++++++++++++++++++----- 7 files changed, 104 insertions(+), 19 deletions(-)
Signature · 1 line
2.7.4
PATCH v2 1/7 net/ixgbe/base: support XFI backplane for X550
This patch adds initial support for a XFI backplane interface on some future new platforms. The XFI backplane requires a custom tuned link. Hardware/Firmware owns the link config for XF backplane and software must not interfere with it.
--- drivers/net/ixgbe/base/ixgbe_api.c | 1 + drivers/net/ixgbe/base/ixgbe_type.h | 2 ++ drivers/net/ixgbe/base/ixgbe_x550.c | 11 +++++++++++ 3 files changed, 14 insertions(+)
drivers/net/ixgbe/base/ixgbe_api.c +1 -0
@@ -205,6 +205,7 @@ s32 ixgbe_set_mac_type(struct ixgbe_hw *hw)case IXGBE_DEV_ID_X550EM_X_10G_T :case IXGBE_DEV_ID_X550EM_X_1G_T :case IXGBE_DEV_ID_X550EM_X_SFP : +case IXGBE_DEV_ID_X550EM_X_XFI : hw->mac.type = ixgbe_mac_X550EM_x; hw->mvals = ixgbe_mvals_X550EM_x;break ;
drivers/net/ixgbe/base/ixgbe_type.h +2 -0
@@ -146,6 +146,7 @@ POSSIBILITY OF SUCH DAMAGE.#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_X550EM_X_XFI 0x15B0#define IXGBE_DEV_ID_X550_VF_HV 0x1564#define IXGBE_DEV_ID_X550_VF 0x1565#define IXGBE_DEV_ID_X550EM_A_VF 0x15C5
@@ -3644,6 +3645,7 @@ enum ixgbe_phy_type { ixgbe_phy_aq, ixgbe_phy_x550em_kr, ixgbe_phy_x550em_kx4, + ixgbe_phy_x550em_xfi, ixgbe_phy_x550em_ext_t, ixgbe_phy_cu_unknown, ixgbe_phy_qt,
drivers/net/ixgbe/base/ixgbe_x550.c +11 -0
@@ -450,6 +450,9 @@ STATIC s32 ixgbe_identify_phy_x550em(struct ixgbe_hw *hw)case IXGBE_DEV_ID_X550EM_X_KX4 : hw->phy.type = ixgbe_phy_x550em_kx4;break ; +case IXGBE_DEV_ID_X550EM_X_XFI : + hw->phy.type = ixgbe_phy_x550em_xfi; +break ;case IXGBE_DEV_ID_X550EM_X_KR :case IXGBE_DEV_ID_X550EM_A_KR :case IXGBE_DEV_ID_X550EM_A_KR_L :
@@ -1573,6 +1576,7 @@ enum ixgbe_media_type ixgbe_get_media_type_X550em(struct ixgbe_hw *hw)switch (hw->device_id) {case IXGBE_DEV_ID_X550EM_X_KR :case IXGBE_DEV_ID_X550EM_X_KX4 : +case IXGBE_DEV_ID_X550EM_X_XFI :case IXGBE_DEV_ID_X550EM_A_KR :case IXGBE_DEV_ID_X550EM_A_KR_L : media_type = ixgbe_media_type_backplane;
@@ -2395,6 +2399,12 @@ s32 ixgbe_init_phy_ops_X550em(struct ixgbe_hw *hw) phy->ops.read_reg = ixgbe_read_phy_reg_x550em; phy->ops.write_reg = ixgbe_write_phy_reg_x550em;break ; +case ixgbe_phy_x550em_xfi: +/* link is managed by HW */ + phy->ops.setup_link =NULL ; + phy->ops.read_reg = ixgbe_read_phy_reg_x550em; + phy->ops.write_reg = ixgbe_write_phy_reg_x550em; +break ;case ixgbe_phy_x550em_ext_t:/* If internal link mode is XFI, then setup iXFI internal link, * else setup KR now.
@@ -3669,6 +3679,7 @@ u32 ixgbe_get_supported_physical_layer_X550em(struct ixgbe_hw *hw)switch (hw->phy.type) {case ixgbe_phy_x550em_kr: +case ixgbe_phy_x550em_xfi: physical_layer =IXGBE_PHYSICAL_LAYER_10GBASE_KR |IXGBE_PHYSICAL_LAYER_1000BASE_KX ;break ;
Signature · 1 line
2.7.4
PATCH v2 2/7 net/ixgbe/base: remove a compiler warning
In reply to Wei DaiThis patch fixes a compiler warning.
In ixgbe_init_led_link_act_generic() of drivers/net/ixgbe/base/ixgbe_common.c, u16 i will make some C compiler generate a warning for the line mac->led_link_act = i where led_link_act is u8 .
--- drivers/net/ixgbe/base/ixgbe_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ixgbe/base/ixgbe_common.c +1 -1
@@ -1150,7 +1150,7 @@ s32 ixgbe_init_led_link_act_generic(struct ixgbe_hw *hw) {struct ixgbe_mac_info *mac = &hw->mac;u32 led_reg, led_mode; -u16 i; +u8 i; led_reg =IXGBE_READ_REG (hw,IXGBE_LEDCTL );
Signature · 1 line
2.7.4
PATCH v2 3/7 net/ixgbe/base: configure speeds for KR/KX backplane
In reply to Wei DaiThis patch ensures that the advertised link speeds are configured for KR/KX backplane on some new platform. Without this patch the link remains at 1G when resuming from low power after being downshifted by LPLU(Low Power Link Up).
This patch ensures that the advertise speeds are not changed for 2.5G configurations.
--- drivers/net/ixgbe/base/ixgbe_x550.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/net/ixgbe/base/ixgbe_x550.c +2 -3
@@ -2627,12 +2627,11 @@ s32 ixgbe_init_ext_t_x550em(struct ixgbe_hw *hw)/** * ixgbe_setup_kr_x550em - Configure the KR PHY. * @hw: pointer to hardware structure -* -* Configures the integrated KR PHY for X550EM_x. **/ s32 ixgbe_setup_kr_x550em (struct ixgbe_hw *hw) { -if (hw->mac.type != ixgbe_mac_X550EM_x) +/* leave link alone for 2.5G */ +if (hw->phy.autoneg_advertised &IXGBE_LINK_SPEED_2_5GB_FULL )return IXGBE_SUCCESS ;return ixgbe_setup_kr_speed_x550em (hw, hw->phy.autoneg_advertised);
Signature · 1 line
2.7.4
PATCH v2 4/7 net/ixgbe/base: support Marvell 1000BASE-T PHYs
In reply to Wei DaiThis patch adds initial support for Marvell 1000BASE-T PHYs on some X550 platforms.
Firmware owns the link config for Marvell PHYs on these platforms, software should not touch it.
Also these platforms are not capable of speeds lower than 1Gb.
--- drivers/net/ixgbe/base/ixgbe_phy.c | 4 ++++ drivers/net/ixgbe/base/ixgbe_type.h | 1 + drivers/net/ixgbe/base/ixgbe_x550.c | 8 ++++++++ 3 files changed, 13 insertions(+)
drivers/net/ixgbe/base/ixgbe_phy.c +4 -0
@@ -472,6 +472,10 @@ enum ixgbe_phy_type ixgbe_get_phy_type_from_id(u32 phy_id)case X557_PHY_ID2 : phy_type = ixgbe_phy_x550em_ext_t;break ; +case IXGBE_M88E1500_E_PHY_ID : +case IXGBE_M88E1543_E_PHY_ID : + phy_type = ixgbe_phy_ext_1g_t; +break ;default : phy_type = ixgbe_phy_unknown;break ;
drivers/net/ixgbe/base/ixgbe_type.h +1 -0
@@ -3647,6 +3647,7 @@ enum ixgbe_phy_type { ixgbe_phy_x550em_kx4, ixgbe_phy_x550em_xfi, ixgbe_phy_x550em_ext_t, + ixgbe_phy_ext_1g_t, ixgbe_phy_cu_unknown, ixgbe_phy_qt, ixgbe_phy_xaui,
drivers/net/ixgbe/base/ixgbe_x550.c +8 -0
@@ -1975,6 +1975,7 @@ s32 ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw, *speed =IXGBE_LINK_SPEED_10GB_FULL ; }else {switch (hw->phy.type) { +case ixgbe_phy_ext_1g_t:case ixgbe_phy_sgmii: *speed =IXGBE_LINK_SPEED_1GB_FULL ;break ;
@@ -2399,6 +2400,10 @@ s32 ixgbe_init_phy_ops_X550em(struct ixgbe_hw *hw) phy->ops.read_reg = ixgbe_read_phy_reg_x550em; phy->ops.write_reg = ixgbe_write_phy_reg_x550em;break ; +case ixgbe_phy_ext_1g_t: +/* link is managed by FW */ + phy->ops.setup_link =NULL ; +break ;case ixgbe_phy_x550em_xfi:/* link is managed by HW */ phy->ops.setup_link =NULL ;
@@ -3706,6 +3711,9 @@ u32 ixgbe_get_supported_physical_layer_X550em(struct ixgbe_hw *hw)case ixgbe_phy_sgmii: physical_layer =IXGBE_PHYSICAL_LAYER_1000BASE_KX ;break ; +case ixgbe_phy_ext_1g_t: + physical_layer |=IXGBE_PHYSICAL_LAYER_1000BASE_T ; +break ;default :break ; }
Signature · 1 line
2.7.4
PATCH v2 5/7 net/ixgbe/base: use clause 22 MDIO functions for Marvell PHYs
In reply to Wei DaiThis patch sets the MDIO(Management Data Input/Output Interface) read/write function ponters for Marvell PHYs on some X550 platforms to use the clause 22 functions. Marvell PHYs do not support clause 45.
--- drivers/net/ixgbe/base/ixgbe_x550.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/net/ixgbe/base/ixgbe_x550.c +4 -0
@@ -2373,6 +2373,10 @@ s32 ixgbe_init_phy_ops_X550em(struct ixgbe_hw *hw)/* set up for CS4227 usage */ hw->phy.phy_semaphore_mask =IXGBE_GSSR_SHARED_I2C_SM ;break ; +case IXGBE_DEV_ID_X550EM_X_1G_T : + phy->ops.read_reg_mdi = ixgbe_read_phy_reg_mdi_22; + phy->ops.write_reg_mdi = ixgbe_write_phy_reg_mdi_22; +break ;default :break ; }
Signature · 1 line
2.7.4
PATCH v2 6/7 net/ixgbe/base: add some debug traces
In reply to Wei DaiThis patch adds some traces in the reset_hw logic and semaphore acquisition logic to help debugging.
--- drivers/net/ixgbe/base/ixgbe_common.c | 7 ++++- drivers/net/ixgbe/base/ixgbe_phy.c | 16 +++++++++--- drivers/net/ixgbe/base/ixgbe_x540.c | 11 ++++++-- drivers/net/ixgbe/base/ixgbe_x550.c | 49 +++++++++++++++++++++++++++++------ 4 files changed, 69 insertions(+), 14 deletions(-)
drivers/net/ixgbe/base/ixgbe_common.c +6 -1
@@ -410,8 +410,10 @@ s32 ixgbe_start_hw_generic(struct ixgbe_hw *hw)/* Setup flow control */ ret_val =ixgbe_setup_fc (hw); -if (ret_val !=IXGBE_SUCCESS && ret_val !=IXGBE_NOT_IMPLEMENTED ) +if (ret_val !=IXGBE_SUCCESS && ret_val !=IXGBE_NOT_IMPLEMENTED ) { +DEBUGOUT1 ("Flow control setup failed, returning %d\n" , ret_val);return ret_val; + }/* Cache bit indicating need for crosstalk fix */ switch (hw->mac.type) {
@@ -501,6 +503,9 @@ s32 ixgbe_init_hw_generic(struct ixgbe_hw *hw)/* Initialize the LED link active for LED blink support */ hw->mac.ops.init_led_link_act (hw); +if (status !=IXGBE_SUCCESS ) +DEBUGOUT1 ("Failed to initialize HW, STATUS = %d\n" , status); +return status; }
drivers/net/ixgbe/base/ixgbe_phy.c +13 -3
@@ -291,8 +291,11 @@ static bool ixgbe_probe_phy(struct ixgbe_hw *hw, u16 phy_addr) {u16 ext_ability =0 ; -if (!ixgbe_validate_phy_addr (hw, phy_addr)) +if (!ixgbe_validate_phy_addr (hw, phy_addr)) { +DEBUGOUT1 ("Unable to validate PHY address 0x%04X\n" , + phy_addr);return false; + }if (ixgbe_get_phy_id (hw))return false;
@@ -411,6 +414,8 @@ bool ixgbe_validate_phy_addr(struct ixgbe_hw *hw, u32 phy_addr)if (phy_id !=0xFFFF && phy_id !=0x0 ) valid = true; +DEBUGOUT1 ("PHY ID HIGH is 0x%04X\n" , phy_id); +return valid; }
@@ -439,6 +444,9 @@ s32 ixgbe_get_phy_id(struct ixgbe_hw *hw) hw->phy.id |= (u32)(phy_id_low &IXGBE_PHY_REVISION_MASK ); hw->phy.revision = (u32)(phy_id_low & ~IXGBE_PHY_REVISION_MASK ); } +DEBUGOUT2 ("PHY_ID_HIGH 0x%04X, PHY_ID_LOW 0x%04X\n" , + phy_id_high, phy_id_low); +return status; }
@@ -570,7 +578,7 @@ s32 ixgbe_reset_phy_generic(struct ixgbe_hw *hw)* @phy_data: Pointer to read data from PHY register **/ s32 ixgbe_read_phy_reg_mdi (struct ixgbe_hw *hw,u32 reg_addr,u32 device_type, -u16 *phy_data) +u16 *phy_data) {u32 i, data, command;
@@ -592,12 +600,13 @@ s32 ixgbe_read_phy_reg_mdi(struct ixgbe_hw *hw, u32 reg_addr, u32 device_type, command =IXGBE_READ_REG (hw,IXGBE_MSCA );if ((command &IXGBE_MSCA_MDI_COMMAND ) ==0 ) -break ; +break ; }if ((command &IXGBE_MSCA_MDI_COMMAND ) !=0 ) {ERROR_REPORT1 (IXGBE_ERROR_POLLING ,"PHY address command did not complete.\n" ); +DEBUGOUT ("PHY address command did not complete, returning IXGBE_ERR_PHY\n" );return IXGBE_ERR_PHY ; }
@@ -627,6 +636,7 @@ s32 ixgbe_read_phy_reg_mdi(struct ixgbe_hw *hw, u32 reg_addr, u32 device_type,if ((command &IXGBE_MSCA_MDI_COMMAND ) !=0 ) {ERROR_REPORT1 (IXGBE_ERROR_POLLING ,"PHY read command didn't complete\n" ); +DEBUGOUT ("PHY read command didn't complete, returning IXGBE_ERR_PHY\n" );return IXGBE_ERR_PHY ; }
drivers/net/ixgbe/base/ixgbe_x540.c +9 -2
@@ -775,8 +775,10 @@ s32 ixgbe_acquire_swfw_sync_X540(struct ixgbe_hw *hw, u32 mask)/* SW NVM semaphore bit is used for access to all * SW_FW_SYNC bits (not just NVM) */ -if (ixgbe_get_swfw_sync_semaphore (hw)) +if (ixgbe_get_swfw_sync_semaphore (hw)) { +DEBUGOUT ("Failed to get NVM access and register semaphore, returning IXGBE_ERR_SWFW_SYNC\n" );return IXGBE_ERR_SWFW_SYNC ; + } swfw_sync =IXGBE_READ_REG (hw,IXGBE_SWFW_SYNC_BY_MAC (hw));if (!(swfw_sync & (fwmask | swmask | hwmask))) {
@@ -798,6 +800,7 @@ s32 ixgbe_acquire_swfw_sync_X540(struct ixgbe_hw *hw, u32 mask)if (swmask ==IXGBE_GSSR_SW_MNG_SM ) {ERROR_REPORT1 (IXGBE_ERROR_POLLING ,"Failed to get SW only semaphore" ); +DEBUGOUT ("Failed to get SW only semaphore, returning IXGBE_ERR_SWFW_SYNC\n" );return IXGBE_ERR_SWFW_SYNC ; }
@@ -806,8 +809,10 @@ s32 ixgbe_acquire_swfw_sync_X540(struct ixgbe_hw *hw, u32 mask)* of the requested resource(s) while ignoring the corresponding FW/HW * bits in the SW_FW_SYNC register. */ -if (ixgbe_get_swfw_sync_semaphore (hw)) +if (ixgbe_get_swfw_sync_semaphore (hw)) { +DEBUGOUT ("Failed to get NVM sempahore and register semaphore while forcefully ignoring FW sempahore bit(s) and setting SW semaphore bit(s), returning IXGBE_ERR_SWFW_SYNC\n" );return IXGBE_ERR_SWFW_SYNC ; + } swfw_sync =IXGBE_READ_REG (hw,IXGBE_SWFW_SYNC_BY_MAC (hw));if (swfw_sync & (fwmask | hwmask)) { swfw_sync |= swmask;
@@ -829,9 +834,11 @@ s32 ixgbe_acquire_swfw_sync_X540(struct ixgbe_hw *hw, u32 mask) rmask |=IXGBE_GSSR_I2C_MASK ;ixgbe_release_swfw_sync_X540 (hw, rmask);ixgbe_release_swfw_sync_semaphore (hw); +DEBUGOUT ("Resource not released by other SW, returning IXGBE_ERR_SWFW_SYNC\n" );return IXGBE_ERR_SWFW_SYNC ; }ixgbe_release_swfw_sync_semaphore (hw); +DEBUGOUT ("Returning error IXGBE_ERR_SWFW_SYNC\n" );return IXGBE_ERR_SWFW_SYNC ; }
drivers/net/ixgbe/base/ixgbe_x550.c +41 -8
104 lines not on this page · raw message
Signature · 1 line
2.7.4
PATCH v2 7/7 net/ixgbe/base: update version of shared code
In reply to Wei Daiupdate version of shared code to 2017-01-05 in README.
--- drivers/net/ixgbe/base/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ixgbe/base/README +1 -1
@@ -34,7 +34,7 @@ Intel® IXGBE driver =================== This directory contains source code of FreeBSD ixgbe driver of version -cid-10g-shared-code.2016.11.21 released by the team which develop +cid-10g-shared-code.2017.01.05 released by the team which develop basic drivers for any ixgbe NIC. The sub-directory of base/ contains the original source package. This driver is valid for the product(s) listed below
Signature · 1 line
2.7.4
Quoted 17 lines · Wei Dai
This patch set updates ixgbe shared code to cid-ixgbe.2017.01.05.tar.gz . The shared codes are in
drivers/net/ixgbe/base/and are developed by another Intel team.This patch add more supports to some future new Intel ixgbe X550 platforms. A new device id and two PHY types are introduced and also
add some debug traces to help debugging.Wei Dai (7):
net/ixgbe/base: support XFI backplane for X550net/ixgbe/base: remove a compiler warningnet/ixgbe/base: configure speeds for KR/KX backplanenet/ixgbe/base: support Marvell 1000BASE-T PHYsnet/ixgbe/base: use clause 22 MDIO functions for Marvell PHYsnet/ixgbe/base: add some debug tracesnet/ixgbe/base: update version of shared code
Quoted 9 lines
drivers/net/ixgbe/base/README | 2 +- drivers/net/ixgbe/base/ixgbe_api.c | 1 + drivers/net/ixgbe/base/ixgbe_common.c | 9 +++- drivers/net/ixgbe/base/ixgbe_phy.c | 20 +++++++-- drivers/net/ixgbe/base/ixgbe_type.h | 3 ++ drivers/net/ixgbe/base/ixgbe_x540.c | 11 ++++- drivers/net/ixgbe/base/ixgbe_x550.c | 77 ++++++++++++++++++++++++++++++----- 7 files changed, 104 insertions(+), 19 deletions(-)
Series applied to dpdk-next-net/master, thanks.
(some commit logs slightly updated, can you please confirm them?)