update ixgbe base code
cover update ixgbe base code
update ixgbe base code.
Guinan Sun (21):
net/ixgbe/base: clear VFMBMEM and toggle VF's Tx queues net/ixgbe/base: change in the condition for response HI net/ixgbe/base: hange flow for "Apply Update" command net/ixgbe/base: x550em 10G NIC driver issue net/ixgbe/base: added API for NVM update net/ixgbe/base: resolve infinite recursion on PCIe link down net/ixgbe/base: added register definitions for NVM update net/ixgbe/base: cleanup spelling mistakes in comments net/ixgbe/base: remove whitespace in function comments net/ixgbe/base: move increments after evaluations net/ixgbe/base: modify loop accounting for retries net/ixgbe/base: create dedicated func to restart auto nego net/ixgbe/base: modify Klocwork hits for DDK 7.0 net/ixgbe/base: add defines for min rollback revision fields net/ixgbe/base: remove unnecessary log message FC autonego net/ixgbe/base: initialize data field in struct buffer net/ixgbe/base: improve log about autonego being disabled net/ixgbe/base: ipv6 Mask for purpose FDIR VLAN Port Feature net/ixgbe/base: remove default advertising for 2.5G and 5G net/ixgbe/base: check Host Interface Return Status net/ixgbe/base: update version
drivers/net/ixgbe/base/README | 2 +- drivers/net/ixgbe/base/ixgbe_82598.c | 238 ++--- drivers/net/ixgbe/base/ixgbe_82599.c | 397 ++++---- drivers/net/ixgbe/base/ixgbe_api.c | 892 ++++++++--------- drivers/net/ixgbe/base/ixgbe_api.h | 1 + drivers/net/ixgbe/base/ixgbe_common.c | 1102 ++++++++++++---------- drivers/net/ixgbe/base/ixgbe_common.h | 3 +- drivers/net/ixgbe/base/ixgbe_dcb.c | 6 +- drivers/net/ixgbe/base/ixgbe_dcb_82598.c | 2 +- drivers/net/ixgbe/base/ixgbe_dcb_82599.c | 2 +- drivers/net/ixgbe/base/ixgbe_hv_vf.c | 20 +- drivers/net/ixgbe/base/ixgbe_mbx.c | 285 +++--- drivers/net/ixgbe/base/ixgbe_mbx.h | 1 + drivers/net/ixgbe/base/ixgbe_phy.c | 488 +++++----- drivers/net/ixgbe/base/ixgbe_phy.h | 1 + drivers/net/ixgbe/base/ixgbe_type.h | 67 ++ drivers/net/ixgbe/base/ixgbe_vf.c | 166 ++-- drivers/net/ixgbe/base/ixgbe_x540.c | 190 ++-- drivers/net/ixgbe/base/ixgbe_x550.c | 505 +++++----- 19 files changed, 2282 insertions(+), 2086 deletions(-)
Signature · 1 line
2.17.1
PATCH 1/21 net/ixgbe/base: clear VFMBMEM and toggle VF's Tx queues
Add a method to clear VFMBMEM memory.
Add a method to toggle VF's TX queues as workaround for silicon errata.
--- drivers/net/ixgbe/base/ixgbe_api.c | 13 +++++++ drivers/net/ixgbe/base/ixgbe_api.h | 1 + drivers/net/ixgbe/base/ixgbe_common.c | 56 +++++++++++++++++++++++++++ drivers/net/ixgbe/base/ixgbe_common.h | 1 + drivers/net/ixgbe/base/ixgbe_mbx.c | 43 ++++++++++++++++++++ drivers/net/ixgbe/base/ixgbe_mbx.h | 1 + drivers/net/ixgbe/base/ixgbe_type.h | 2 + 7 files changed, 117 insertions(+)
drivers/net/ixgbe/base/ixgbe_api.c +13 -0
@@ -1101,6 +1101,19 @@ s32 ixgbe_set_vlvf(struct ixgbe_hw *hw, u32 vlan, u32 vind, bool vlan_on, IXGBE_NOT_IMPLEMENTED); } +/** +* ixgbe_toggle_txdctl - Toggle VF's queues +* @hw: pointer to hardware structure +* @vind: VMDq pool index +* +* Enable and disable each queue in VF. +*/ +s32 ixgbe_toggle_txdctl (struct ixgbe_hw *hw,u32 vind) +{ +return ixgbe_call_func (hw, hw->mac.ops.toggle_txdctl, (hw, + vind),IXGBE_NOT_IMPLEMENTED ); +} +/** * ixgbe_fc_enable - Enable flow control * @hw: pointer to hardware structure
drivers/net/ixgbe/base/ixgbe_api.h +1 -0
@@ -101,6 +101,7 @@ s32 ixgbe_set_vfta(struct ixgbe_hw *hw, u32 vlan,s32 ixgbe_set_vlvf (struct ixgbe_hw *hw,u32 vlan,u32 vind,bool vlan_on,u32 *vfta_delta,u32 vfta,bool vlvf_bypass); +s32 ixgbe_toggle_txdctl (struct ixgbe_hw *hw,u32 vind);s32 ixgbe_fc_enable (struct ixgbe_hw *hw);s32 ixgbe_setup_fc (struct ixgbe_hw *hw); s32 ixgbe_set_fw_drv_ver(struct ixgbe_hw *hw, u8 maj, u8 min, u8 build,
drivers/net/ixgbe/base/ixgbe_common.c +56 -0
68 lines not on this page · raw message
drivers/net/ixgbe/base/ixgbe_common.h +1 -0
@@ -111,6 +111,7 @@ s32 ixgbe_set_vlvf_generic(struct ixgbe_hw *hw, u32 vlan, u32 vind, bool vlvf_bypass);s32 ixgbe_clear_vfta_generic (struct ixgbe_hw *hw);s32 ixgbe_find_vlvf_slot (struct ixgbe_hw *hw,u32 vlan,bool vlvf_bypass); +s32 ixgbe_toggle_txdctl_generic (struct ixgbe_hw *hw,u32 vind); s32 ixgbe_check_mac_link_generic(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
drivers/net/ixgbe/base/ixgbe_mbx.c +43 -0
67 lines not on this page · raw message
drivers/net/ixgbe/base/ixgbe_mbx.h +1 -0
@@ -129,6 +129,7 @@ s32 ixgbe_write_posted_mbx(struct ixgbe_hw *, u32 *, u16, u16);s32 ixgbe_check_for_msg (struct ixgbe_hw *,u16 );s32 ixgbe_check_for_ack (struct ixgbe_hw *,u16 );s32 ixgbe_check_for_rst (struct ixgbe_hw *,u16 ); +s32 ixgbe_clear_mbx (struct ixgbe_hw *hw,u16 vf_number);void ixgbe_init_mbx_ops_generic (struct ixgbe_hw *hw);void ixgbe_init_mbx_params_vf (struct ixgbe_hw *);void ixgbe_init_mbx_params_pf (struct ixgbe_hw *);
drivers/net/ixgbe/base/ixgbe_type.h +2 -0
@@ -3997,6 +3997,7 @@ struct ixgbe_mac_operations {s32 (*init_uta_tables)(struct ixgbe_hw *);void (*set_mac_anti_spoofing)(struct ixgbe_hw *,bool ,int );void (*set_vlan_anti_spoofing)(struct ixgbe_hw *,bool ,int ); +s32 (*toggle_txdctl)(struct ixgbe_hw *hw,u32 vf_index);s32 (*update_xcast_mode)(struct ixgbe_hw *,int );s32 (*set_rlpml)(struct ixgbe_hw *,u16 );
@@ -4155,6 +4156,7 @@ struct ixgbe_mbx_operations {s32 (*check_for_msg)(struct ixgbe_hw *,u16 );s32 (*check_for_ack)(struct ixgbe_hw *,u16 );s32 (*check_for_rst)(struct ixgbe_hw *,u16 ); +s32 (*clear)(struct ixgbe_hw *hw,u16 vf_number); };struct ixgbe_mbx_stats {
Signature · 1 line
2.17.1
Re: [dpdk-dev] [PATCH 01/21] net/ixgbe/base: clear VFMBMEM and toggle VF's Tx queues
Quoted 1 line · Guinan Sun
Add a method to clear VFMBMEM memory.
Can you please give some context, what is "VFMBMEM memory", why need to clear it, etc...?
Quoted 2 lines
Add a method to toggle VF's TX queues as workaround for silicon errata.
'toggle' here means enable and disable the Tx queues right?
Will this 'ixgbe_toggle_txdctl()' function used by the driver, if so better to have that change in the same patch to get the full context.
Are there two changes related to eachother, 'txdctl' & 'VFMBMEM ', if not can you please seperate them?
Quoted 3 lines
Signed-off-by Piotr Pietruszewski <[email protected]>Signed-off-by Guinan Sun <[email protected]>
<...>
Quoted 24 lines
drivers/net/ixgbe/base/ixgbe_mbx.c +20
-0+/** +* ixgbe_clear_mbx - Clear Mailbox Memory +* @hw: pointer to the HW structure +* @vf_number: id of mailbox to write +* +* Set VFMBMEM of given VF to 0x0. +**/ +s32 ixgbe_clear_mbx (struct ixgbe_hw *hw,u16 vf_number) +{ +struct ixgbe_mbx_info *mbx = &hw->mbx; +s32 ret_val =IXGBE_SUCCESS ; + +DEBUGFUNC ("ixgbe_clear_mbx" ); + +if (mbx->ops.clear) + ret_val = mbx->ops.clear (hw, vf_number); + +return ret_val; +} +/** * ixgbe_poll_for_msg - Wait for message notification * @hw: pointer to the HW structure
drivers/net/ixgbe/base/ixgbe_mbx.c void ixgbe_init_mbx_params_vf(struct ixgbe_hw *hw) · line 509
Quoted 4 lines
drivers/net/ixgbe/base/ixgbe_mbx.c +1
-0@@ -486,6 +506,7 @@ void ixgbe_init_mbx_params_vf(struct ixgbe_hw *hw) mbx->ops.check_for_msg = ixgbe_check_for_msg_vf; mbx->ops.check_for_ack = ixgbe_check_for_ack_vf; mbx->ops.check_for_rst = ixgbe_check_for_rst_vf; + mbx->ops.clear =NULL ;
If it is not used why 'ixgbe_clear_mbx()' added?
Re: [dpdk-dev] [PATCH 01/21] net/ixgbe/base: clear VFMBMEM and toggle VF's Tx queues
Hi Ferruh
Quoted 18 lines
-----Original Message-----
From: Yigit, Ferruh
Sent: Monday, June 22, 2020 7:59 PM
To: Sun, GuinanX <[email protected]>; [email protected]
Cc: Pietruszewski, Piotr <[email protected]>
Subject: Re: [dpdk-dev] [PATCH 01/21]net/ixgbe/base: clear VFMBMEM and toggle VF's Tx queuesQuoted 1 line · Guinan Sun
Add a method to clear VFMBMEM memory.
Can you please give some context, what is "VFMBMEM memory", why need to clear it, etc...?
Quoted 2 lines
Add a method to toggle VF's TX queues as workaround for silicon errata.
Quoted 7 lines
'toggle' here means enable and disable the Tx queues right?
Will this 'ixgbe_toggle_txdctl()' function used by the driver, if so better to have that change in the same patch to get the full context.Are there two changes related to eachother, 'txdctl' & 'VFMBMEM ', if not can you please seperate them?
Sorry, our commit message caused you confusion.
Later V2 patch will modify the commit information and explain'txdctl' &'VFMBMEM'.
Quoted 35 lines
Quoted 3 lines
Signed-off-by Piotr Pietruszewski <[email protected]>Signed-off-by Guinan Sun <[email protected]><...>
Quoted 23 lines
drivers/net/ixgbe/base/ixgbe_mbx.c +19
-0+/** +* ixgbe_clear_mbx - Clear Mailbox Memory +* @hw: pointer to the HW structure +* @vf_number: id of mailbox to write +* +* Set VFMBMEM of given VF to 0x0. +**/ +s32 ixgbe_clear_mbx (struct ixgbe_hw *hw,u16 vf_number) { +struct ixgbe_mbx_info *mbx = &hw->mbx; +s32 ret_val =IXGBE_SUCCESS ; + +DEBUGFUNC ("ixgbe_clear_mbx" ); + +if (mbx->ops.clear) + ret_val = mbx->ops.clear (hw, vf_number); + +return ret_val; +} +/** * ixgbe_poll_for_msg - Wait for message notification * @hw: pointer to the HW structure drivers/net/ixgbe/base/ixgbe_mbx.c void ixgbe_init_mbx_params_vf(struct ixgbe_hw *hw) · line 509
Quoted 4 lines
drivers/net/ixgbe/base/ixgbe_mbx.c +1
-0@@ -486,6 +506,7 @@ void ixgbe_init_mbx_params_vf(struct ixgbe_hw *hw) mbx->ops.check_for_msg = ixgbe_check_for_msg_vf; mbx->ops.check_for_ack = ixgbe_check_for_ack_vf; mbx->ops.check_for_rst = ixgbe_check_for_rst_vf; + mbx->ops.clear =NULL ;If it is not used why '
ixgbe_clear_mbx()' added?
PATCH 2/21 net/ixgbe/base: change in the condition for response HI
In reply to Guinan SunAccording to SGVL EAS Host interface Shadow RAM Read (0x31) command response buffer length is stored in two bytes, instead of one byte.
--- drivers/net/ixgbe/base/ixgbe_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ixgbe/base/ixgbe_common.c +1 -1
@@ -4656,7 +4656,7 @@ s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u32 *buffer,* Read Flash command requires reading buffer length from * two byes instead of one byte */ -if (resp->cmd ==0x30 ) { +if (resp->cmd ==0x30 || resp->cmd ==0x31 ) {for (; bi < dword_len +2 ; bi++) { buffer[bi] =IXGBE_READ_REG_ARRAY (hw,IXGBE_FLEX_MNG , bi);
Signature · 1 line
2.17.1
Re: [dpdk-dev] [PATCH 02/21] net/ixgbe/base: change in the condition for response HI
Quoted 3 lines · Guinan Sun
According to SGVL EAS Host interface Shadow RAM Read (
0x31) command response buffer length is stored in two bytes, instead of one byte.
For patch subject, better to say 'fix' instead of 'change' because that is what done.
Previously Shadow RAM Read (0x31) command response buffer length was taken wrong, now you are fixing it. Overall "Shadow RAM Read (0x31)" command response value was wrong, so I guess it can be fair to say:
"net/ixgbe/base: fix host interface shadow RAM read"
Quoted 21 lines
Signed-off-by Mateusz Kowalski <[email protected]>Signed-off-by Guinan Sun <[email protected]>--- drivers/net/ixgbe/base/ixgbe_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/ixgbe/base/ixgbe_common.c +1
-1@@ -4656,7 +4656,7 @@ s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u32 *buffer,* Read Flash command requires reading buffer length from * two byes instead of one byte */ -if (resp->cmd ==0x30 ) { +if (resp->cmd ==0x30 || resp->cmd ==0x31 ) {for (; bi < dword_len +2 ; bi++) { buffer[bi] =IXGBE_READ_REG_ARRAY (hw,IXGBE_FLEX_MNG , bi);
Re: [dpdk-dev] [PATCH 02/21] net/ixgbe/base: change in the condition for response HI
Quoted 9 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Ferruh Yigit
Sent: Monday, June 22, 2020 19:59
To: Sun, GuinanX <[email protected]>; [email protected]
Cc: Mateusz Kowalski <[email protected]>
Subject: Re: [dpdk-dev] [PATCH 02/21]net/ixgbe/base: change in the condition for response HI
Don't use HI, please follow Ferruh's comments
Quoted 36 lines · Guinan Sun
Quoted 2 lines
According to SGVL EAS Host interface Shadow RAM Read (
0x31) command response buffer length is stored in two bytes, instead of one byte.For patch subject, better to say 'fix' instead of 'change' because that is what done.
Previously Shadow RAM Read (0x31) command response buffer length was taken wrong, now you are fixing it. Overall "Shadow RAM Read (0x31)" command response value was wrong, so I guess it can be fair to say:
"net/ixgbe/base: fix host interface shadow RAM read"drivers/net/ixgbe/base/ixgbe_common.c s32 ixgbe_host_interface_command(struct
Quoted 13 lines
Signed-off-by Mateusz Kowalski <[email protected]>Signed-off-by Guinan Sun <[email protected]>--- drivers/net/ixgbe/base/ixgbe_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/ixgbe/base/ixgbe_common.c +0
-0@@ -4656,7 +4656,7 @@ s32 ixgbe_host_interface_command(struct
ixgbe_hw*hw, u32 *buffer,drivers/net/ixgbe/base/ixgbe_common.c s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u32 *buffer,
Quoted 7 lines
drivers/net/ixgbe/base/ixgbe_common.c +1
-1* Read Flash command requires reading buffer length from * two byes instead of one byte */ -if (resp->cmd ==0x30 ) { +if (resp->cmd ==0x30 || resp->cmd ==0x31 ) {for (; bi < dword_len +2 ; bi++) { buffer[bi] = IXGBE_READ_REG_ARRAY(hw,
IXGBE_FLEX_MNG,Quoted 2 lines
drivers/net/ixgbe/base/ixgbe_common.c +0
-0bi);
Re: [dpdk-dev] [PATCH 02/21] net/ixgbe/base: change in the condition for response HI
In reply to Ferruh YigitHi Ferruh
Quoted 12 lines
-----Original Message-----
From: Yigit, Ferruh
Sent: Monday, June 22, 2020 7:59 PM
To: Sun, GuinanX <[email protected]>; [email protected]
Cc: Mateusz Kowalski <[email protected]>
Subject: Re: [dpdk-dev] [PATCH 02/21]net/ixgbe/base: change in the condition for response HIQuoted 2 lines · Guinan Sun
According to SGVL EAS Host interface Shadow RAM Read (
0x31) command response buffer length is stored in two bytes, instead of one byte.
Quoted 7 lines
For patch subject, better to say 'fix' instead of 'change' because that is what done.
Previously Shadow RAM Read (0x31) command response buffer length was taken wrong, now you are fixing it. Overall "Shadow RAM Read (0x31)" command response value was wrong, so I guess it can be fair to say:
"net/ixgbe/base: fix host interface shadow RAM read"
I agree with you.
V2 patch will fix the problem.
Quoted 24 lines
drivers/net/ixgbe/base/ixgbe_common.c s32 ixgbe_host_interface_command(struct
Quoted 13 lines
Signed-off-by Mateusz Kowalski <[email protected]>Signed-off-by Guinan Sun <[email protected]>--- drivers/net/ixgbe/base/ixgbe_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/ixgbe/base/ixgbe_common.c +0
-0@@ -4656,7 +4656,7 @@ s32 ixgbe_host_interface_command(struct
ixgbe_hw*hw, u32 *buffer,drivers/net/ixgbe/base/ixgbe_common.c s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u32 *buffer,
Quoted 7 lines
drivers/net/ixgbe/base/ixgbe_common.c +1
-1* Read Flash command requires reading buffer length from * two byes instead of one byte */ -if (resp->cmd ==0x30 ) { +if (resp->cmd ==0x30 || resp->cmd ==0x31 ) {for (; bi < dword_len +2 ; bi++) { buffer[bi] = IXGBE_READ_REG_ARRAY(hw,
IXGBE_FLEX_MNG,Quoted 2 lines
drivers/net/ixgbe/base/ixgbe_common.c +0
-0bi);
PATCH 3/21 net/ixgbe/base: hange flow for "Apply Update" command
In reply to Guinan SunFor the "Apply Update" command the firmware does not given an response. For this command, success should be return. Based on information at EAS.
--- drivers/net/ixgbe/base/ixgbe_common.c | 9 ++++++++- drivers/net/ixgbe/base/ixgbe_type.h | 12 ++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-)
drivers/net/ixgbe/base/ixgbe_common.c +8 -1
@@ -4584,11 +4584,18 @@ s32 ixgbe_hic_unlocked(struct ixgbe_hw *hw, u32 *buffer, u32 length,msec_delay (1 ); } +/* For each command except "Apply Update" perform +* status checks in the HICR registry. +*/ +if ((buffer[0 ] &IXGBE_HOST_INTERFACE_MASK_CMD ) == +IXGBE_HOST_INTERFACE_APPLY_UPDATE_CMD ) +return IXGBE_SUCCESS ; +/* Check command completion */ if ((timeout && i == timeout) || !(IXGBE_READ_REG (hw,IXGBE_HICR ) &IXGBE_HICR_SV )) {ERROR_REPORT1 (IXGBE_ERROR_CAUTION , -"Command has failed with no status valid.\n" ); +"Command has failed with no status valid.\n" );return IXGBE_ERR_HOST_INTERFACE_COMMAND ; }
drivers/net/ixgbe/base/ixgbe_type.h +12 -0
@@ -4366,4 +4366,16 @@ struct ixgbe_hw {#define IXGBE_NW_MNG_IF_SEL_MDIO_PHY_ADD \ (0x1F << IXGBE_NW_MNG_IF_SEL_MDIO_PHY_ADD_SHIFT) +/* Code Command (Flash I/F Interface) */ +#define IXGBE_HOST_INTERFACE_FLASH_READ_CMD 0x30 +#define IXGBE_HOST_INTERFACE_SHADOW_RAM_READ_CMD 0x31 +#define IXGBE_HOST_INTERFACE_FLASH_WRITE_CMD 0x32 +#define IXGBE_HOST_INTERFACE_SHADOW_RAM_WRITE_CMD 0x33 +#define IXGBE_HOST_INTERFACE_FLASH_MODULE_UPDATE_CMD 0x34 +#define IXGBE_HOST_INTERFACE_FLASH_BLOCK_EREASE_CMD 0x35 +#define IXGBE_HOST_INTERFACE_SHADOW_RAM_DUMP_CMD 0x36 +#define IXGBE_HOST_INTERFACE_FLASH_INFO_CMD 0x37 +#define IXGBE_HOST_INTERFACE_APPLY_UPDATE_CMD 0x38 +#define IXGBE_HOST_INTERFACE_MASK_CMD 0x000000FF +#endif /* _IXGBE_TYPE_H_ */
Signature · 1 line
2.17.1
Re: [dpdk-dev] [PATCH 03/21] net/ixgbe/base: hange flow for "Apply Update" command
Quoted 6 lines · Guinan Sun
For the "Apply Update" command the firmware does not given an response. For this command, success should be return. Based on information at EAS.
Signed-off-by Mateusz Kowalski <[email protected]>Signed-off-by Guinan Sun <[email protected]>
<...>
Quoted 12 lines
drivers/net/ixgbe/base/ixgbe_type.h +3
-0@@ -4366,4 +4366,16 @@ struct ixgbe_hw {#define IXGBE_NW_MNG_IF_SEL_MDIO_PHY_ADD \ (0x1F << IXGBE_NW_MNG_IF_SEL_MDIO_PHY_ADD_SHIFT) +/* Code Command (Flash I/F Interface) */ +#define IXGBE_HOST_INTERFACE_FLASH_READ_CMD 0x30 +#define IXGBE_HOST_INTERFACE_SHADOW_RAM_READ_CMD 0x31
drivers/net/ixgbe/base/ixgbe_type.h struct ixgbe_hw { · line 4381
Quoted 10 lines
drivers/net/ixgbe/base/ixgbe_type.h +9
-0+#define IXGBE_HOST_INTERFACE_FLASH_WRITE_CMD 0x32 +#define IXGBE_HOST_INTERFACE_SHADOW_RAM_WRITE_CMD 0x33 +#define IXGBE_HOST_INTERFACE_FLASH_MODULE_UPDATE_CMD 0x34 +#define IXGBE_HOST_INTERFACE_FLASH_BLOCK_EREASE_CMD 0x35 +#define IXGBE_HOST_INTERFACE_SHADOW_RAM_DUMP_CMD 0x36 +#define IXGBE_HOST_INTERFACE_FLASH_INFO_CMD 0x37 +#define IXGBE_HOST_INTERFACE_APPLY_UPDATE_CMD 0x38 +#define IXGBE_HOST_INTERFACE_MASK_CMD 0x000000FF +#endif /* _IXGBE_TYPE_H_ */
Previous patch uses these commands in a hardcoded way, since we are adding defines, why not them in the previous patch so we can use the macros in previous patch?
Re: [dpdk-dev] [PATCH 03/21] net/ixgbe/base: hange flow for "Apply Update" command
Hi Ferruh
Quoted 46 lines
-----Original Message-----
From: Yigit, Ferruh
Sent: Monday, June 22, 2020 7:59 PM
To: Sun, GuinanX <[email protected]>; [email protected]
Cc: Mateusz Kowalski <[email protected]>
Subject: Re: [dpdk-dev] [PATCH 03/21]net/ixgbe/base: hange flow for "Apply Update" commandQuoted 6 lines · Guinan Sun
For the "Apply Update" command the firmware does not given an response. For this command, success should be return. Based on information at EAS.
Signed-off-by Mateusz Kowalski <[email protected]>Signed-off-by Guinan Sun <[email protected]><...>
drivers/net/ixgbe/base/ixgbe_type.h struct ixgbe_hw { · line 4367
Quoted 8 lines
drivers/net/ixgbe/base/ixgbe_type.h +0
-0@@ -4366,4 +4366,16 @@ struct ixgbe_hw {#define IXGBE_NW_MNG_IF_SEL_MDIO_PHY_ADD \ (0x1F <<
IXGBE_NW_MNG_IF_SEL_MDIO_PHY_ADD_SHIFT)drivers/net/ixgbe/base/ixgbe_type.h struct ixgbe_hw {
Quoted 4 lines
drivers/net/ixgbe/base/ixgbe_type.h +3
-0+/* Code Command (Flash I/F Interface) */ +#define IXGBE_HOST_INTERFACE_FLASH_READ_CMD 0x30 +#define IXGBE_HOST_INTERFACE_SHADOW_RAM_READ_CMD 0x31drivers/net/ixgbe/base/ixgbe_type.h struct ixgbe_hw { · line 4371
Quoted 1 line
drivers/net/ixgbe/base/ixgbe_type.h +1
-0+#define IXGBE_HOST_INTERFACE_FLASH_WRITE_CMD 0x32drivers/net/ixgbe/base/ixgbe_type.h struct ixgbe_hw { · line 4372
Quoted 1 line
drivers/net/ixgbe/base/ixgbe_type.h +1
-0+#define IXGBE_HOST_INTERFACE_SHADOW_RAM_WRITE_CMD 0x33drivers/net/ixgbe/base/ixgbe_type.h struct ixgbe_hw { · line 4373
Quoted 1 line
drivers/net/ixgbe/base/ixgbe_type.h +1
-0+#define IXGBE_HOST_INTERFACE_FLASH_MODULE_UPDATE_CMD 0x34drivers/net/ixgbe/base/ixgbe_type.h struct ixgbe_hw { · line 4374
Quoted 1 line
drivers/net/ixgbe/base/ixgbe_type.h +1
-0+#define IXGBE_HOST_INTERFACE_FLASH_BLOCK_EREASE_CMD 0x35drivers/net/ixgbe/base/ixgbe_type.h struct ixgbe_hw { · line 4375
Quoted 1 line
drivers/net/ixgbe/base/ixgbe_type.h +1
-0+#define IXGBE_HOST_INTERFACE_SHADOW_RAM_DUMP_CMD 0x36drivers/net/ixgbe/base/ixgbe_type.h struct ixgbe_hw { · line 4377
Quoted 2 lines
drivers/net/ixgbe/base/ixgbe_type.h +2
-0+#define IXGBE_HOST_INTERFACE_FLASH_INFO_CMD 0x37 +#define IXGBE_HOST_INTERFACE_APPLY_UPDATE_CMD 0x38drivers/net/ixgbe/base/ixgbe_type.h struct ixgbe_hw { · line 4378
Quoted 1 line
drivers/net/ixgbe/base/ixgbe_type.h +1
-0+#define IXGBE_HOST_INTERFACE_MASK_CMD
Quoted 8 lines
0x000000FFdrivers/net/ixgbe/base/ixgbe_type.h struct ixgbe_hw {
Quoted 3 lines
drivers/net/ixgbe/base/ixgbe_type.h +1
-0+#endif /* _IXGBE_TYPE_H_ */ Previous patch uses these commands in a hardcoded way, since we are adding defines, why not them in the previous patch so we can use the macros in previous patch?
I agree with you.
V2 patch we will split this patch into two parts. The part about macrow will be merged into the previous patch.
PATCH 4/21 net/ixgbe/base: x550em 10G NIC driver issue
In reply to Guinan SunWith the NVM image for x550em XFI ethtool will not report the auto-negotiation feature correctly. The auto-negotiation should be "No" for supports and advertised items.
--- drivers/net/ixgbe/base/ixgbe_x550.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/net/ixgbe/base/ixgbe_x550.c +7 -1
@@ -1891,7 +1891,14 @@ s32 ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw,else *speed =IXGBE_LINK_SPEED_10GB_FULL ; }else { + *autoneg = true; +switch (hw->phy.type) { +case ixgbe_phy_x550em_xfi: + *speed =IXGBE_LINK_SPEED_1GB_FULL | +IXGBE_LINK_SPEED_10GB_FULL ; + *autoneg = false; +break ;case ixgbe_phy_ext_1g_t:#ifdef PREBOOT_SUPPORT *speed =IXGBE_LINK_SPEED_1GB_FULL ;
@@ -1925,7 +1932,6 @@ s32 ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw,IXGBE_LINK_SPEED_1GB_FULL ;break ; } - *autoneg = true; }return IXGBE_SUCCESS ;
Signature · 1 line
2.17.1
Re: [dpdk-dev] [PATCH 04/21] net/ixgbe/base: x550em 10G NIC driver issue
Quoted 3 lines · Guinan Sun
With the NVM image for x550em XFI ethtool will not report the auto-negotiation feature correctly. The auto-negotiation should be "No" for supports and advertised items.
This is not 'ethtool' issue in this context, right? It also affects the reported value for the DPDK?
And "driver issue" in the patch title gives only a little value, what do you think something like:
"net/ixgbe/base: fix x550em 10G NIC auto-negotiation report"
Also does it only affects the auto-negotiation, I can see speed is updated too?
Quoted 35 lines
Signed-off-by Piotr Skajewski <[email protected]>Signed-off-by Guinan Sun <[email protected]>--- drivers/net/ixgbe/base/ixgbe_x550.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)drivers/net/ixgbe/base/ixgbe_x550.c +7
-1@@ -1891,7 +1891,14 @@ s32 ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw,else *speed =IXGBE_LINK_SPEED_10GB_FULL ; }else { + *autoneg = true; +switch (hw->phy.type) { +case ixgbe_phy_x550em_xfi: + *speed =IXGBE_LINK_SPEED_1GB_FULL | +IXGBE_LINK_SPEED_10GB_FULL ; + *autoneg = false; +break ;case ixgbe_phy_ext_1g_t:#ifdef PREBOOT_SUPPORT *speed =IXGBE_LINK_SPEED_1GB_FULL ;@@ -1925,7 +1932,6 @@ s32 ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw,IXGBE_LINK_SPEED_1GB_FULL ;break ; } - *autoneg = true; }return IXGBE_SUCCESS ;
Re: [dpdk-dev] [PATCH 04/21] net/ixgbe/base: x550em 10G NIC driver issue
Hi Ferruh
Quoted 8 lines
-----Original Message-----
From: Yigit, Ferruh
Sent: Monday, June 22, 2020 7:59 PM
To: Sun, GuinanX <[email protected]>; [email protected]
Cc: Skajewski, PiotrX <[email protected]>
Subject: Re: [dpdk-dev] [PATCH 04/21]net/ixgbe/base: x550em 10G NIC driver issue
Quoted 7 lines
Quoted 3 lines · Guinan Sun
With the NVM image for x550em XFI ethtool will not report the auto-negotiation feature correctly. The auto-negotiation should be "No" for supports and advertised items.
This is not 'ethtool' issue in this context, right? It also affects the reported value for the DPDK?
It is not only 'ethtool' issue but also affects the reported value for the DPDK.
Quoted 5 lines
And "driver issue" in the patch title gives only a little value, what do you think something like:
"net/ixgbe/base: fix x550em 10G NIC auto-negotiation report"
I agree with your opinion, patch v2 will fix it.
Quoted 1 line
Also does it only affects the auto-negotiation, I can see speed is updated too?
The speed update has an impact on the report, and patch v2 will modify the commit information to show the impact on speed.
Quoted 39 lines
drivers/net/ixgbe/base/ixgbe_x550.c s32 ixgbe_get_link_capabilities_X550em(struct
Quoted 14 lines
Signed-off-by Piotr Skajewski <[email protected]>Signed-off-by Guinan Sun <[email protected]>--- drivers/net/ixgbe/base/ixgbe_x550.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)drivers/net/ixgbe/base/ixgbe_x550.c +0
-0@@ -1891,7 +1891,14 @@ s32 ixgbe_get_link_capabilities_X550em(struct
ixgbe_hw*hw,Quoted 4 lines
drivers/net/ixgbe/base/ixgbe_x550.c +1
-0else *speed =IXGBE_LINK_SPEED_10GB_FULL ; }else { + *autoneg = true;drivers/net/ixgbe/base/ixgbe_x550.c s32 ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw,
Quoted 10 lines
drivers/net/ixgbe/base/ixgbe_x550.c +6
-0+switch (hw->phy.type) { +case ixgbe_phy_x550em_xfi: + *speed =IXGBE_LINK_SPEED_1GB_FULL | +IXGBE_LINK_SPEED_10GB_FULL ; + *autoneg = false; +break ;case ixgbe_phy_ext_1g_t:#ifdef PREBOOT_SUPPORT *speed = IXGBE_LINK_SPEED_1GB_FULL; @@ -1925,7+1932,6 @@ s32
Quoted 9 lines
ixgbe_get_link_capabilities_X550em(struct
ixgbe_hw*hw,drivers/net/ixgbe/base/ixgbe_x550.c +0
-1IXGBE_LINK_SPEED_1GB_FULL ;break ; } - *autoneg = true; }return IXGBE_SUCCESS ;
PATCH 5/21 net/ixgbe/base: added API for NVM update
In reply to Guinan SunWhen Secure Boot is enabled access to the /dev/mem is forbidden for user-space applications and clients are reporting inability to use tools in Secure Boot Mode. The way to perform NVM update is to use ixgbe driver. Currently 10G Linux Base Driver has API which allows only EEPROM access. There is a need to extend IOCTL API to allow NVM and registers access.
--- drivers/net/ixgbe/base/ixgbe_api.c | 13 ++++++++++ drivers/net/ixgbe/base/ixgbe_type.h | 40 +++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+)
drivers/net/ixgbe/base/ixgbe_api.c +13 -0
@@ -95,6 +95,19 @@ s32 ixgbe_init_shared_code(struct ixgbe_hw *hw) } hw->mac.max_link_up_time =IXGBE_LINK_UP_TIME ; +#ifdef IXGBE_NVMUPD_SUPPORT +/* NVM Update features structure initialization */ + hw->nvmupd_features.major =IXGBE_NVMUPD_FEATURES_API_VER_MAJOR ; + hw->nvmupd_features.minor =IXGBE_NVMUPD_FEATURES_API_VER_MINOR ; + hw->nvmupd_features.size =sizeof (hw->nvmupd_features); +memset (hw->nvmupd_features.features,0x0 , +IXGBE_NVMUPD_FEATURES_API_FEATURES_ARRAY_LEN * +sizeof (*hw->nvmupd_features.features)); + + hw->nvmupd_features.features[0 ] = +IXGBE_NVMUPD_FEATURE_REGISTER_ACCESS_SUPPORT ; +#endif /* IXGBE_NVMUPD_SUPPORT */ +return status; }
drivers/net/ixgbe/base/ixgbe_type.h +40 -0
@@ -169,6 +169,10 @@#define IXGBE_FLA_X550EM_x IXGBE_FLA#define IXGBE_FLA_X550EM_a 0x15F68#define IXGBE_FLA_BY_MAC (_hw) IXGBE_BY_MAC((_hw), FLA) +#define IXGBE_FLA_FL_SIZE_SHIFT_X540 17 +#define IXGBE_FLA_FL_SIZE_SHIFT_X550 12 +#define IXGBE_FLA_FL_SIZE_MASK_X540 (0x7 << IXGBE_FLA_FL_SIZE_SHIFT_X540) +#define IXGBE_FLA_FL_SIZE_MASK_X550 (0x7 << IXGBE_FLA_FL_SIZE_SHIFT_X550)#define IXGBE_EEMNGCTL 0x10110#define IXGBE_EEMNGDATA 0x10114
@@ -1402,6 +1406,7 @@ struct ixgbe_dmac_config {#define IXGBE_BARCTRL_FLSIZE 0x0700#define IXGBE_BARCTRL_FLSIZE_SHIFT 8#define IXGBE_BARCTRL_CSRSIZE 0x2000 +#define IXGBE_BARCTRL_CSRSIZE_SHIFT 13/* RSCCTL Bit Masks */ #define IXGBE_RSCCTL_RSCEN 0x01
@@ -3905,6 +3910,37 @@ struct ixgbe_hw_stats {u64 o2bspc; }; +#ifdef IXGBE_NVMUPD_SUPPORT +/* NVM Update commands */ +#define IXGBE_NVMUPD_CMD_REG_READ 0x0000000B +#define IXGBE_NVMUPD_CMD_REG_WRITE 0x0000000C + +/* NVM Update features API */ +#define IXGBE_NVMUPD_FEATURES_API_VER_MAJOR 0 +#define IXGBE_NVMUPD_FEATURES_API_VER_MINOR 0 +#define IXGBE_NVMUPD_FEATURES_API_FEATURES_ARRAY_LEN 12 +#define IXGBE_NVMUPD_EXEC_FEATURES 0xe +#define IXGBE_NVMUPD_FEATURE_FLAT_NVM_SUPPORT BIT(0) +#define IXGBE_NVMUPD_FEATURE_REGISTER_ACCESS_SUPPORT BIT(1) + +#define IXGBE_NVMUPD_MOD_PNT_MASK 0xFF + +struct ixgbe_nvm_access { +u32 command; +u32 config; +u32 offset;/* in bytes */ +u32 data_size;/* in bytes */ +u8 data[1 ]; +}; + +struct ixgbe_nvm_features { +u8 major; +u8 minor; +u16 size; +u8 features[IXGBE_NVMUPD_FEATURES_API_FEATURES_ARRAY_LEN ]; +}; + +#endif /* forward declaration */ struct ixgbe_hw ;
@@ -4200,6 +4236,10 @@ struct ixgbe_hw {bool allow_unsupported_sfp;bool wol_enabled;bool need_crosstalk_fix; +#ifdef IXGBE_NVMUPD_SUPPORT +/* NVM Update features */ +struct ixgbe_nvm_features nvmupd_features; +#endif };#define ixgbe_call_func (hw, func, params, error) \
Signature · 1 line
2.17.1
Re: [dpdk-dev] [PATCH 05/21] net/ixgbe/base: added API for NVM update
Quoted 6 lines · Guinan Sun
When Secure Boot is enabled access to the
/dev/memis forbidden for user-space applications and clients are reporting inability to use tools in Secure Boot Mode. The way to perform NVM update is to use ixgbe driver. Currently 10G Linux Base Driver has API which allows only EEPROM access. There is a need to extend IOCTL API to allow NVM and registers access.
If I understand this correctly, this is to enable NVM update through 'ixgbe' kernel driver, is this needed for the DPDK?
Quoted 3 lines
Signed-off-by Piotr Skajewski <[email protected]>Signed-off-by Guinan Sun <[email protected]>
<...>
drivers/net/ixgbe/base/ixgbe_type.h struct ixgbe_hw { · line 4242
Quoted 8 lines
drivers/net/ixgbe/base/ixgbe_type.h +4
-0@@ -4200,6 +4236,10 @@ struct ixgbe_hw {bool allow_unsupported_sfp;bool wol_enabled;bool need_crosstalk_fix; +#ifdef IXGBE_NVMUPD_SUPPORT +/* NVM Update features */ +struct ixgbe_nvm_features nvmupd_features; +#endif
In DPDK is there anywhere that sets this 'IXGBE_NVMUPD_SUPPORT' define?
Re: [dpdk-dev] [PATCH 05/21] net/ixgbe/base: added API for NVM update
Hi Ferruh
Quoted 25 lines
-----Original Message-----
From: Yigit, Ferruh
Sent: Monday, June 22, 2020 7:59 PM
To: Sun, GuinanX <[email protected]>; [email protected]
Cc: Skajewski, PiotrX <[email protected]>
Subject: Re: [dpdk-dev] [PATCH 05/21]net/ixgbe/base: added API for NVM updateQuoted 6 lines · Guinan Sun
When Secure Boot is enabled access to the
/dev/memis forbidden for user-space applications and clients are reporting inability to use tools in Secure Boot Mode. The way to perform NVM update is to use ixgbe driver. Currently 10G Linux Base Driver has API which allows only EEPROM access. There is a need to extend IOCTL API to allow NVM and registers access.If I understand this correctly, this is to enable NVM update through 'ixgbe' kernel driver, is this needed for the DPDK?
Quoted 3 lines
Signed-off-by Piotr Skajewski <[email protected]>Signed-off-by Guinan Sun <[email protected]><...>
Quoted 9 lines
drivers/net/ixgbe/base/ixgbe_type.h struct ixgbe_hw { · line 4241
Quoted 7 lines
drivers/net/ixgbe/base/ixgbe_type.h +3
-0@@ -4200,6 +4236,10 @@ struct ixgbe_hw {bool allow_unsupported_sfp;bool wol_enabled;bool need_crosstalk_fix; +#ifdef IXGBE_NVMUPD_SUPPORT +/* NVM Update features */ +struct ixgbe_nvm_features nvmupd_features;#endif In DPDK is there anywhere that sets this '
IXGBE_NVMUPD_SUPPORT' define?
V2 patch will remove this code.
PATCH 6/21 net/ixgbe/base: resolve infinite recursion on PCIe link down
In reply to Guinan SunIn some corner cases the functions ixgbe_clear_rar_generic and ixgbe_clear_vmdq_generic may call one another leading to infinite recursion.
When ixgbe_clear_vmdq_generic is called with IXGBE_CLEAR_VMDQ_ALL flag, it's going to clear MPSAR registers, and proceed to call ixgbe_clear_rar_generic, which in turn will clear the RAR registers, and recursively call back ixgbe_clear_vmdq_generic. Normally, the latter would detect that MPSAR registers have already been cleared and terminate the recursion.
However, when PCIe link is down, and before the driver has had the opportunity to shut itself down, all register reads return 0xFFFFFFFF, and all register writes fail silently. In such case, because ixgbe_clear_vmdq_generic blindly assumes that clearing MPSAR registers succeeded, it's going to always call ixgbe_clear_rar_generic, which in turn will always call back ixgbe_clear_vmdq_generic, creating inifinite recursion.
This patch re-reads MPSAR register values after they had been cleared. In case of PCIe link failure, the values read will be non-zero, which will terminate the recursion. On the other hand, under normal circumstances the value read from MPSAR registers is going to be equal to the value previously written, so this patch is expected not to cause any regressions.
Testing Hints (required if no HSD):
Bring down the adapter's parent PCIe bridge.
--- drivers/net/ixgbe/base/ixgbe_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ixgbe/base/ixgbe_common.c +2 -2
@@ -3778,11 +3778,11 @@ s32 ixgbe_clear_vmdq_generic(struct ixgbe_hw *hw, u32 rar, u32 vmdq)if (vmdq ==IXGBE_CLEAR_VMDQ_ALL ) {if (mpsar_lo) {IXGBE_WRITE_REG (hw,IXGBE_MPSAR_LO (rar),0 ); - mpsar_lo =0 ; + mpsar_lo =IXGBE_READ_REG (hw,IXGBE_MPSAR_LO (rar)); }if (mpsar_hi) {IXGBE_WRITE_REG (hw,IXGBE_MPSAR_HI (rar),0 ); - mpsar_hi =0 ; + mpsar_hi =IXGBE_READ_REG (hw,IXGBE_MPSAR_HI (rar)); } }else if (vmdq <32 ) { mpsar_lo &= ~(1 << vmdq);
Signature · 1 line
2.17.1
PATCH 7/21 net/ixgbe/base: added register definitions for NVM update
In reply to Guinan SunAdded additional register for X550 and above device family.
--- drivers/net/ixgbe/base/ixgbe_type.h | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/ixgbe/base/ixgbe_type.h +2 -0
@@ -1086,8 +1086,10 @@ struct ixgbe_dmac_config {#define IXGBE_HSMC0R 0x15F04#define IXGBE_HSMC1R 0x15F08#define IXGBE_SWSR 0x15F10 +#define IXGBE_FWRESETCNT 0x15F40#define IXGBE_HFDR 0x15FE8#define IXGBE_FLEX_MNG 0x15800/* 0x15800 - 0x15EFC */ +#define IXGBE_FLEX_MNG_PTR (_i) (IXGBE_FLEX_MNG + ((_i) * 4))#define IXGBE_HICR_EN 0x01/* Enable bit - RO */ /* Driver sets this bit when done to put command in RAM */
Signature · 1 line
2.17.1
PATCH 8/21 net/ixgbe/base: cleanup spelling mistakes in comments
In reply to Guinan SunSeveral functions in the driver code have a weird function comment formatting which uses two spaces instead of only one space for the main function body.
This formatting will be mechanically fixed by sed in a future patch, but doing so leads to some checkpatch.pl warnings on that patch. Cleanup the spelling mistakes that will be detected first. This way, it is easier to verify the mechanical transformation done by sed in the following patch.
--- drivers/net/ixgbe/base/ixgbe_mbx.c | 4 ++-- drivers/net/ixgbe/base/ixgbe_vf.c | 2 +- drivers/net/ixgbe/base/ixgbe_x550.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/net/ixgbe/base/ixgbe_mbx.c +2 -2
@@ -170,11 +170,11 @@ STATIC s32 ixgbe_poll_for_msg(struct ixgbe_hw *hw, u16 mbx_id) }/** -* ixgbe_poll_for_ack - Wait for message acknowledgement +* ixgbe_poll_for_ack - Wait for message acknowledgment * @hw: pointer to the HW structure * @mbx_id: id of mailbox to write * -* returns SUCCESS if it successfully received a message acknowledgement +* returns SUCCESS if it successfully received a message acknowledgment **/ STATIC s32 ixgbe_poll_for_ack(struct ixgbe_hw *hw, u16 mbx_id) {
drivers/net/ixgbe/base/ixgbe_vf.c +1 -1
@@ -142,7 +142,7 @@ s32 ixgbe_init_hw_vf(struct ixgbe_hw *hw)* ixgbe_reset_hw_vf - Performs hardware reset * @hw: pointer to hardware structure * -* Resets the hardware by reseting the transmit and receive units, masks and +* Resets the hardware by resetting the transmit and receive units, masks and * clears all interrupts. **/ s32 ixgbe_reset_hw_vf (struct ixgbe_hw *hw)
drivers/net/ixgbe/base/ixgbe_x550.c +1 -1
@@ -1034,7 +1034,7 @@ void ixgbe_set_source_address_pruning_X550(struct ixgbe_hw *hw, bool enable, }/** -* ixgbe_set_ethertype_anti_spoofing_X550 - Enable/Disable Ethertype anti-spoofing +* ixgbe_set_ethertype_anti_spoofing_X550 - Configure Ethertype anti-spoofing * @hw: pointer to hardware structure * @enable: enable or disable switch for Ethertype anti-spoofing * @vf: Virtual Function pool - VF Pool to set for Ethertype anti-spoofing
Signature · 1 line
2.17.1
PATCH 9/21 net/ixgbe/base: remove whitespace in function comments
In reply to Guinan SunRemove unnecessary extra whitespace on all function comments, replacing ' * ' with ' * '.
This was done automatically via sed using the following transformation:
sed 's/^ \* / * /'
--- drivers/net/ixgbe/base/ixgbe_82598.c | 238 +++--- drivers/net/ixgbe/base/ixgbe_82599.c | 384 +++++----- drivers/net/ixgbe/base/ixgbe_api.c | 874 ++++++++++----------- drivers/net/ixgbe/base/ixgbe_common.c | 1024 ++++++++++++------------- drivers/net/ixgbe/base/ixgbe_dcb.c | 6 +- drivers/net/ixgbe/base/ixgbe_hv_vf.c | 20 +- drivers/net/ixgbe/base/ixgbe_mbx.c | 258 +++---- drivers/net/ixgbe/base/ixgbe_phy.c | 394 +++++----- drivers/net/ixgbe/base/ixgbe_vf.c | 166 ++-- drivers/net/ixgbe/base/ixgbe_x540.c | 188 ++--- drivers/net/ixgbe/base/ixgbe_x550.c | 480 ++++++------ 11 files changed, 2016 insertions(+), 2016 deletions(-)
drivers/net/ixgbe/base/ixgbe_82598.c +119 -119
@@ -38,14 +38,14 @@ STATIC void ixgbe_set_rxpba_82598(struct ixgbe_hw *hw, int num_pb, STATIC s32 ixgbe_read_i2c_sff8472_82598(struct ixgbe_hw *hw, u8 byte_offset,u8 *sff8472_data);/** -* ixgbe_set_pcie_completion_timeout - set pci-e completion timeout -* @hw: pointer to the HW structure +* ixgbe_set_pcie_completion_timeout - set pci-e completion timeout +* @hw: pointer to the HW structure * -* The defaults for 82598 should be in the range of 50us to 50ms, -* however the hardware default for these parts is 500us to 1ms which is less -* than the 10ms recommended by the pci-e spec. To address this we need to -* increase the value to either 10ms to 250ms for capability version 1 config, -* or 16ms to 55ms for version 2. +* The defaults for 82598 should be in the range of 50us to 50ms, +* however the hardware default for these parts is 500us to 1ms which is less +* than the 10ms recommended by the pci-e spec. To address this we need to +* increase the value to either 10ms to 250ms for capability version 1 config, +* or 16ms to 55ms for version 2. **/ void ixgbe_set_pcie_completion_timeout (struct ixgbe_hw *hw) {
@@ -80,11 +80,11 @@ void ixgbe_set_pcie_completion_timeout(struct ixgbe_hw *hw) }/** -* ixgbe_init_ops_82598 - Inits func ptrs and MAC type -* @hw: pointer to hardware structure +* ixgbe_init_ops_82598 - Inits func ptrs and MAC type +* @hw: pointer to hardware structure * -* Initialize the function pointers and assign the MAC type for 82598. -* Does not touch the hardware. +* Initialize the function pointers and assign the MAC type for 82598. +* Does not touch the hardware. **/ s32 ixgbe_init_ops_82598 (struct ixgbe_hw *hw) {
@@ -150,12 +150,12 @@ s32 ixgbe_init_ops_82598(struct ixgbe_hw *hw) }/** -* ixgbe_init_phy_ops_82598 - PHY/SFP specific init -* @hw: pointer to hardware structure +* ixgbe_init_phy_ops_82598 - PHY/SFP specific init +* @hw: pointer to hardware structure * -* Initialize any function pointers that were not able to be -* set during init_shared_code because the PHY/SFP type was -* not known. Perform the SFP init if necessary. +* Initialize any function pointers that were not able to be +* set during init_shared_code because the PHY/SFP type was +* not known. Perform the SFP init if necessary. * **/ s32 ixgbe_init_phy_ops_82598 (struct ixgbe_hw *hw)
@@ -214,11 +214,11 @@ s32 ixgbe_init_phy_ops_82598(struct ixgbe_hw *hw) }/** -* ixgbe_start_hw_82598 - Prepare hardware for Tx/Rx -* @hw: pointer to hardware structure +* ixgbe_start_hw_82598 - Prepare hardware for Tx/Rx +* @hw: pointer to hardware structure * -* Starts the hardware using the generic start_hw function. -* Disables relaxed ordering Then set pcie completion timeout +* Starts the hardware using the generic start_hw function. +* Disables relaxed ordering Then set pcie completion timeout * **/ s32 ixgbe_start_hw_82598 (struct ixgbe_hw *hw)
@@ -256,12 +256,12 @@ s32 ixgbe_start_hw_82598(struct ixgbe_hw *hw) }/** -* ixgbe_get_link_capabilities_82598 - Determines link capabilities -* @hw: pointer to hardware structure -* @speed: pointer to link speed -* @autoneg: boolean auto-negotiation value +* ixgbe_get_link_capabilities_82598 - Determines link capabilities +* @hw: pointer to hardware structure +* @speed: pointer to link speed +* @autoneg: boolean auto-negotiation value * -* Determines the link capabilities by reading the AUTOC register. +* Determines the link capabilities by reading the AUTOC register. **/ STATIC s32 ixgbe_get_link_capabilities_82598(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
@@ -317,10 +317,10 @@ STATIC s32 ixgbe_get_link_capabilities_82598(struct ixgbe_hw *hw, }/** -* ixgbe_get_media_type_82598 - Determines media type -* @hw: pointer to hardware structure +* ixgbe_get_media_type_82598 - Determines media type +* @hw: pointer to hardware structure * -* Returns the media type (fiber, copper, backplane) +* Returns the media type (fiber, copper, backplane) **/ STATIC enum ixgbe_media_type ixgbe_get_media_type_82598(struct ixgbe_hw *hw) {
@@ -370,10 +370,10 @@ STATIC enum ixgbe_media_type ixgbe_get_media_type_82598(struct ixgbe_hw *hw) }/** -* ixgbe_fc_enable_82598 - Enable flow control -* @hw: pointer to hardware structure +* ixgbe_fc_enable_82598 - Enable flow control +* @hw: pointer to hardware structure * -* Enable flow control according to the current settings. +* Enable flow control according to the current settings. **/ s32 ixgbe_fc_enable_82598 (struct ixgbe_hw *hw) {
@@ -517,12 +517,12 @@ s32 ixgbe_fc_enable_82598(struct ixgbe_hw *hw) }/** -* ixgbe_start_mac_link_82598 - Configures MAC link settings -* @hw: pointer to hardware structure -* @autoneg_wait_to_complete: true when waiting for completion is needed +* ixgbe_start_mac_link_82598 - Configures MAC link settings +* @hw: pointer to hardware structure +* @autoneg_wait_to_complete: true when waiting for completion is needed * -* Configures link settings based on values in the ixgbe_hw struct. -* Restarts the link. Performs autonegotiation if needed. +* Configures link settings based on values in the ixgbe_hw struct. +* Restarts the link. Performs autonegotiation if needed. **/ STATIC s32 ixgbe_start_mac_link_82598(struct ixgbe_hw *hw,bool autoneg_wait_to_complete)
@@ -566,11 +566,11 @@ STATIC s32 ixgbe_start_mac_link_82598(struct ixgbe_hw *hw, }/** -* ixgbe_validate_link_ready - Function looks for phy link -* @hw: pointer to hardware structure +* ixgbe_validate_link_ready - Function looks for phy link +* @hw: pointer to hardware structure * -* Function indicates success when phy link is available. If phy is not ready -* within 5 seconds of MAC indicating link, the function returns error. +* Function indicates success when phy link is available. If phy is not ready +* within 5 seconds of MAC indicating link, the function returns error. **/ STATIC s32 ixgbe_validate_link_ready(struct ixgbe_hw *hw) {
@@ -601,13 +601,13 @@ STATIC s32 ixgbe_validate_link_ready(struct ixgbe_hw *hw) }/** -* ixgbe_check_mac_link_82598 - Get link/speed status -* @hw: pointer to hardware structure -* @speed: pointer to link speed -* @link_up: true is link is up, false otherwise -* @link_up_wait_to_complete: bool used to wait for link up or not +* ixgbe_check_mac_link_82598 - Get link/speed status +* @hw: pointer to hardware structure +* @speed: pointer to link speed +* @link_up: true is link is up, false otherwise +* @link_up_wait_to_complete: bool used to wait for link up or not * -* Reads the links register to determine if link is up and the current speed +* Reads the links register to determine if link is up and the current speed **/ STATIC s32 ixgbe_check_mac_link_82598(struct ixgbe_hw *hw, ixgbe_link_speed *speed, bool *link_up,
@@ -691,12 +691,12 @@ STATIC s32 ixgbe_check_mac_link_82598(struct ixgbe_hw *hw, }/** -* ixgbe_setup_mac_link_82598 - Set MAC link speed -* @hw: pointer to hardware structure -* @speed: new link speed -* @autoneg_wait_to_complete: true when waiting for completion is needed +* ixgbe_setup_mac_link_82598 - Set MAC link speed +* @hw: pointer to hardware structure +* @speed: new link speed +* @autoneg_wait_to_complete: true when waiting for completion is needed * -* Set the link speed in the AUTOC register and restarts link. +* Set the link speed in the AUTOC register and restarts link. **/ STATIC s32 ixgbe_setup_mac_link_82598(struct ixgbe_hw *hw, ixgbe_link_speed speed,
@@ -745,12 +745,12 @@ STATIC s32 ixgbe_setup_mac_link_82598(struct ixgbe_hw *hw,/** -* ixgbe_setup_copper_link_82598 - Set the PHY autoneg advertised field -* @hw: pointer to hardware structure -* @speed: new link speed -* @autoneg_wait_to_complete: true if waiting is needed to complete +* ixgbe_setup_copper_link_82598 - Set the PHY autoneg advertised field +* @hw: pointer to hardware structure +* @speed: new link speed +* @autoneg_wait_to_complete: true if waiting is needed to complete * -* Sets the link speed in the AUTOC register in the MAC and restarts link. +* Sets the link speed in the AUTOC register in the MAC and restarts link. **/ STATIC s32 ixgbe_setup_copper_link_82598(struct ixgbe_hw *hw, ixgbe_link_speed speed,
@@ -770,12 +770,12 @@ STATIC s32 ixgbe_setup_copper_link_82598(struct ixgbe_hw *hw, }/** -* ixgbe_reset_hw_82598 - Performs hardware reset -* @hw: pointer to hardware structure +* ixgbe_reset_hw_82598 - Performs hardware reset +* @hw: pointer to hardware structure * -* Resets the hardware by resetting the transmit and receive units, masks and -* clears all interrupts, performing a PHY reset, and performing a link (MAC) -* reset. +* Resets the hardware by resetting the transmit and receive units, masks and +* clears all interrupts, performing a PHY reset, and performing a link (MAC) +* reset. **/ STATIC s32 ixgbe_reset_hw_82598(struct ixgbe_hw *hw) {
@@ -908,10 +908,10 @@ STATIC s32 ixgbe_reset_hw_82598(struct ixgbe_hw *hw) }/** -* ixgbe_set_vmdq_82598 - Associate a VMDq set index with a rx address -* @hw: pointer to hardware struct -* @rar: receive address register index to associate with a VMDq index -* @vmdq: VMDq set index +* ixgbe_set_vmdq_82598 - Associate a VMDq set index with a rx address +* @hw: pointer to hardware struct +* @rar: receive address register index to associate with a VMDq index +* @vmdq: VMDq set index **/ s32 ixgbe_set_vmdq_82598 (struct ixgbe_hw *hw,u32 rar,u32 vmdq) {
@@ -934,10 +934,10 @@ s32 ixgbe_set_vmdq_82598(struct ixgbe_hw *hw, u32 rar, u32 vmdq) }/** -* ixgbe_clear_vmdq_82598 - Disassociate a VMDq set index from an rx address -* @hw: pointer to hardware struct -* @rar: receive address register index to associate with a VMDq index -* @vmdq: VMDq clear index (not used in 82598, but elsewhere) +* ixgbe_clear_vmdq_82598 - Disassociate a VMDq set index from an rx address +* @hw: pointer to hardware struct +* @rar: receive address register index to associate with a VMDq index +* @vmdq: VMDq clear index (not used in 82598, but elsewhere) **/ STATIC s32 ixgbe_clear_vmdq_82598(struct ixgbe_hw *hw, u32 rar, u32 vmdq) {
@@ -962,14 +962,14 @@ STATIC s32 ixgbe_clear_vmdq_82598(struct ixgbe_hw *hw, u32 rar, u32 vmdq) }/** -* ixgbe_set_vfta_82598 - Set VLAN filter table -* @hw: pointer to hardware structure -* @vlan: VLAN id to write to VLAN filter -* @vind: VMDq output index that maps queue to VLAN id in VFTA -* @vlan_on: boolean flag to turn on/off VLAN in VFTA -* @vlvf_bypass: boolean flag - unused +* ixgbe_set_vfta_82598 - Set VLAN filter table +* @hw: pointer to hardware structure +* @vlan: VLAN id to write to VLAN filter +* @vind: VMDq output index that maps queue to VLAN id in VFTA +* @vlan_on: boolean flag to turn on/off VLAN in VFTA +* @vlvf_bypass: boolean flag - unused * -* Turn on/off specified VLAN in the VLAN filter table. +* Turn on/off specified VLAN in the VLAN filter table. **/ s32 ixgbe_set_vfta_82598 (struct ixgbe_hw *hw,u32 vlan,u32 vind,bool vlan_on,bool vlvf_bypass)
@@ -1015,10 +1015,10 @@ s32 ixgbe_set_vfta_82598(struct ixgbe_hw *hw, u32 vlan, u32 vind, }/** -* ixgbe_clear_vfta_82598 - Clear VLAN filter table -* @hw: pointer to hardware structure +* ixgbe_clear_vfta_82598 - Clear VLAN filter table +* @hw: pointer to hardware structure * -* Clears the VLAN filer table, and the VMDq index associated with the filter +* Clears the VLAN filer table, and the VMDq index associated with the filter **/ STATIC s32 ixgbe_clear_vfta_82598(struct ixgbe_hw *hw) {
@@ -1039,12 +1039,12 @@ STATIC s32 ixgbe_clear_vfta_82598(struct ixgbe_hw *hw) }/** -* ixgbe_read_analog_reg8_82598 - Reads 8 bit Atlas analog register -* @hw: pointer to hardware structure -* @reg: analog register to read -* @val: read value +* ixgbe_read_analog_reg8_82598 - Reads 8 bit Atlas analog register +* @hw: pointer to hardware structure +* @reg: analog register to read +* @val: read value * -* Performs read operation to Atlas analog register specified. +* Performs read operation to Atlas analog register specified. **/ s32 ixgbe_read_analog_reg8_82598 (struct ixgbe_hw *hw,u32 reg,u8 *val) {
@@ -1063,12 +1063,12 @@ s32 ixgbe_read_analog_reg8_82598(struct ixgbe_hw *hw, u32 reg, u8 *val) }/** -* ixgbe_write_analog_reg8_82598 - Writes 8 bit Atlas analog register -* @hw: pointer to hardware structure -* @reg: atlas register to write -* @val: value to write +* ixgbe_write_analog_reg8_82598 - Writes 8 bit Atlas analog register +* @hw: pointer to hardware structure +* @reg: atlas register to write +* @val: value to write * -* Performs write operation to Atlas analog register specified. +* Performs write operation to Atlas analog register specified. **/ s32 ixgbe_write_analog_reg8_82598 (struct ixgbe_hw *hw,u32 reg,u8 val) {
@@ -1085,13 +1085,13 @@ s32 ixgbe_write_analog_reg8_82598(struct ixgbe_hw *hw, u32 reg, u8 val) }/** -* ixgbe_read_i2c_phy_82598 - Reads 8 bit word over I2C interface. -* @hw: pointer to hardware structure -* @dev_addr: address to read from -* @byte_offset: byte offset to read from dev_addr -* @eeprom_data: value read +* ixgbe_read_i2c_phy_82598 - Reads 8 bit word over I2C interface. +* @hw: pointer to hardware structure +* @dev_addr: address to read from +* @byte_offset: byte offset to read from dev_addr +* @eeprom_data: value read * -* Performs 8 byte read operation to SFP module's EEPROM over I2C interface. +* Performs 8 byte read operation to SFP module's EEPROM over I2C interface. **/ STATIC s32 ixgbe_read_i2c_phy_82598(struct ixgbe_hw *hw, u8 dev_addr,u8 byte_offset,u8 *eeprom_data)
@@ -1159,12 +1159,12 @@ STATIC s32 ixgbe_read_i2c_phy_82598(struct ixgbe_hw *hw, u8 dev_addr, }/** -* ixgbe_read_i2c_eeprom_82598 - Reads 8 bit word over I2C interface. -* @hw: pointer to hardware structure -* @byte_offset: EEPROM byte offset to read -* @eeprom_data: value read +* ixgbe_read_i2c_eeprom_82598 - Reads 8 bit word over I2C interface. +* @hw: pointer to hardware structure +* @byte_offset: EEPROM byte offset to read +* @eeprom_data: value read * -* Performs 8 byte read operation to SFP module's EEPROM over I2C interface. +* Performs 8 byte read operation to SFP module's EEPROM over I2C interface. **/ s32 ixgbe_read_i2c_eeprom_82598 (struct ixgbe_hw *hw,u8 byte_offset,u8 *eeprom_data)
@@ -1174,12 +1174,12 @@ s32 ixgbe_read_i2c_eeprom_82598(struct ixgbe_hw *hw, u8 byte_offset, }/** -* ixgbe_read_i2c_sff8472_82598 - Reads 8 bit word over I2C interface. -* @hw: pointer to hardware structure -* @byte_offset: byte offset at address 0xA2 -* @sff8472_data: value read +* ixgbe_read_i2c_sff8472_82598 - Reads 8 bit word over I2C interface. +* @hw: pointer to hardware structure +* @byte_offset: byte offset at address 0xA2 +* @sff8472_data: value read * -* Performs 8 byte read operation to SFP module's SFF-8472 data over I2C +* Performs 8 byte read operation to SFP module's SFF-8472 data over I2C **/ STATIC s32 ixgbe_read_i2c_sff8472_82598(struct ixgbe_hw *hw, u8 byte_offset,u8 *sff8472_data)
@@ -1189,10 +1189,10 @@ STATIC s32 ixgbe_read_i2c_sff8472_82598(struct ixgbe_hw *hw, u8 byte_offset, }/** -* ixgbe_get_supported_physical_layer_82598 - Returns physical layer type -* @hw: pointer to hardware structure +* ixgbe_get_supported_physical_layer_82598 - Returns physical layer type +* @hw: pointer to hardware structure * -* Determines physical layer capabilities of the current configuration. +* Determines physical layer capabilities of the current configuration. **/ u64 ixgbe_get_supported_physical_layer_82598 (struct ixgbe_hw *hw) {
@@ -1291,12 +1291,12 @@ u64 ixgbe_get_supported_physical_layer_82598(struct ixgbe_hw *hw) }/** -* ixgbe_set_lan_id_multi_port_pcie_82598 - Set LAN id for PCIe multiple -* port devices. -* @hw: pointer to the HW structure +* ixgbe_set_lan_id_multi_port_pcie_82598 - Set LAN id for PCIe multiple +* port devices. +* @hw: pointer to the HW structure * -* Calls common function and corrects issue with some single port devices -* that enable LAN1 but not LAN0. +* Calls common function and corrects issue with some single port devices +* that enable LAN1 but not LAN0. **/ void ixgbe_set_lan_id_multi_port_pcie_82598 (struct ixgbe_hw *hw) {
@@ -1325,8 +1325,8 @@ void ixgbe_set_lan_id_multi_port_pcie_82598(struct ixgbe_hw *hw) }/** -* ixgbe_enable_relaxed_ordering_82598 - enable relaxed ordering -* @hw: pointer to hardware structure +* ixgbe_enable_relaxed_ordering_82598 - enable relaxed ordering +* @hw: pointer to hardware structure * **/ void ixgbe_enable_relaxed_ordering_82598 (struct ixgbe_hw *hw)
@@ -1395,11 +1395,11 @@ STATIC void ixgbe_set_rxpba_82598(struct ixgbe_hw *hw, int num_pb, }/** -* ixgbe_enable_rx_dma_82598 - Enable the Rx DMA unit -* @hw: pointer to hardware structure -* @regval: register value to write to RXCTRL +* ixgbe_enable_rx_dma_82598 - Enable the Rx DMA unit +* @hw: pointer to hardware structure +* @regval: register value to write to RXCTRL * -* Enables the Rx DMA unit +* Enables the Rx DMA unit **/ s32 ixgbe_enable_rx_dma_82598 (struct ixgbe_hw *hw,u32 regval) {
drivers/net/ixgbe/base/ixgbe_82599.c +192 -192
653 lines not on this page · raw message
drivers/net/ixgbe/base/ixgbe_api.c +437 -437
1,534 lines not on this page · raw message
drivers/net/ixgbe/base/ixgbe_common.c +512 -512
396 lines not on this page · raw message
drivers/net/ixgbe/base/ixgbe_mbx.c +129 -129
258 lines not on this page · raw message
drivers/net/ixgbe/base/ixgbe_phy.c +197 -197
394 lines not on this page · raw message
drivers/net/ixgbe/base/ixgbe_vf.c +83 -83
166 lines not on this page · raw message
drivers/net/ixgbe/base/ixgbe_x540.c +94 -94
188 lines not on this page · raw message
drivers/net/ixgbe/base/ixgbe_x550.c +240 -240
480 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.17.1
Part of the diff is not shown here. View the raw message.
PATCH 10/21 net/ixgbe/base: move increments after evaluations
In reply to Guinan SunThe retry variable was being incremented before it was evaluated by the subsequent conditional against the maximum retries to figure out which message to print. So we'll move the increment op to the end.
--- drivers/net/ixgbe/base/ixgbe_phy.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/net/ixgbe/base/ixgbe_phy.c +4 -5
@@ -138,11 +138,11 @@ s32 ixgbe_read_i2c_combined_generic_int(struct ixgbe_hw *hw, u8 addr, u16 reg,ixgbe_i2c_bus_clear (hw);if (lock) hw->mac.ops.release_swfw_sync (hw, swfw_mask); - retry++;if (retry < max_retry)DEBUGOUT ("I2C byte read combined error - Retrying.\n" );else DEBUGOUT ("I2C byte read combined error.\n" ); + retry++; }while (retry < max_retry);return IXGBE_ERR_I2C ;
@@ -203,11 +203,11 @@ s32 ixgbe_write_i2c_combined_generic_int(struct ixgbe_hw *hw, u8 addr, u16 reg,ixgbe_i2c_bus_clear (hw);if (lock) hw->mac.ops.release_swfw_sync (hw, swfw_mask); - retry++;if (retry < max_retry)DEBUGOUT ("I2C byte write combined error - Retrying.\n" );else DEBUGOUT ("I2C byte write combined error.\n" ); + retry++; }while (retry < max_retry);return IXGBE_ERR_I2C ;
@@ -2057,12 +2057,11 @@ STATIC s32 ixgbe_read_i2c_byte_generic_int(struct ixgbe_hw *hw, u8 byte_offset, hw->mac.ops.release_swfw_sync (hw, swfw_mask);msec_delay (100 ); } - retry++;if (retry < max_retry)DEBUGOUT ("I2C byte read error - Retrying.\n" );else DEBUGOUT ("I2C byte read error.\n" ); - + retry++; }while (retry < max_retry);return status;
@@ -2161,11 +2160,11 @@ STATIC s32 ixgbe_write_i2c_byte_generic_int(struct ixgbe_hw *hw, u8 byte_offset, fail:ixgbe_i2c_bus_clear (hw); - retry++;if (retry < max_retry)DEBUGOUT ("I2C byte write error - Retrying.\n" );else DEBUGOUT ("I2C byte write error.\n" ); + retry++; }while (retry < max_retry);if (lock)
Signature · 1 line
2.17.1
Re: [dpdk-dev] [PATCH 10/21] net/ixgbe/base: move increments after evaluations
Quoted 16 lines · Guinan Sun
The retry variable was being incremented before it was evaluated by the subsequent conditional against the maximum retries to figure out which message to print. So we'll move the increment op to the end.
Signed-off-by Jeb Cramer <[email protected]>Signed-off-by Guinan Sun <[email protected]>--- drivers/net/ixgbe/base/ixgbe_phy.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)drivers/net/ixgbe/base/ixgbe_phy.c +0
-0@@ -138,11 +138,11 @@ s32 ixgbe_read_i2c_combined_generic_int(struct ixgbe_hw *hw, u8 addr, u16 reg,ixgbe_i2c_bus_clear (hw);
drivers/net/ixgbe/base/ixgbe_phy.c s32 ixgbe_read_i2c_combined_generic_int(struct ixgbe_hw *hw, u8 addr, u16 reg, · line 147
Quoted 10 lines
drivers/net/ixgbe/base/ixgbe_phy.c +1
-1if (lock) hw->mac.ops.release_swfw_sync (hw, swfw_mask); - retry++;if (retry < max_retry)DEBUGOUT ("I2C byte read combined error - Retrying.\n" );else DEBUGOUT ("I2C byte read combined error.\n" ); + retry++; }while (retry < max_retry);
Isn't this wrong?
With this update "DEBUGOUT("I2C byte read combined error.\n");" log won't be printed at all.
And instead why not keep "Retrying" log in the loop without check and move "error" log out of loop, that looks easier to me...
Re: [dpdk-dev] [PATCH 10/21] net/ixgbe/base: move increments after evaluations
Hi Ferruh
Quoted 33 lines
-----Original Message-----
From: Yigit, Ferruh
Sent: Monday, June 22, 2020 7:59 PM
To: Sun, GuinanX <[email protected]>; [email protected]
Cc: Cramer, Jeb J <[email protected]>
Subject: Re: [dpdk-dev] [PATCH 10/21]net/ixgbe/base: move increments after evaluationsdrivers/net/ixgbe/base/ixgbe_phy.c s32 ixgbe_read_i2c_combined_generic_int(struct
Quoted 16 lines · Guinan Sun
The retry variable was being incremented before it was evaluated by the subsequent conditional against the maximum retries to figure out which message to print. So we'll move the increment op to the end.
Signed-off-by Jeb Cramer <[email protected]>Signed-off-by Guinan Sun <[email protected]>--- drivers/net/ixgbe/base/ixgbe_phy.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)drivers/net/ixgbe/base/ixgbe_phy.c +0
-0@@ -138,11 +138,11 @@ s32 ixgbe_read_i2c_combined_generic_int(struct
ixgbe_hw*hw, u8 addr, u16 reg,drivers/net/ixgbe/base/ixgbe_phy.c s32 ixgbe_read_i2c_combined_generic_int(struct ixgbe_hw *hw, u8 addr, u16 reg,
Quoted 6 lines
drivers/net/ixgbe/base/ixgbe_phy.c +0
-1ixgbe_i2c_bus_clear (hw);if (lock) hw->mac.ops.release_swfw_sync (hw, swfw_mask); - retry++;if (retry < max_retry) DEBUGOUT("I2C byte read combined error -Retrying.\n");
Quoted 11 lines
drivers/net/ixgbe/base/ixgbe_phy.c s32 ixgbe_read_i2c_combined_generic_int(struct ixgbe_hw *hw, u8 addr, u16 reg, · line 147
Quoted 5 lines
drivers/net/ixgbe/base/ixgbe_phy.c +1
-0else DEBUGOUT ("I2C byte read combined error.\n" ); + retry++; }while (retry < max_retry);Isn't this wrong?
With this update "DEBUGOUT("I2C byte read combined error.\n");" log won't be printed at all.
And instead why not keep "Retrying" log in the loop without check and move "error" log out of loop, that looks easier to me...
The next patch will be combined with the current patch later, which will fix the problem.
PATCH 11/21 net/ixgbe/base: modify loop accounting for retries
In reply to Guinan SunThe condition for comparing retry against max_retry was flawed in the do-while loops. For the case where retry was initialized to 0 and max_retry was initialized to 1, we'd break out of the loop at the condition when the intent is to retry the code at least once. Otherwise, the loop is unnecessary. The other places have a larger max_retry so code would get run multiple times (if necessary), but not to the intended extent.
--- drivers/net/ixgbe/base/ixgbe_phy.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/net/ixgbe/base/ixgbe_phy.c +4 -4
@@ -143,7 +143,7 @@ s32 ixgbe_read_i2c_combined_generic_int(struct ixgbe_hw *hw, u8 addr, u16 reg,else DEBUGOUT ("I2C byte read combined error.\n" ); retry++; - }while (retry < max_retry); + }while (retry <= max_retry);return IXGBE_ERR_I2C ; }
@@ -208,7 +208,7 @@ s32 ixgbe_write_i2c_combined_generic_int(struct ixgbe_hw *hw, u8 addr, u16 reg,else DEBUGOUT ("I2C byte write combined error.\n" ); retry++; - }while (retry < max_retry); + }while (retry <= max_retry);return IXGBE_ERR_I2C ; }
@@ -2062,7 +2062,7 @@ STATIC s32 ixgbe_read_i2c_byte_generic_int(struct ixgbe_hw *hw, u8 byte_offset,else DEBUGOUT ("I2C byte read error.\n" ); retry++; - }while (retry < max_retry); + }while (retry <= max_retry);return status; }
@@ -2165,7 +2165,7 @@ STATIC s32 ixgbe_write_i2c_byte_generic_int(struct ixgbe_hw *hw, u8 byte_offset,else DEBUGOUT ("I2C byte write error.\n" ); retry++; - }while (retry < max_retry); + }while (retry <= max_retry);if (lock) hw->mac.ops.release_swfw_sync (hw, swfw_mask);
Signature · 1 line
2.17.1
Re: [dpdk-dev] [PATCH 11/21] net/ixgbe/base: modify loop accounting for retries
Quoted 19 lines · Guinan Sun
The condition for comparing retry against
max_retrywas flawed in the do-while loops. For the case where retry was initialized to 0 andmax_retrywas initialized to 1, we'd break out of the loop at the condition when the intent is to retry the code at least once. Otherwise, the loop is unnecessary. The other places have a largermax_retryso code would get run multiple times (if necessary), but not to the intended extent.Signed-off-by Jeb Cramer <[email protected]>Signed-off-by Guinan Sun <[email protected]>--- drivers/net/ixgbe/base/ixgbe_phy.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/net/ixgbe/base/ixgbe_phy.c +0
-0
drivers/net/ixgbe/base/ixgbe_phy.c s32 ixgbe_read_i2c_combined_generic_int(struct ixgbe_hw *hw, u8 addr, u16 reg, · line 148
Quoted 7 lines
drivers/net/ixgbe/base/ixgbe_phy.c +1
-1@@ -143,7 +143,7 @@ s32 ixgbe_read_i2c_combined_generic_int(struct ixgbe_hw *hw, u8 addr, u16 reg,else DEBUGOUT ("I2C byte read combined error.\n" ); retry++; - }while (retry < max_retry); + }while (retry <= max_retry);return IXGBE_ERR_I2C ;
Ahh, previous patch becomes correct with this change, can you please combine them? No need to break first and fix later.
Re: [dpdk-dev] [PATCH 11/21] net/ixgbe/base: modify loop accounting for retries
Hi Ferruh
Quoted 36 lines
-----Original Message-----
From: Yigit, Ferruh
Sent: Monday, June 22, 2020 8:00 PM
To: Sun, GuinanX <[email protected]>; [email protected]
Cc: Cramer, Jeb J <[email protected]>
Subject: Re: [dpdk-dev] [PATCH 11/21]net/ixgbe/base: modify loop accounting for retriesdrivers/net/ixgbe/base/ixgbe_phy.c s32 ixgbe_read_i2c_combined_generic_int(struct
Quoted 20 lines · Guinan Sun
The condition for comparing retry against
max_retrywas flawed in the do-while loops. For the case where retry was initialized to 0 andmax_retrywas initialized to 1, we'd break out of the loop at the condition when the intent is to retry the code at least once. Otherwise, the loop is unnecessary. The other places have a largermax_retryso code would get run multiple times (if necessary), but not to the intended extent.Signed-off-by Jeb Cramer <[email protected]>Signed-off-by Guinan Sun <[email protected]>--- drivers/net/ixgbe/base/ixgbe_phy.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)drivers/net/ixgbe/base/ixgbe_phy.c +0
-0@@ -143,7 +143,7 @@ s32 ixgbe_read_i2c_combined_generic_int(struct
ixgbe_hw*hw, u8 addr, u16 reg,Quoted 6 lines
drivers/net/ixgbe/base/ixgbe_phy.c +1
-1else DEBUGOUT ("I2C byte read combined error.\n" ); retry++; - }while (retry < max_retry); + }while (retry <= max_retry);
Quoted 4 lines
drivers/net/ixgbe/base/ixgbe_phy.c s32 ixgbe_read_i2c_combined_generic_int(struct · line 148
Quoted 1 line
drivers/net/ixgbe/base/ixgbe_phy.c +0
-0return IXGBE_ERR_I2C ;Ahh, previous patch becomes correct with this change, can you please combine them? No need to break first and fix later.
Patch V2 will fix it.
PATCH 12/21 net/ixgbe/base: create dedicated func to restart auto nego
In reply to Guinan SunCode to restart auto negotiation on PHY is already used in two places and is needed in CORE repo of ixgben. This patch places it in dedicated function for code clarity and makes it available outside the SHARED repo.
Testing Hints (required if no HSD):
Check if link goes up and traffic works.
Change speed on the uplink.
--- drivers/net/ixgbe/base/ixgbe_phy.c | 48 ++++++++++++++---------------- drivers/net/ixgbe/base/ixgbe_phy.h | 1 + 2 files changed, 23 insertions(+), 26 deletions(-)
drivers/net/ixgbe/base/ixgbe_phy.c +22 -26
@@ -542,6 +542,26 @@ s32 ixgbe_reset_phy_generic(struct ixgbe_hw *hw)return status; } +/** +* ixgbe_restart_auto_neg - Restart auto negotiation on the PHY +* @hw: pointer to hardware structure +**/ +void ixgbe_restart_auto_neg (struct ixgbe_hw *hw) +{ +u16 autoneg_reg; + +/* Check if PHY reset is blocked by MNG FW */ +if (ixgbe_check_reset_blocked (hw)) +return ; + +/* Restart PHY auto-negotiation. */ + hw->phy.ops.read_reg (hw,IXGBE_MDIO_AUTO_NEG_CONTROL , +IXGBE_MDIO_AUTO_NEG_DEV_TYPE , &autoneg_reg); + autoneg_reg |=IXGBE_MII_RESTART ; + hw->phy.ops.write_reg (hw,IXGBE_MDIO_AUTO_NEG_CONTROL , +IXGBE_MDIO_AUTO_NEG_DEV_TYPE , autoneg_reg); +} +/** * ixgbe_read_phy_mdi - Reads a value from a specified PHY register without * the SWFW lock
@@ -826,19 +846,7 @@ s32 ixgbe_setup_phy_link_generic(struct ixgbe_hw *hw)IXGBE_MDIO_AUTO_NEG_DEV_TYPE , autoneg_reg); -/* Blocked by MNG FW so don't reset PHY */ -if (ixgbe_check_reset_blocked (hw)) -return status; - -/* Restart PHY auto-negotiation. */ - hw->phy.ops.read_reg (hw,IXGBE_MDIO_AUTO_NEG_CONTROL , -IXGBE_MDIO_AUTO_NEG_DEV_TYPE , &autoneg_reg); - - autoneg_reg |=IXGBE_MII_RESTART ; - - hw->phy.ops.write_reg (hw,IXGBE_MDIO_AUTO_NEG_CONTROL , -IXGBE_MDIO_AUTO_NEG_DEV_TYPE , autoneg_reg); - +ixgbe_restart_auto_neg (hw);return status; }
@@ -1062,19 +1070,7 @@ s32 ixgbe_setup_phy_link_tnx(struct ixgbe_hw *hw) autoneg_reg); } -/* Blocked by MNG FW so don't reset PHY */ -if (ixgbe_check_reset_blocked (hw)) -return status; - -/* Restart PHY auto-negotiation. */ - hw->phy.ops.read_reg (hw,IXGBE_MDIO_AUTO_NEG_CONTROL , -IXGBE_MDIO_AUTO_NEG_DEV_TYPE , &autoneg_reg); - - autoneg_reg |=IXGBE_MII_RESTART ; - - hw->phy.ops.write_reg (hw,IXGBE_MDIO_AUTO_NEG_CONTROL , -IXGBE_MDIO_AUTO_NEG_DEV_TYPE , autoneg_reg); - +ixgbe_restart_auto_neg (hw);return status; }
drivers/net/ixgbe/base/ixgbe_phy.h +1 -0
@@ -133,6 +133,7 @@ enum ixgbe_phy_type ixgbe_get_phy_type_from_id(u32 phy_id);s32 ixgbe_get_phy_id (struct ixgbe_hw *hw);s32 ixgbe_identify_phy_generic (struct ixgbe_hw *hw);s32 ixgbe_reset_phy_generic (struct ixgbe_hw *hw); +void ixgbe_restart_auto_neg (struct ixgbe_hw *hw);s32 ixgbe_read_phy_reg_mdi (struct ixgbe_hw *hw,u32 reg_addr,u32 device_type,u16 *phy_data); s32 ixgbe_write_phy_reg_mdi(struct ixgbe_hw *hw, u32 reg_addr, u32 device_type,
Signature · 1 line
2.17.1
Re: [dpdk-dev] [PATCH 12/21] net/ixgbe/base: create dedicated func to restart auto nego
Quoted 2 lines · Guinan Sun
Code to restart auto negotiation on PHY is already used in two places and is needed in CORE repo of ixgben.
ixgben?
Quoted 4 lines
This patch places it in dedicated
function for code clarity and makes it available outside the SHARED repo.Testing Hints (required if no HSD):
HSD?
Quoted 5 lines
Check if link goes up and traffic works.
Change speed on the uplink.Signed-off-by Jakub Chylkowski <[email protected]>Signed-off-by Guinan Sun <[email protected]>
<...>
PATCH 13/21 net/ixgbe/base: modify Klocwork hits for DDK 7.0
In reply to Guinan SunFix issues found by Klocwork for DDK 7.0
--- drivers/net/ixgbe/base/ixgbe_82599.c | 12 +++++------- drivers/net/ixgbe/base/ixgbe_common.c | 6 ++---- drivers/net/ixgbe/base/ixgbe_common.h | 2 +- drivers/net/ixgbe/base/ixgbe_dcb_82598.c | 2 +- drivers/net/ixgbe/base/ixgbe_dcb_82599.c | 2 +- drivers/net/ixgbe/base/ixgbe_phy.c | 25 +++++++----------------- drivers/net/ixgbe/base/ixgbe_x540.c | 2 +- drivers/net/ixgbe/base/ixgbe_x550.c | 2 +- 8 files changed, 19 insertions(+), 34 deletions(-)
drivers/net/ixgbe/base/ixgbe_82599.c +5 -7
@@ -1547,7 +1547,7 @@ void ixgbe_fdir_add_signature_filter_82599(struct ixgbe_hw *hw,* is for FDIRCMD. Then do a 64-bit register write from FDIRHASH. */ fdirhashcmd = (u64 )fdircmd <<32 ; - fdirhashcmd |=ixgbe_atr_compute_sig_hash_82599 (input, common); + fdirhashcmd |= (u64 )ixgbe_atr_compute_sig_hash_82599 (input, common);IXGBE_WRITE_REG64 (hw,IXGBE_FDIRHASH , fdirhashcmd);DEBUGOUT2 ("Tx Queue=%x hash=%x\n" , queue, (u32 )fdirhashcmd);
@@ -1636,7 +1636,7 @@ STATIC u32 ixgbe_get_fdirtcpm_82599(union ixgbe_atr_input *input_mask) {u32 mask =IXGBE_NTOHS (input_mask->formatted.dst_port); mask <<=IXGBE_FDIRTCPM_DPORTM_SHIFT ; - mask |=IXGBE_NTOHS (input_mask->formatted.src_port); + mask |= (u32 )IXGBE_NTOHS (input_mask->formatted.src_port); mask = ((mask &0x55555555 ) <<1 ) | ((mask &0xAAAAAAAA ) >>1 ); mask = ((mask &0x33333333 ) <<2 ) | ((mask &0xCCCCCCCC ) >>2 ); mask = ((mask &0x0F0F0F0F ) <<4 ) | ((mask &0xF0F0F0F0 ) >>4 );
@@ -1868,14 +1868,14 @@ s32 ixgbe_fdir_write_perfect_filter_82599(struct ixgbe_hw *hw,/* 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); + fdirport |= (u32 )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); fdirvlan <<=IXGBE_FDIRVLAN_FLEX_SHIFT ; - fdirvlan |=IXGBE_NTOHS (input->formatted.vlan_id); + fdirvlan |= (u32 )IXGBE_NTOHS (input->formatted.vlan_id);IXGBE_WRITE_REG (hw,IXGBE_FDIRVLAN , fdirvlan);if (cloud_mode) {
@@ -2093,9 +2093,7 @@ s32 ixgbe_start_hw_82599(struct ixgbe_hw *hw)if (ret_val !=IXGBE_SUCCESS ) goto out; - ret_val =ixgbe_start_hw_gen2 (hw); -if (ret_val !=IXGBE_SUCCESS ) - goto out; +ixgbe_start_hw_gen2 (hw);/* We need to run link autotry after the driver loads */ hw->mac.autotry_restart = true;
drivers/net/ixgbe/base/ixgbe_common.c +2 -4
@@ -422,7 +422,7 @@ s32 ixgbe_start_hw_generic(struct ixgbe_hw *hw)* 82599 * X540 **/ -s32 ixgbe_start_hw_gen2 (struct ixgbe_hw *hw) +void ixgbe_start_hw_gen2 (struct ixgbe_hw *hw) {u32 i;u32 regval;
@@ -447,8 +447,6 @@ s32 ixgbe_start_hw_gen2(struct ixgbe_hw *hw) IXGBE_DCA_RXCTRL_HEAD_WRO_EN);IXGBE_WRITE_REG (hw,IXGBE_DCA_RXCTRL (i), regval); } - -return IXGBE_SUCCESS ; }/**
@@ -739,7 +737,7 @@ s32 ixgbe_read_pba_num_generic(struct ixgbe_hw *hw, u32 *pba_num)DEBUGOUT ("NVM Read Error\n" );return ret_val; } - *pba_num |= data; + *pba_num |= (u32 )data;return IXGBE_SUCCESS ; }
drivers/net/ixgbe/base/ixgbe_common.h +1 -1
@@ -23,7 +23,7 @@ u16 ixgbe_get_pcie_msix_count_generic(struct ixgbe_hw *hw);s32 ixgbe_init_ops_generic (struct ixgbe_hw *hw);s32 ixgbe_init_hw_generic (struct ixgbe_hw *hw);s32 ixgbe_start_hw_generic (struct ixgbe_hw *hw); -s32 ixgbe_start_hw_gen2 (struct ixgbe_hw *hw); +void ixgbe_start_hw_gen2 (struct ixgbe_hw *hw);s32 ixgbe_clear_hw_cntrs_generic (struct ixgbe_hw *hw);s32 ixgbe_read_pba_num_generic (struct ixgbe_hw *hw,u32 *pba_num); s32 ixgbe_read_pba_string_generic(struct ixgbe_hw *hw, u8 *pba_num,
drivers/net/ixgbe/base/ixgbe_dcb_82598.c +1 -1
@@ -167,7 +167,7 @@ s32 ixgbe_dcb_config_tx_desc_arbiter_82598(struct ixgbe_hw *hw,for (i =0 ; i <IXGBE_DCB_MAX_TRAFFIC_CLASS ; i++) { max_credits = max[i]; reg = max_credits <<IXGBE_TDTQ2TCCR_MCL_SHIFT ; - reg |= refill[i]; + reg |= (u32)(refill[i]); reg |= (u32)(bwg_id[i]) <<IXGBE_TDTQ2TCCR_BWG_SHIFT ;if (tsa[i] == ixgbe_dcb_tsa_group_strict_cee)
drivers/net/ixgbe/base/ixgbe_dcb_82599.c +1 -1
@@ -166,7 +166,7 @@ s32 ixgbe_dcb_config_tx_desc_arbiter_82599(struct ixgbe_hw *hw, u16 *refill,for (i =0 ; i <IXGBE_DCB_MAX_TRAFFIC_CLASS ; i++) { max_credits = max[i]; reg = max_credits <<IXGBE_RTTDT2C_MCL_SHIFT ; - reg |= refill[i]; + reg |= (u32)(refill[i]); reg |= (u32)(bwg_id[i]) <<IXGBE_RTTDT2C_BWG_SHIFT ;if (tsa[i] == ixgbe_dcb_tsa_group_strict_cee)
drivers/net/ixgbe/base/ixgbe_phy.c +7 -18
@@ -8,10 +8,10 @@ STATIC void ixgbe_i2c_start(struct ixgbe_hw *hw); STATIC void ixgbe_i2c_stop(struct ixgbe_hw *hw); -STATIC s32 ixgbe_clock_in_i2c_byte(struct ixgbe_hw *hw, u8 *data); +STATIC void ixgbe_clock_in_i2c_byte(struct ixgbe_hw *hw, u8 *data); STATIC s32 ixgbe_clock_out_i2c_byte(struct ixgbe_hw *hw, u8 data); STATIC s32 ixgbe_get_i2c_ack(struct ixgbe_hw *hw); -STATIC s32 ixgbe_clock_in_i2c_bit(struct ixgbe_hw *hw, bool *data); +STATIC void ixgbe_clock_in_i2c_bit(struct ixgbe_hw *hw, bool *data); STATIC s32 ixgbe_clock_out_i2c_bit(struct ixgbe_hw *hw, bool data); STATIC void ixgbe_raise_i2c_clk(struct ixgbe_hw *hw, u32 *i2cctl); STATIC void ixgbe_lower_i2c_clk(struct ixgbe_hw *hw, u32 *i2cctl);
@@ -46,11 +46,7 @@ STATIC s32 ixgbe_out_i2c_byte_ack(struct ixgbe_hw *hw, u8 byte)*/ STATIC s32 ixgbe_in_i2c_byte_ack(struct ixgbe_hw *hw, u8 *byte) { -s32 status; - - status =ixgbe_clock_in_i2c_byte (hw, byte); -if (status) -return status; +ixgbe_clock_in_i2c_byte (hw, byte);/* ACK */ return ixgbe_clock_out_i2c_bit (hw, false); }
@@ -123,8 +119,7 @@ s32 ixgbe_read_i2c_combined_generic_int(struct ixgbe_hw *hw, u8 addr, u16 reg,if (ixgbe_in_i2c_byte_ack (hw, &low_bits)) goto fail;/* Get csum */ -if (ixgbe_clock_in_i2c_byte (hw, &csum_byte)) - goto fail; +ixgbe_clock_in_i2c_byte (hw, &csum_byte);/* NACK */ if (ixgbe_clock_out_i2c_bit (hw, false)) goto fail;
@@ -2034,9 +2029,7 @@ STATIC s32 ixgbe_read_i2c_byte_generic_int(struct ixgbe_hw *hw, u8 byte_offset,if (status !=IXGBE_SUCCESS ) goto fail; - status =ixgbe_clock_in_i2c_byte (hw, data); -if (status !=IXGBE_SUCCESS ) - goto fail; +ixgbe_clock_in_i2c_byte (hw, data); status =ixgbe_clock_out_i2c_bit (hw, nack);if (status !=IXGBE_SUCCESS )
@@ -2281,7 +2274,7 @@ STATIC void ixgbe_i2c_stop(struct ixgbe_hw *hw)* * Clocks in one byte data via I2C data/clock **/ -STATIC s32 ixgbe_clock_in_i2c_byte(struct ixgbe_hw *hw, u8 *data) +STATIC void ixgbe_clock_in_i2c_byte(struct ixgbe_hw *hw, u8 *data) {s32 i;bool bit =0 ;
@@ -2293,8 +2286,6 @@ STATIC s32 ixgbe_clock_in_i2c_byte(struct ixgbe_hw *hw, u8 *data)ixgbe_clock_in_i2c_bit (hw, &bit); *data |= bit << i; } - -return IXGBE_SUCCESS ; }/**
@@ -2390,7 +2381,7 @@ STATIC s32 ixgbe_get_i2c_ack(struct ixgbe_hw *hw)* * Clocks in one bit via I2C data/clock **/ -STATIC s32 ixgbe_clock_in_i2c_bit(struct ixgbe_hw *hw, bool *data) +STATIC void 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);
@@ -2415,8 +2406,6 @@ STATIC s32 ixgbe_clock_in_i2c_bit(struct ixgbe_hw *hw, bool *data)/* Minimum low period of clock is 4.7 us */ usec_delay (IXGBE_I2C_T_LOW ); - -return IXGBE_SUCCESS ; }/**
drivers/net/ixgbe/base/ixgbe_x540.c +1 -1
@@ -288,7 +288,7 @@ s32 ixgbe_start_hw_X540(struct ixgbe_hw *hw)if (ret_val !=IXGBE_SUCCESS ) goto out; - ret_val =ixgbe_start_hw_gen2 (hw); +ixgbe_start_hw_gen2 (hw); out:return ret_val;
drivers/net/ixgbe/base/ixgbe_x550.c +1 -1
@@ -699,7 +699,7 @@ static s32 ixgbe_setup_fw_link(struct ixgbe_hw *hw)for (i =0 ; i <sizeof (ixgbe_fw_map) /sizeof (ixgbe_fw_map[0 ]); ++i) {if (hw->phy.autoneg_advertised & ixgbe_fw_map[i].phy_speed) - setup[0 ] |= ixgbe_fw_map[i].fw_speed; + setup[0 ] |= (u32)(ixgbe_fw_map[i].fw_speed); } setup[0 ] |=FW_PHY_ACT_SETUP_LINK_HP |FW_PHY_ACT_SETUP_LINK_AN ;
Signature · 1 line
2.17.1
Re: [dpdk-dev] [PATCH 13/21] net/ixgbe/base: modify Klocwork hits for DDK 7.0
Quoted 1 line · Guinan Sun
Fix issues found by Klocwork for DDK 7.0
This doesn't say much on its own, can you please document the actual issues fixed, like "fix unchecked return value" and I think can drop the Klocwork reference, and even not asking what DDK is ...
Feel free to split patch into multiple patches if there are multiple types of issues have been fixed.
Quoted 3 lines
Signed-off-by Jakub Chylkowski <[email protected]>Signed-off-by Guinan Sun <[email protected]>
<...>
Re: [dpdk-dev] [PATCH 13/21] net/ixgbe/base: modify Klocwork hits for DDK 7.0
Hi Ferruh
Quoted 8 lines
-----Original Message-----
From: Yigit, Ferruh
Sent: Monday, June 22, 2020 8:00 PM
To: Sun, GuinanX <[email protected]>; [email protected]
Cc: Chylkowski, JakubX <[email protected]>
Subject: Re: [dpdk-dev] [PATCH 13/21]net/ixgbe/base: modify Klocwork hits for DDK 7.0
Quoted 7 lines
Quoted 1 line · Guinan Sun
Fix issues found by Klocwork for DDK 7.0
This doesn't say much on its own, can you please document the actual issues fixed, like "fix unchecked return value" and I think can drop the Klocwork reference, and even not asking what DDK is ...
We classified the inspection results and divided them into the following two types. The first one is the return value check.
The second is type conversion.
In addition, regarding this part of the content, we think it is to improve the code style. If it is a fix, the modified content is more scattered, and it is not easy to collect the fix version. So, the title is tentatively 'modify coding style'.
Quoted 2 lines
Feel free to split patch into multiple patches if there are multiple types of issues have been fixed.
First of all, I agree with you, but for the improvement of coding style, it is not necessary to split into multiple patches, because this has nothing to do with the function, it is just an improvement point.
If the function is different, it will be split into different patches.
Quoted 6 lines
Quoted 4 lines
Signed-off-by Jakub Chylkowski <[email protected]>Signed-off-by Guinan Sun <[email protected]><...>
PATCH 14/21 net/ixgbe/base: add defines for min rollback revision fields
In reply to Guinan SunAdd defines for Minimum Rollback Revision fields as defined in SGVL.
--- drivers/net/ixgbe/base/ixgbe_type.h | 11 +++++++++++ 1 file changed, 11 insertions(+)
drivers/net/ixgbe/base/ixgbe_type.h +11 -0
@@ -2350,6 +2350,17 @@ enum {#define IXGBE_ALT_MAC_ADDR_PTR 0x37#define IXGBE_FREE_SPACE_PTR 0X3E +#if defined(PREBOOT_SUPPORT ) || defined(QV_RELEASE ) +/* Minimum Rollback Revision offsets */ +#define IXGBE_MINRREV_PHY_ANALOG_LO 0x46 +#define IXGBE_MINRREV_PHY_ANALOG_HI 0x47 +#define IXGBE_MINRREV_OROM_LO 0x48 +#define IXGBE_MINRREV_OROM_HI 0x49 +#define IXGBE_MINRREV_FW_LO 0x4A +#define IXGBE_MINRREV_FW_HI 0x4B +#endif /* PREBOOT_SUPPORT || QV_RELEASE*/ + +/* External Thermal Sensor Config */ #define IXGBE_ETS_CFG 0x26#define IXGBE_ETS_LTHRES_DELTA_MASK 0x07C0
Signature · 1 line
2.17.1
Re: [dpdk-dev] [PATCH 14/21] net/ixgbe/base: add defines for min rollback revision fields
Quoted 1 line · Guinan Sun
Add defines for Minimum Rollback Revision fields as defined in SGVL.
SGVL?
Quoted 3 lines
Signed-off-by Jacek Naczyk <[email protected]>Signed-off-by Guinan Sun <[email protected]>
<...>
Re: [dpdk-dev] [PATCH 14/21] net/ixgbe/base: add defines for min rollback revision fields
Hi Ferruh
Quoted 8 lines
-----Original Message-----
From: Yigit, Ferruh
Sent: Monday, June 22, 2020 8:00 PM
To: Sun, GuinanX <[email protected]>; [email protected]
Cc: Naczyk, Jacek <[email protected]>
Subject: Re: [dpdk-dev] [PATCH 14/21]net/ixgbe/base: add defines for min rollback revision fields
Quoted 4 lines
Quoted 1 line · Guinan Sun
Add defines for Minimum Rollback Revision fields as defined in SGVL.
SGVL?
Sorry, I don't know this, I will investigate later. But this patch was removed in the latest drop package. So patch V2 will remove this code.
Quoted 6 lines
Quoted 4 lines
Signed-off-by Jacek Naczyk <[email protected]>Signed-off-by Guinan Sun <[email protected]><...>
PATCH 15/21 net/ixgbe/base: remove unnecessary log message FC autonego
In reply to Guinan SunThe function ixgbe_device_supports_autoneg_fc is checking whether a particular device and medium configuration is supporting Flow Control Autonegotiation. In case of non-support, the message is always logged which is confusing.
The fix is removing unnecessary log entry.
--- drivers/net/ixgbe/base/ixgbe_common.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/net/ixgbe/base/ixgbe_common.c +0 -4
@@ -187,10 +187,6 @@ bool ixgbe_device_supports_autoneg_fc(struct ixgbe_hw *hw)break ; } -if (!supported) -ERROR_REPORT2 (IXGBE_ERROR_UNSUPPORTED , -"Device %x does not support flow control autoneg" , - hw->device_id);return supported; }
Signature · 1 line
2.17.1
PATCH 16/21 net/ixgbe/base: initialize data field in struct buffer
In reply to Guinan SunWhile sending request using ixgbe_hic_unlocked() the data field in buffer struct is not used. It is set when the struct is overwritten by FW to deliver the response. To not pass random data to FW the whole structure should be zeroed before use.
--- drivers/net/ixgbe/base/ixgbe_x550.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/ixgbe/base/ixgbe_x550.c +2 -0
@@ -3126,6 +3126,7 @@ s32 ixgbe_read_ee_hostif_X550(struct ixgbe_hw *hw, u16 offset, u16 *data)/* one word */ buffer.length =IXGBE_CPU_TO_BE16 (sizeof (u16)); buffer.pad2 =0 ; + buffer.data =0 ; buffer.pad3 =0 ; status = hw->mac.ops.acquire_swfw_sync (hw, mask);
@@ -3186,6 +3187,7 @@ s32 ixgbe_read_ee_hostif_buffer_X550(struct ixgbe_hw *hw, buffer.address =IXGBE_CPU_TO_BE32 ((offset + current_word) *2 ); buffer.length =IXGBE_CPU_TO_BE16 (words_to_read *2 ); buffer.pad2 =0 ; + buffer.data =0 ; buffer.pad3 =0 ; status = ixgbe_hic_unlocked(hw, (u32 *)&buffer, sizeof(buffer),
Signature · 1 line
2.17.1
PATCH 17/21 net/ixgbe/base: improve log about autonego being disabled
In reply to Guinan SunOn ESXi OS, when user disables auto negotiation, the following log
appears: "(unsupported) Flow control autoneg is disabled". It is true that AN is disabled but it is not necessarily true that it is not supported.
--- drivers/net/ixgbe/base/ixgbe_common.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/ixgbe/base/ixgbe_common.c +3 -2
@@ -3077,8 +3077,9 @@ void ixgbe_fc_autoneg(struct ixgbe_hw *hw)* - link is not up. */ if (hw->fc.disable_fc_autoneg) { -ERROR_REPORT1 (IXGBE_ERROR_UNSUPPORTED , -"Flow control autoneg is disabled" ); +/* TODO: This should be just an informative log */ +ERROR_REPORT1 (IXGBE_ERROR_CAUTION , +"Flow control autoneg is disabled" ); goto out; }
Signature · 1 line
2.17.1
Re: [dpdk-dev] [PATCH 17/21] net/ixgbe/base: improve log about autonego being disabled
Quoted 2 lines · Guinan Sun
On ESXi OS, when user disables auto negotiation, the following log
appears: "(unsupported) Flow control autoneg is disabled".
Is ESXi reference valid for the DPDK commit?
Quoted 5 lines
It is true that AN is disabled but it is not necessarily true that it is not supported.
Signed-off-by Jakub Chylkowski <[email protected]>Signed-off-by Guinan Sun <[email protected]>
<...>
Re: [dpdk-dev] [PATCH 17/21] net/ixgbe/base: improve log about autonego being disabled
Hi Ferruh
Quoted 8 lines
-----Original Message-----
From: Yigit, Ferruh
Sent: Monday, June 22, 2020 8:01 PM
To: Sun, GuinanX <[email protected]>; [email protected]
Cc: Chylkowski, JakubX <[email protected]>
Subject: Re: [dpdk-dev] [PATCH 17/21]net/ixgbe/base: improve log about autonego being disabled
Quoted 5 lines
Quoted 2 lines · Guinan Sun
On ESXi OS, when user disables auto negotiation, the following log
appears: "(unsupported) Flow control autoneg is disabled".Is ESXi reference valid for the DPDK commit?
I think this is no problem, because there are a lot of commit information including'ESXi' in dpdk . For example the following version:
{
commit dfedf3e3f9d281fbe493cc98fd9ef82bec42fdec
Author: Viacheslav Ovsiienko <[email protected]>
Date: Tue Jul 30 09:20:24 2019 +0000
net/mlx5: add workaround for VLAN in virtual machine
}{
commit 18c8e84d7726ad16bb81fdb7649e13202997cd41
Author: Gautam Dawar <[email protected]>
Date: Mon Jun 10 08:38:39 2019 +0100
net/sfc/base: support proxy auth operations for SR-IOV
}...So there should be no correction.
Quoted 8 lines
Quoted 6 lines
It is true that AN is disabled but it is not necessarily true that it is not supported.
Signed-off-by Jakub Chylkowski <[email protected]>Signed-off-by Guinan Sun <[email protected]><...>
PATCH 18/21 net/ixgbe/base: ipv6 Mask for purpose FDIR VLAN Port Feature
In reply to Guinan SunAllow Flow Director Filter to set IPv6 rules
without setting IPv6 source/destination address.
--- drivers/net/ixgbe/base/ixgbe_82599.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ixgbe/base/ixgbe_82599.c +1 -0
@@ -1832,6 +1832,7 @@ s32 ixgbe_fdir_set_input_mask_82599(struct ixgbe_hw *hw, ~input_mask->formatted.src_ip[0]);IXGBE_WRITE_REG_BE32 (hw,IXGBE_FDIRDIP4M , ~input_mask->formatted.dst_ip[0 ]); +IXGBE_WRITE_REG_BE32 (hw,IXGBE_FDIRIP6M ,0xFFFFFFFF ); }return IXGBE_SUCCESS ; }
Signature · 1 line
2.17.1
Re: [dpdk-dev] [PATCH 18/21] net/ixgbe/base: ipv6 Mask for purpose FDIR VLAN Port Feature
Quoted 2 lines · Guinan Sun
Allow Flow Director Filter to set IPv6 rules
without setting IPv6 source/destination address.
Patch title is hard to understand, commit log is more clear, but title talks about the VLAN, but description looks different. Can you please clarify?
Quoted 20 lines
Signed-off-by Piotr Skajewski <[email protected]>Signed-off-by Guinan Sun <[email protected]>--- drivers/net/ixgbe/base/ixgbe_82599.c | 1 + 1 file changed, 1 insertion(+)drivers/net/ixgbe/base/ixgbe_82599.c +1
-0@@ -1832,6 +1832,7 @@ s32 ixgbe_fdir_set_input_mask_82599(struct ixgbe_hw *hw, ~input_mask->formatted.src_ip[0]);IXGBE_WRITE_REG_BE32 (hw,IXGBE_FDIRDIP4M , ~input_mask->formatted.dst_ip[0 ]); +IXGBE_WRITE_REG_BE32 (hw,IXGBE_FDIRIP6M ,0xFFFFFFFF ); }return IXGBE_SUCCESS ; }
Re: [dpdk-dev] [PATCH 18/21] net/ixgbe/base: ipv6 Mask for purpose FDIR VLAN Port Feature
Hi Ferruh
Quoted 8 lines
-----Original Message-----
From: Yigit, Ferruh
Sent: Monday, June 22, 2020 8:01 PM
To: Sun, GuinanX <[email protected]>; [email protected]
Cc: Skajewski, PiotrX <[email protected]>
Subject: Re: [dpdk-dev] [PATCH 18/21]net/ixgbe/base: ipv6 Mask for purpose FDIR VLAN Port Feature
Quoted 7 lines
Quoted 2 lines · Guinan Sun
Allow Flow Director Filter to set IPv6 rules without setting IPv6 source/destination address.
Patch title is hard to understand, commit log is more clear, but title talks about the VLAN, but description looks different. Can you please clarify?
Patch v2 will modify the patch title.
Quoted 22 lines
drivers/net/ixgbe/base/ixgbe_82599.c s32 ixgbe_fdir_set_input_mask_82599(struct
Quoted 13 lines
Signed-off-by Piotr Skajewski <[email protected]>Signed-off-by Guinan Sun <[email protected]>--- drivers/net/ixgbe/base/ixgbe_82599.c | 1 + 1 file changed, 1 insertion(+)drivers/net/ixgbe/base/ixgbe_82599.c +0
-0@@ -1832,6 +1832,7 @@ s32 ixgbe_fdir_set_input_mask_82599(struct
ixgbe_hw*hw,Quoted 8 lines
drivers/net/ixgbe/base/ixgbe_82599.c +1
-0~input_mask->formatted.src_ip[0]);IXGBE_WRITE_REG_BE32 (hw,IXGBE_FDIRDIP4M , ~input_mask->formatted.dst_ip[0 ]); +IXGBE_WRITE_REG_BE32 (hw,IXGBE_FDIRIP6M ,0xFFFFFFFF ); }return IXGBE_SUCCESS ; }
PATCH 19/21 net/ixgbe/base: remove default advertising for 2.5G and 5G
In reply to Guinan SunWe are seeing interoperability issues with switches when 2.5G and 5G are advertised by default, so default to off.
LINUX ONLY:
We will need to add a note to our README on how to enable 2.5G and 5G. The netwmask is a combination of:
0x020 1000baseT Full0x800000000000 2500baseT Full0x1000000000000 5000baseT Full0x1000 10000baseT Full
Combine the two into the advertisement flags:
ethtool -s advertise ethX <mask value>
--- drivers/net/ixgbe/base/ixgbe_phy.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/net/ixgbe/base/ixgbe_phy.c +0 -4
@@ -915,10 +915,6 @@ static s32 ixgbe_get_copper_speeds_supported(struct ixgbe_hw *hw) hw->phy.speeds_supported |=IXGBE_LINK_SPEED_100_FULL ;switch (hw->mac.type) { -case ixgbe_mac_X550: - hw->phy.speeds_supported |=IXGBE_LINK_SPEED_2_5GB_FULL ; - hw->phy.speeds_supported |=IXGBE_LINK_SPEED_5GB_FULL ; -break ;case ixgbe_mac_X550EM_x:case ixgbe_mac_X550EM_a: hw->phy.speeds_supported &= ~IXGBE_LINK_SPEED_100_FULL ;
Signature · 1 line
2.17.1
Re: [dpdk-dev] [PATCH 19/21] net/ixgbe/base: remove default advertising for 2.5G and 5G
Quoted 2 lines · Guinan Sun
We are seeing interoperability issues with switches when 2.5G and 5G are advertised by default, so default to off.
This is only for 'X550' device, right? If so can you please clarify this in the patch title and the commit log?
Quoted 6 lines
LINUX ONLY:
We will need to add a note to our README on how to enable 2.5G and 5G. The netwmask is a combination of:
Quoted 7 lines
0x0201000baseT Full0x8000000000002500baseT Full0x10000000000005000baseT Full0x100010000baseT FullCombine the two into the advertisement flags:
ethtool -s advertise ethX <mask value>
I can see this is Linux only so we can drop from commit log, but do we need to document something similar for DPDK?
Quoted 23 lines
Signed-off-by Todd Fujinaka <[email protected]>Signed-off-by Guinan Sun <[email protected]>--- drivers/net/ixgbe/base/ixgbe_phy.c | 4 ---- 1 file changed, 4 deletions(-)drivers/net/ixgbe/base/ixgbe_phy.c +0
-4@@ -915,10 +915,6 @@ static s32 ixgbe_get_copper_speeds_supported(struct ixgbe_hw *hw) hw->phy.speeds_supported |=IXGBE_LINK_SPEED_100_FULL ;switch (hw->mac.type) { -case ixgbe_mac_X550: - hw->phy.speeds_supported |=IXGBE_LINK_SPEED_2_5GB_FULL ; - hw->phy.speeds_supported |=IXGBE_LINK_SPEED_5GB_FULL ; -break ;case ixgbe_mac_X550EM_x:case ixgbe_mac_X550EM_a: hw->phy.speeds_supported &= ~IXGBE_LINK_SPEED_100_FULL ;
Re: [dpdk-dev] [PATCH 19/21] net/ixgbe/base: remove default advertising for 2.5G and 5G
Hi Ferruh
Quoted 26 lines
-----Original Message-----
From: Yigit, Ferruh
Sent: Monday, June 22, 2020 8:01 PM
To: Sun, GuinanX <[email protected]>; [email protected]
Cc: Fujinaka, Todd <[email protected]>
Subject: Re: [dpdk-dev] [PATCH 19/21]net/ixgbe/base: remove default advertising for 2.5G and 5GQuoted 2 lines · Guinan Sun
We are seeing interoperability issues with switches when 2.5G and 5G are advertised by default, so default to off.
This is only for 'X550' device, right? If so can you please clarify this in the patch title and the commit log?
Quoted 11 lines
LINUX ONLY:
We will need to add a note to our README on how to enable 2.5G and 5G. The netwmask is a combination of:
0x0201000baseT Full0x8000000000002500baseT Full0x10000000000005000baseT Full0x100010000baseT Full
Quoted 5 lines
Quoted 2 lines
Combine the two into the advertisement flags:
ethtool -s advertise ethX <mask value>I can see this is Linux only so we can drop from commit log, but do we need to document something similar for DPDK?
The content related to linux only will be dropped from the commit log.
In addition, regarding the doc, this part is not the content of the limitation, just off the default value, it is no need to document something in DPDK.
Quoted 28 lines
drivers/net/ixgbe/base/ixgbe_phy.c static s32
Quoted 14 lines
Signed-off-by Todd Fujinaka <[email protected]>Signed-off-by Guinan Sun <[email protected]>--- drivers/net/ixgbe/base/ixgbe_phy.c | 4 ---- 1 file changed, 4 deletions(-)drivers/net/ixgbe/base/ixgbe_phy.c +0
-0@@ -915,10 +915,6 @@ static s32
ixgbe_get_copper_speeds_supported(struct ixgbe_hw *hw)drivers/net/ixgbe/base/ixgbe_phy.c static s32 ixgbe_get_copper_speeds_supported(struct ixgbe_hw *hw)
Quoted 5 lines
drivers/net/ixgbe/base/ixgbe_phy.c +0
-2hw->phy.speeds_supported |=IXGBE_LINK_SPEED_100_FULL ;switch (hw->mac.type) { -case ixgbe_mac_X550: - hw->phy.speeds_supported |=
IXGBE_LINK_SPEED_2_5GB_FULL;drivers/net/ixgbe/base/ixgbe_phy.c static s32 ixgbe_get_copper_speeds_supported(struct ixgbe_hw *hw)
Quoted 5 lines
drivers/net/ixgbe/base/ixgbe_phy.c +0
-2- hw->phy.speeds_supported |=IXGBE_LINK_SPEED_5GB_FULL ; -break ;case ixgbe_mac_X550EM_x:case ixgbe_mac_X550EM_a: hw->phy.speeds_supported &=~IXGBE_LINK_SPEED_100_FULL;
Quoted 1 line
PATCH 20/21 net/ixgbe/base: check Host Interface Return Status
In reply to Guinan SunWriting to read-only fields returns a non-OK Return Status for shadow RAM write command for X550.
This information was previously discarded.
Testing Hints: check if write to a read-only field, e.g. PHY Module Pointer, returns an error.
--- drivers/net/ixgbe/base/ixgbe_x550.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
drivers/net/ixgbe/base/ixgbe_x550.c +12 -1
@@ -3248,7 +3248,18 @@ s32 ixgbe_write_ee_hostif_data_X550(struct ixgbe_hw *hw, u16 offset, status =ixgbe_host_interface_command (hw, (u32 *)&buffer,sizeof (buffer), -IXGBE_HI_COMMAND_TIMEOUT , false); +IXGBE_HI_COMMAND_TIMEOUT , true); +if (status !=IXGBE_SUCCESS ) { +DEBUGOUT2 ("for offset %04x failed with status %d\n" , + offset, status); +return status; + } + +if (buffer.hdr.rsp.buf_lenh_status !=FW_CEM_RESP_STATUS_SUCCESS ) { +DEBUGOUT2 ("for offset %04x host interface return status %02x\n" , + offset, buffer.hdr.rsp.buf_lenh_status); +return IXGBE_ERR_HOST_INTERFACE_COMMAND ; + }return status; }
Signature · 1 line
2.17.1
PATCH 21/21 net/ixgbe/base: update version
In reply to Guinan SunUpdate base code version in readme.
--- drivers/net/ixgbe/base/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ixgbe/base/README +1 -1
@@ -6,7 +6,7 @@ Intel® IXGBE driver =================== This directory contains source code of FreeBSD ixgbe driver of version -cid-ixgbe.2018.08.28.tar.gz released by the team which develop +not-released-cid-ixgbe.2020.06.05.tar.gz 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.17.1
Re: [dpdk-dev] [PATCH 21/21] net/ixgbe/base: update version
Quoted 12 lines · Guinan Sun
Update base code version in readme.
Signed-off-by Guinan Sun <[email protected]>--- drivers/net/ixgbe/base/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/net/ixgbe/base/README +0
-0
drivers/net/ixgbe/base/README Intel® IXGBE driver · line 9
Quoted 5 lines
drivers/net/ixgbe/base/README +1
-1@@ -6,7 +6,7 @@ Intel® IXGBE driver =================== This directory contains source code of FreeBSD ixgbe driver of version -cid-ixgbe.2018.08.28.tar.gz released by the team which develop +not-released-cid-ixgbe.2020.06.05.tar.gz released by the team which develop
What does 'not-released' mean?
Since this is to clarify the version of the base code, why not just 'cid-ixgbe.2020.06.05.tar.gz'?
Quoted 4 lines
drivers/net/ixgbe/base/README +0
-0basic 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
Re: [dpdk-dev] [PATCH 21/21] net/ixgbe/base: update version
Hi Ferruh
Quoted 21 lines
-----Original Message-----
From: Yigit, Ferruh
Sent: Monday, June 22, 2020 8:01 PM
To: Sun, GuinanX <[email protected]>; [email protected]
Subject: Re: [dpdk-dev] [PATCH 21/21]net/ixgbe/base: update versionQuoted 14 lines · Guinan Sun
Update base code version in readme.
Signed-off-by Guinan Sun <[email protected]>--- drivers/net/ixgbe/base/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)(quoted diff) +0
-0b/drivers/net/ixgbe/base/README index
a48b14ed2..c8d6b39ac100644drivers/net/ixgbe/base/README +0
-0@@ -6,7 +6,7 @@ Intel® IXGBE driver ===================
Quoted 7 lines
drivers/net/ixgbe/base/README
Quoted 5 lines
drivers/net/ixgbe/base/README +0
-0This directory contains source code of FreeBSD ixgbe driver ofversion -cid-ixgbe.2018.08.28.tar.gz released by the team which develop
drivers/net/ixgbe/base/README +2
-0+not-released-cid-ixgbe.2020.06.05.tar.gz released by the team which +developWhat does 'not-released' mean?
not-released means they are drops of shared code to the DPDK team.
Quoted 2 lines
Since this is to clarify the version of the base code, why not just 'cid- ixgbe.2020.06.05.tar.gz'?
The drop package is named like this, not our modification.
Quoted 5 lines
Quoted 5 lines
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
Hi, Guinan
Quoted 53 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Guinan Sun
Sent: Friday, June 12, 2020 11:24 AM
To: [email protected]
Cc: Sun, GuinanX <[email protected]>
Subject: [dpdk-dev] [PATCH 00/21] update ixgbe base codeupdate ixgbe base code.
Guinan Sun (21):
net/ixgbe/base: clear VFMBMEM and toggle VF's Tx queuesnet/ixgbe/base: change in the condition for response HInet/ixgbe/base: hange flow for "Apply Update" commandnet/ixgbe/base: x550em 10G NIC driver issuenet/ixgbe/base: added API for NVM updatenet/ixgbe/base: resolve infinite recursion on PCIe link downnet/ixgbe/base: added register definitions for NVM updatenet/ixgbe/base: cleanup spelling mistakes in commentsnet/ixgbe/base: remove whitespace in function commentsnet/ixgbe/base: move increments after evaluationsnet/ixgbe/base: modify loop accounting for retriesnet/ixgbe/base: create dedicated func to restart auto negonet/ixgbe/base: modify Klocwork hits for DDK 7.0net/ixgbe/base: add defines for min rollback revision fieldsnet/ixgbe/base: remove unnecessary log message FC autonegonet/ixgbe/base: initialize data field in struct buffernet/ixgbe/base: improve log about autonego being disablednet/ixgbe/base: ipv6 Mask for purpose FDIR VLAN Port Featurenet/ixgbe/base: remove default advertising for 2.5G and 5Gnet/ixgbe/base: check Host Interface Return Statusnet/ixgbe/base: update versiondrivers/net/ixgbe/base/README | 2 +- drivers/net/ixgbe/base/ixgbe_82598.c | 238 ++--- drivers/net/ixgbe/base/ixgbe_82599.c | 397 ++++---- drivers/net/ixgbe/base/ixgbe_api.c | 892 ++++++++--------- drivers/net/ixgbe/base/ixgbe_api.h | 1 + drivers/net/ixgbe/base/ixgbe_common.c | 1102 ++++++++++++---------- drivers/net/ixgbe/base/ixgbe_common.h | 3 +- drivers/net/ixgbe/base/ixgbe_dcb.c | 6 +- drivers/net/ixgbe/base/ixgbe_dcb_82598.c | 2 +- drivers/net/ixgbe/base/ixgbe_dcb_82599.c | 2 +- drivers/net/ixgbe/base/ixgbe_hv_vf.c | 20 +- drivers/net/ixgbe/base/ixgbe_mbx.c | 285 +++--- drivers/net/ixgbe/base/ixgbe_mbx.h | 1 + drivers/net/ixgbe/base/ixgbe_phy.c | 488 +++++----- drivers/net/ixgbe/base/ixgbe_phy.h | 1 + drivers/net/ixgbe/base/ixgbe_type.h | 67 ++ drivers/net/ixgbe/base/ixgbe_vf.c | 166 ++-- drivers/net/ixgbe/base/ixgbe_x540.c | 190 ++-- drivers/net/ixgbe/base/ixgbe_x550.c | 505 +++++----- 19 files changed, 2282 insertions(+), 2086 deletions(-)
Quoted 2 lines
--
2.17.1
Please give out tested-by for these patch later.
Hi zhaowei
Quoted 62 lines
-----Original Message-----
From: Zhao1, Wei
Sent: Monday, June 15, 2020 1:47 PM
To: Sun, GuinanX <[email protected]>; [email protected]
Cc: Sun, GuinanX <[email protected]>
Subject: RE: [dpdk-dev] [PATCH 00/21] update ixgbe base codeHi, Guinan
Quoted 53 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Guinan Sun
Sent: Friday, June 12, 2020 11:24 AM
To: [email protected]
Cc: Sun, GuinanX <[email protected]>
Subject: [dpdk-dev] [PATCH 00/21] update ixgbe base codeupdate ixgbe base code.
Guinan Sun (21):
net/ixgbe/base: clear VFMBMEM and toggle VF's Tx queuesnet/ixgbe/base: change in the condition for response HInet/ixgbe/base: hange flow for "Apply Update" commandnet/ixgbe/base: x550em 10G NIC driver issuenet/ixgbe/base: added API for NVM updatenet/ixgbe/base: resolve infinite recursion on PCIe link downnet/ixgbe/base: added register definitions for NVM updatenet/ixgbe/base: cleanup spelling mistakes in commentsnet/ixgbe/base: remove whitespace in function commentsnet/ixgbe/base: move increments after evaluationsnet/ixgbe/base: modify loop accounting for retriesnet/ixgbe/base: create dedicated func to restart auto negonet/ixgbe/base: modify Klocwork hits for DDK 7.0net/ixgbe/base: add defines for min rollback revision fieldsnet/ixgbe/base: remove unnecessary log message FC autonegonet/ixgbe/base: initialize data field in struct buffernet/ixgbe/base: improve log about autonego being disablednet/ixgbe/base: ipv6 Mask for purpose FDIR VLAN Port Featurenet/ixgbe/base: remove default advertising for 2.5G and 5Gnet/ixgbe/base: check Host Interface Return Statusnet/ixgbe/base: update versiondrivers/net/ixgbe/base/README | 2 +- drivers/net/ixgbe/base/ixgbe_82598.c | 238 ++--- drivers/net/ixgbe/base/ixgbe_82599.c | 397 ++++---- drivers/net/ixgbe/base/ixgbe_api.c | 892 ++++++++--------- drivers/net/ixgbe/base/ixgbe_api.h | 1 + drivers/net/ixgbe/base/ixgbe_common.c | 1102 ++++++++++++---------- drivers/net/ixgbe/base/ixgbe_common.h | 3 +- drivers/net/ixgbe/base/ixgbe_dcb.c | 6 +- drivers/net/ixgbe/base/ixgbe_dcb_82598.c | 2 +- drivers/net/ixgbe/base/ixgbe_dcb_82599.c | 2 +- drivers/net/ixgbe/base/ixgbe_hv_vf.c | 20 +- drivers/net/ixgbe/base/ixgbe_mbx.c | 285 +++--- drivers/net/ixgbe/base/ixgbe_mbx.h | 1 + drivers/net/ixgbe/base/ixgbe_phy.c | 488 +++++----- drivers/net/ixgbe/base/ixgbe_phy.h | 1 + drivers/net/ixgbe/base/ixgbe_type.h | 67 ++ drivers/net/ixgbe/base/ixgbe_vf.c | 166 ++-- drivers/net/ixgbe/base/ixgbe_x540.c | 190 ++-- drivers/net/ixgbe/base/ixgbe_x550.c | 505 +++++----- 19 files changed, 2282 insertions(+), 2086 deletions(-)
Quoted 5 lines
Quoted 2 lines
--
2.17.1Please give out tested-by for these patch later.
It will be given after the regression test is completed.
Quoted 1 line
Quoted 55 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Guinan Sun
Sent: Friday, June 12, 2020 11:24 AM
To: [email protected]
Cc: Sun, GuinanX <[email protected]>
Subject: [dpdk-dev] [PATCH 00/21] update ixgbe base codeupdate ixgbe base code.
Guinan Sun (21):
net/ixgbe/base: clear VFMBMEM and toggle VF's Tx queuesnet/ixgbe/base: change in the condition for response HInet/ixgbe/base: hange flow for "Apply Update" commandnet/ixgbe/base: x550em 10G NIC driver issuenet/ixgbe/base: added API for NVM updatenet/ixgbe/base: resolve infinite recursion on PCIe link downnet/ixgbe/base: added register definitions for NVM updatenet/ixgbe/base: cleanup spelling mistakes in commentsnet/ixgbe/base: remove whitespace in function commentsnet/ixgbe/base: move increments after evaluationsnet/ixgbe/base: modify loop accounting for retriesnet/ixgbe/base: create dedicated func to restart auto negonet/ixgbe/base: modify Klocwork hits for DDK 7.0net/ixgbe/base: add defines for min rollback revision fieldsnet/ixgbe/base: remove unnecessary log message FC autonegonet/ixgbe/base: initialize data field in struct buffernet/ixgbe/base: improve log about autonego being disablednet/ixgbe/base: ipv6 Mask for purpose FDIR VLAN Port Featurenet/ixgbe/base: remove default advertising for 2.5G and 5Gnet/ixgbe/base: check Host Interface Return Statusnet/ixgbe/base: update versiondrivers/net/ixgbe/base/README | 2 +- drivers/net/ixgbe/base/ixgbe_82598.c | 238 ++--- drivers/net/ixgbe/base/ixgbe_82599.c | 397 ++++---- drivers/net/ixgbe/base/ixgbe_api.c | 892 ++++++++--------- drivers/net/ixgbe/base/ixgbe_api.h | 1 + drivers/net/ixgbe/base/ixgbe_common.c | 1102 ++++++++++++---------- drivers/net/ixgbe/base/ixgbe_common.h | 3 +- drivers/net/ixgbe/base/ixgbe_dcb.c | 6 +- drivers/net/ixgbe/base/ixgbe_dcb_82598.c | 2 +- drivers/net/ixgbe/base/ixgbe_dcb_82599.c | 2 +- drivers/net/ixgbe/base/ixgbe_hv_vf.c | 20 +- drivers/net/ixgbe/base/ixgbe_mbx.c | 285 +++--- drivers/net/ixgbe/base/ixgbe_mbx.h | 1 + drivers/net/ixgbe/base/ixgbe_phy.c | 488 +++++----- drivers/net/ixgbe/base/ixgbe_phy.h | 1 + drivers/net/ixgbe/base/ixgbe_type.h | 67 ++ drivers/net/ixgbe/base/ixgbe_vf.c | 166 ++-- drivers/net/ixgbe/base/ixgbe_x540.c | 190 ++-- drivers/net/ixgbe/base/ixgbe_x550.c | 505 +++++----- 19 files changed, 2282 insertions(+), 2086 deletions(-)--
2.17.1
Zhang, Qi Z
AppliedQuoted 67 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Zhao1, Wei
Sent: Monday, June 22, 2020 10:42 AM
To: Sun, GuinanX <[email protected]>; [email protected]
Cc: Sun, GuinanX <[email protected]>
Subject: Re: [dpdk-dev] [PATCH 00/21] update ixgbe base codeReviewed-by Wei Zhao <[email protected]>Quoted 55 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Guinan Sun
Sent: Friday, June 12, 2020 11:24 AM
To: [email protected]
Cc: Sun, GuinanX <[email protected]>
Subject: [dpdk-dev] [PATCH 00/21] update ixgbe base codeupdate ixgbe base code.
Guinan Sun (21):
net/ixgbe/base: clear VFMBMEM and toggle VF's Tx queuesnet/ixgbe/base: change in the condition for response HInet/ixgbe/base: hange flow for "Apply Update" commandnet/ixgbe/base: x550em 10G NIC driver issuenet/ixgbe/base: added API for NVM updatenet/ixgbe/base: resolve infinite recursion on PCIe link downnet/ixgbe/base: added register definitions for NVM updatenet/ixgbe/base: cleanup spelling mistakes in commentsnet/ixgbe/base: remove whitespace in function commentsnet/ixgbe/base: move increments after evaluationsnet/ixgbe/base: modify loop accounting for retriesnet/ixgbe/base: create dedicated func to restart auto negonet/ixgbe/base: modify Klocwork hits for DDK 7.0net/ixgbe/base: add defines for min rollback revision fieldsnet/ixgbe/base: remove unnecessary log message FC autonegonet/ixgbe/base: initialize data field in struct buffernet/ixgbe/base: improve log about autonego being disablednet/ixgbe/base: ipv6 Mask for purpose FDIR VLAN Port Featurenet/ixgbe/base: remove default advertising for 2.5G and 5Gnet/ixgbe/base: check Host Interface Return Statusnet/ixgbe/base: update versiondrivers/net/ixgbe/base/README | 2 +- drivers/net/ixgbe/base/ixgbe_82598.c | 238 ++--- drivers/net/ixgbe/base/ixgbe_82599.c | 397 ++++---- drivers/net/ixgbe/base/ixgbe_api.c | 892 ++++++++--------- drivers/net/ixgbe/base/ixgbe_api.h | 1 + drivers/net/ixgbe/base/ixgbe_common.c | 1102 ++++++++++++---------- drivers/net/ixgbe/base/ixgbe_common.h | 3 +- drivers/net/ixgbe/base/ixgbe_dcb.c | 6 +- drivers/net/ixgbe/base/ixgbe_dcb_82598.c | 2 +- drivers/net/ixgbe/base/ixgbe_dcb_82599.c | 2 +- drivers/net/ixgbe/base/ixgbe_hv_vf.c | 20 +- drivers/net/ixgbe/base/ixgbe_mbx.c | 285 +++--- drivers/net/ixgbe/base/ixgbe_mbx.h | 1 + drivers/net/ixgbe/base/ixgbe_phy.c | 488 +++++----- drivers/net/ixgbe/base/ixgbe_phy.h | 1 + drivers/net/ixgbe/base/ixgbe_type.h | 67 ++ drivers/net/ixgbe/base/ixgbe_vf.c | 166 ++-- drivers/net/ixgbe/base/ixgbe_x540.c | 190 ++-- drivers/net/ixgbe/base/ixgbe_x550.c | 505 +++++----- 19 files changed, 2282 insertions(+), 2086 deletions(-)--
2.17.1
Applied to dpdk-next-net-intel after remove some unnecessary commit log in patch 6, 12, 19, 20
Thanks
Qi
v2 cover update ixgbe base code
In reply to Guinan Sunsource code of ixgbe driver:
not-released-cid-ixgbe.2020.06.09.tar.gz released by the team which develop basic drivers for any ixgbe NIC.
changelog in ND share repo:
From 66d7da32d8e8 ("ixgbe-shared: Add support to clear VFMBMEM and toggle VF's TX queues") To 7f2d73c9742b ("ixgbe-shared: check Host Interface Return Status for Shadow RAM Write command for X550") v2:
* Remove codes about IXGBE_NVMUPD_SUPPORT.
* Remove codes about PREBOOT_SUPPORT.
* Remove codes about IXGBE_SFP_DETECT_RETRIES.
* Remove codes about IXGBE_EEPROM_GRANT_ATTEMPTS.
* Remove codes about IXGBE_VFWRITE_REG.
* Remove some useless defines.
* Modify commit messages.
* Split some patch to two patches and Merge some patches to one patch.
* Update README.
* Rebase
Guinan Sun (20):
net/ixgbe/base: toggle VF's Tx queues net/ixgbe/base: add support to clear VFMBMEM net/ixgbe/base: fix host interface shadow RAM read net/ixgbe/base: change flow for "Apply Update" command net/ixgbe/base: fix x550em 10G NIC link status report net/ixgbe/base: resolve infinite recursion on PCIe link down net/ixgbe/base: added register definitions for NVM update net/ixgbe/base: cleanup spelling mistakes in comments net/ixgbe/base: remove whitespace in function comments net/ixgbe/base: move increments after evaluations net/ixgbe/base: create dedicated func to restart auto nego net/ixgbe/base: modify coding style net/ixgbe/base: remove unnecessary log message FC autonego net/ixgbe/base: initialize data field in struct buffer net/ixgbe/base: improve log about autonego being disabled net/ixgbe/base: add ipv6 mask for FDIR feature net/ixgbe/base: remove default advertising for x550 2.5G/5G net/ixgbe/base: check host interface return status net/ixgbe/base: cleanup pre-processor tags net/ixgbe/base: update version
drivers/net/ixgbe/base/README | 2 +- drivers/net/ixgbe/base/ixgbe_82598.c | 238 ++--- drivers/net/ixgbe/base/ixgbe_82599.c | 397 ++++---- drivers/net/ixgbe/base/ixgbe_api.c | 879 ++++++++--------- drivers/net/ixgbe/base/ixgbe_api.h | 1 + drivers/net/ixgbe/base/ixgbe_common.c | 1110 +++++++++++----------- drivers/net/ixgbe/base/ixgbe_common.h | 3 +- drivers/net/ixgbe/base/ixgbe_dcb.c | 6 +- drivers/net/ixgbe/base/ixgbe_dcb_82598.c | 2 +- drivers/net/ixgbe/base/ixgbe_dcb_82599.c | 2 +- drivers/net/ixgbe/base/ixgbe_hv_vf.c | 20 +- drivers/net/ixgbe/base/ixgbe_mbx.c | 285 +++--- drivers/net/ixgbe/base/ixgbe_mbx.h | 1 + drivers/net/ixgbe/base/ixgbe_phy.c | 488 +++++----- drivers/net/ixgbe/base/ixgbe_phy.h | 3 +- drivers/net/ixgbe/base/ixgbe_type.h | 26 +- drivers/net/ixgbe/base/ixgbe_vf.c | 170 ++-- drivers/net/ixgbe/base/ixgbe_x540.c | 190 ++-- drivers/net/ixgbe/base/ixgbe_x550.c | 527 +++++----- 19 files changed, 2218 insertions(+), 2132 deletions(-)
Signature · 1 line
2.17.1
PATCH v2 1/20 net/ixgbe/base: toggle VF's Tx queues
Add method to toggle VF's TX queues needed
as workaround for silicon errata.
--- drivers/net/ixgbe/base/ixgbe_api.c | 13 +++++++ drivers/net/ixgbe/base/ixgbe_api.h | 1 + drivers/net/ixgbe/base/ixgbe_common.c | 56 +++++++++++++++++++++++++++ drivers/net/ixgbe/base/ixgbe_common.h | 1 + drivers/net/ixgbe/base/ixgbe_type.h | 1 + 5 files changed, 72 insertions(+)
drivers/net/ixgbe/base/ixgbe_api.c +13 -0
@@ -1101,6 +1101,19 @@ s32 ixgbe_set_vlvf(struct ixgbe_hw *hw, u32 vlan, u32 vind, bool vlan_on, IXGBE_NOT_IMPLEMENTED); } +/** +* ixgbe_toggle_txdctl - Toggle VF's queues +* @hw: pointer to hardware structure +* @vind: VMDq pool index +* +* Enable and disable each queue in VF. +*/ +s32 ixgbe_toggle_txdctl (struct ixgbe_hw *hw,u32 vind) +{ +return ixgbe_call_func (hw, hw->mac.ops.toggle_txdctl, (hw, + vind),IXGBE_NOT_IMPLEMENTED ); +} +/** * ixgbe_fc_enable - Enable flow control * @hw: pointer to hardware structure
drivers/net/ixgbe/base/ixgbe_api.h +1 -0
@@ -101,6 +101,7 @@ s32 ixgbe_set_vfta(struct ixgbe_hw *hw, u32 vlan,s32 ixgbe_set_vlvf (struct ixgbe_hw *hw,u32 vlan,u32 vind,bool vlan_on,u32 *vfta_delta,u32 vfta,bool vlvf_bypass); +s32 ixgbe_toggle_txdctl (struct ixgbe_hw *hw,u32 vind);s32 ixgbe_fc_enable (struct ixgbe_hw *hw);s32 ixgbe_setup_fc (struct ixgbe_hw *hw); s32 ixgbe_set_fw_drv_ver(struct ixgbe_hw *hw, u8 maj, u8 min, u8 build,
drivers/net/ixgbe/base/ixgbe_common.c +56 -0
68 lines not on this page · raw message
drivers/net/ixgbe/base/ixgbe_common.h +1 -0
@@ -111,6 +111,7 @@ s32 ixgbe_set_vlvf_generic(struct ixgbe_hw *hw, u32 vlan, u32 vind, bool vlvf_bypass);s32 ixgbe_clear_vfta_generic (struct ixgbe_hw *hw);s32 ixgbe_find_vlvf_slot (struct ixgbe_hw *hw,u32 vlan,bool vlvf_bypass); +s32 ixgbe_toggle_txdctl_generic (struct ixgbe_hw *hw,u32 vind); s32 ixgbe_check_mac_link_generic(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
drivers/net/ixgbe/base/ixgbe_type.h +1 -0
@@ -3997,6 +3997,7 @@ struct ixgbe_mac_operations {s32 (*init_uta_tables)(struct ixgbe_hw *);void (*set_mac_anti_spoofing)(struct ixgbe_hw *,bool ,int );void (*set_vlan_anti_spoofing)(struct ixgbe_hw *,bool ,int ); +s32 (*toggle_txdctl)(struct ixgbe_hw *hw,u32 vf_index);s32 (*update_xcast_mode)(struct ixgbe_hw *,int );s32 (*set_rlpml)(struct ixgbe_hw *,u16 );
Signature · 1 line
2.17.1
PATCH v2 2/20 net/ixgbe/base: add support to clear VFMBMEM
In reply to Guinan SunAdd method to clear VFMBMEM memory.
Clearing VFMBMEM memory is required from PF after receiving Virtual Function Level Reset request (VFLR).
--- drivers/net/ixgbe/base/ixgbe_mbx.c | 43 +++++++++++++++++++++++++++++ drivers/net/ixgbe/base/ixgbe_mbx.h | 1 + drivers/net/ixgbe/base/ixgbe_type.h | 1 + 3 files changed, 45 insertions(+)
drivers/net/ixgbe/base/ixgbe_mbx.c +43 -0
@@ -117,6 +117,26 @@ s32 ixgbe_check_for_rst(struct ixgbe_hw *hw, u16 mbx_id)return ret_val; } +/** +* ixgbe_clear_mbx - Clear Mailbox Memory +* @hw: pointer to the HW structure +* @vf_number: id of mailbox to write +* +* Set VFMBMEM of given VF to 0x0. +**/ +s32 ixgbe_clear_mbx (struct ixgbe_hw *hw,u16 vf_number) +{ +struct ixgbe_mbx_info *mbx = &hw->mbx; +s32 ret_val =IXGBE_SUCCESS ; + +DEBUGFUNC ("ixgbe_clear_mbx" ); + +if (mbx->ops.clear) + ret_val = mbx->ops.clear (hw, vf_number); + +return ret_val; +} +/** * ixgbe_poll_for_msg - Wait for message notification * @hw: pointer to the HW structure
@@ -486,6 +506,7 @@ void ixgbe_init_mbx_params_vf(struct ixgbe_hw *hw) mbx->ops.check_for_msg = ixgbe_check_for_msg_vf; mbx->ops.check_for_ack = ixgbe_check_for_ack_vf; mbx->ops.check_for_rst = ixgbe_check_for_rst_vf; + mbx->ops.clear =NULL ; mbx->stats.msgs_tx =0 ; mbx->stats.msgs_rx =0 ;
@@ -702,6 +723,27 @@ STATIC s32 ixgbe_read_mbx_pf(struct ixgbe_hw *hw, u32 *msg, u16 size,return ret_val; } +/** +* ixgbe_clear_mbx_pf - Clear Mailbox Memory +* @hw: pointer to the HW structure +* @vf_number: the VF index +* +* Set VFMBMEM of given VF to 0x0. +**/ +STATIC s32 ixgbe_clear_mbx_pf(struct ixgbe_hw *hw, u16 vf_number) +{ +u16 mbx_size = hw->mbx.size; +u16 i; + +if (vf_number >63 ) +return IXGBE_ERR_PARAM ; + +for (i =0 ; i < mbx_size; ++i) +IXGBE_WRITE_REG_ARRAY (hw,IXGBE_PFMBMEM (vf_number), i,0x0 ); + +return IXGBE_SUCCESS ; +} +/** * ixgbe_init_mbx_params_pf - set initial values for pf mailbox * @hw: pointer to the HW structure
@@ -731,6 +773,7 @@ void ixgbe_init_mbx_params_pf(struct ixgbe_hw *hw) mbx->ops.check_for_msg = ixgbe_check_for_msg_pf; mbx->ops.check_for_ack = ixgbe_check_for_ack_pf; mbx->ops.check_for_rst = ixgbe_check_for_rst_pf; + mbx->ops.clear = ixgbe_clear_mbx_pf; mbx->stats.msgs_tx =0 ; mbx->stats.msgs_rx =0 ;
drivers/net/ixgbe/base/ixgbe_mbx.h +1 -0
@@ -129,6 +129,7 @@ s32 ixgbe_write_posted_mbx(struct ixgbe_hw *, u32 *, u16, u16);s32 ixgbe_check_for_msg (struct ixgbe_hw *,u16 );s32 ixgbe_check_for_ack (struct ixgbe_hw *,u16 );s32 ixgbe_check_for_rst (struct ixgbe_hw *,u16 ); +s32 ixgbe_clear_mbx (struct ixgbe_hw *hw,u16 vf_number);void ixgbe_init_mbx_ops_generic (struct ixgbe_hw *hw);void ixgbe_init_mbx_params_vf (struct ixgbe_hw *);void ixgbe_init_mbx_params_pf (struct ixgbe_hw *);
drivers/net/ixgbe/base/ixgbe_type.h +1 -0
@@ -4156,6 +4156,7 @@ struct ixgbe_mbx_operations {s32 (*check_for_msg)(struct ixgbe_hw *,u16 );s32 (*check_for_ack)(struct ixgbe_hw *,u16 );s32 (*check_for_rst)(struct ixgbe_hw *,u16 ); +s32 (*clear)(struct ixgbe_hw *hw,u16 vf_number); };struct ixgbe_mbx_stats {
Signature · 1 line
2.17.1
PATCH v2 3/20 net/ixgbe/base: fix host interface shadow RAM read
In reply to Guinan SunHost interface Shadow RAM Read (0x31) command response buffer length should be stored in two bytes, instead of one byte. This patch fixes it.
--- drivers/net/ixgbe/base/ixgbe_common.c | 2 +- drivers/net/ixgbe/base/ixgbe_type.h | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-)
drivers/net/ixgbe/base/ixgbe_common.c +1 -1
@@ -4656,7 +4656,7 @@ s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u32 *buffer,* Read Flash command requires reading buffer length from * two byes instead of one byte */ -if (resp->cmd ==0x30 ) { +if (resp->cmd ==0x30 || resp->cmd ==0x31 ) {for (; bi < dword_len +2 ; bi++) { buffer[bi] =IXGBE_READ_REG_ARRAY (hw,IXGBE_FLEX_MNG , bi);
drivers/net/ixgbe/base/ixgbe_type.h +12 -0
@@ -4366,4 +4366,16 @@ struct ixgbe_hw {#define IXGBE_NW_MNG_IF_SEL_MDIO_PHY_ADD \ (0x1F << IXGBE_NW_MNG_IF_SEL_MDIO_PHY_ADD_SHIFT) +/* Code Command (Flash I/F Interface) */ +#define IXGBE_HOST_INTERFACE_FLASH_READ_CMD 0x30 +#define IXGBE_HOST_INTERFACE_SHADOW_RAM_READ_CMD 0x31 +#define IXGBE_HOST_INTERFACE_FLASH_WRITE_CMD 0x32 +#define IXGBE_HOST_INTERFACE_SHADOW_RAM_WRITE_CMD 0x33 +#define IXGBE_HOST_INTERFACE_FLASH_MODULE_UPDATE_CMD 0x34 +#define IXGBE_HOST_INTERFACE_FLASH_BLOCK_EREASE_CMD 0x35 +#define IXGBE_HOST_INTERFACE_SHADOW_RAM_DUMP_CMD 0x36 +#define IXGBE_HOST_INTERFACE_FLASH_INFO_CMD 0x37 +#define IXGBE_HOST_INTERFACE_APPLY_UPDATE_CMD 0x38 +#define IXGBE_HOST_INTERFACE_MASK_CMD 0x000000FF +#endif /* _IXGBE_TYPE_H_ */
Signature · 1 line
2.17.1
PATCH v2 4/20 net/ixgbe/base: change flow for "Apply Update" command
In reply to Guinan SunFor the "Apply Update" command the firmware does not given an response. For this command, success should be return.
--- drivers/net/ixgbe/base/ixgbe_common.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/net/ixgbe/base/ixgbe_common.c +8 -1
@@ -4584,11 +4584,18 @@ s32 ixgbe_hic_unlocked(struct ixgbe_hw *hw, u32 *buffer, u32 length,msec_delay (1 ); } +/* For each command except "Apply Update" perform +* status checks in the HICR registry. +*/ +if ((buffer[0 ] &IXGBE_HOST_INTERFACE_MASK_CMD ) == +IXGBE_HOST_INTERFACE_APPLY_UPDATE_CMD ) +return IXGBE_SUCCESS ; +/* Check command completion */ if ((timeout && i == timeout) || !(IXGBE_READ_REG (hw,IXGBE_HICR ) &IXGBE_HICR_SV )) {ERROR_REPORT1 (IXGBE_ERROR_CAUTION , -"Command has failed with no status valid.\n" ); +"Command has failed with no status valid.\n" );return IXGBE_ERR_HOST_INTERFACE_COMMAND ; }
Signature · 1 line
2.17.1
PATCH v2 5/20 net/ixgbe/base: fix x550em 10G NIC link status report
In reply to Guinan SunWith the NVM image for x550em XFI will not report the auto-negotiation feature correctly. The auto-negotiation should be "No" for supports and advertised items. At the same time update speed makes it support 1G and 10G.
--- drivers/net/ixgbe/base/ixgbe_x550.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/net/ixgbe/base/ixgbe_x550.c +7 -1
@@ -1891,7 +1891,14 @@ s32 ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw,else *speed =IXGBE_LINK_SPEED_10GB_FULL ; }else { + *autoneg = true; +switch (hw->phy.type) { +case ixgbe_phy_x550em_xfi: + *speed =IXGBE_LINK_SPEED_1GB_FULL | +IXGBE_LINK_SPEED_10GB_FULL ; + *autoneg = false; +break ;case ixgbe_phy_ext_1g_t:#ifdef PREBOOT_SUPPORT *speed =IXGBE_LINK_SPEED_1GB_FULL ;
@@ -1925,7 +1932,6 @@ s32 ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw,IXGBE_LINK_SPEED_1GB_FULL ;break ; } - *autoneg = true; }return IXGBE_SUCCESS ;
Signature · 1 line
2.17.1
PATCH v2 6/20 net/ixgbe/base: resolve infinite recursion on PCIe link down
In reply to Guinan SunIn some corner cases the functions ixgbe_clear_rar_generic and ixgbe_clear_vmdq_generic may call one another leading to infinite recursion.
When ixgbe_clear_vmdq_generic is called with IXGBE_CLEAR_VMDQ_ALL flag, it's going to clear MPSAR registers, and proceed to call ixgbe_clear_rar_generic, which in turn will clear the RAR registers, and recursively call back ixgbe_clear_vmdq_generic. Normally, the latter would detect that MPSAR registers have already been cleared and terminate the recursion.
However, when PCIe link is down, and before the driver has had the opportunity to shut itself down, all register reads return 0xFFFFFFFF, and all register writes fail silently. In such case, because ixgbe_clear_vmdq_generic blindly assumes that clearing MPSAR registers succeeded, it's going to always call ixgbe_clear_rar_generic, which in turn will always call back ixgbe_clear_vmdq_generic, creating inifinite recursion.
This patch re-reads MPSAR register values after they had been cleared. In case of PCIe link failure, the values read will be non-zero, which will terminate the recursion. On the other hand, under normal circumstances the value read from MPSAR registers is going to be equal to the value previously written, so this patch is expected not to cause any regressions.
--- drivers/net/ixgbe/base/ixgbe_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ixgbe/base/ixgbe_common.c +2 -2
@@ -3778,11 +3778,11 @@ s32 ixgbe_clear_vmdq_generic(struct ixgbe_hw *hw, u32 rar, u32 vmdq)if (vmdq ==IXGBE_CLEAR_VMDQ_ALL ) {if (mpsar_lo) {IXGBE_WRITE_REG (hw,IXGBE_MPSAR_LO (rar),0 ); - mpsar_lo =0 ; + mpsar_lo =IXGBE_READ_REG (hw,IXGBE_MPSAR_LO (rar)); }if (mpsar_hi) {IXGBE_WRITE_REG (hw,IXGBE_MPSAR_HI (rar),0 ); - mpsar_hi =0 ; + mpsar_hi =IXGBE_READ_REG (hw,IXGBE_MPSAR_HI (rar)); } }else if (vmdq <32 ) { mpsar_lo &= ~(1 << vmdq);
Signature · 1 line
2.17.1
PATCH v2 7/20 net/ixgbe/base: added register definitions for NVM update
In reply to Guinan SunAdded additional register for X550 and above device family.
--- drivers/net/ixgbe/base/ixgbe_type.h | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/ixgbe/base/ixgbe_type.h +2 -0
@@ -1082,8 +1082,10 @@ struct ixgbe_dmac_config {#define IXGBE_HSMC0R 0x15F04#define IXGBE_HSMC1R 0x15F08#define IXGBE_SWSR 0x15F10 +#define IXGBE_FWRESETCNT 0x15F40#define IXGBE_HFDR 0x15FE8#define IXGBE_FLEX_MNG 0x15800/* 0x15800 - 0x15EFC */ +#define IXGBE_FLEX_MNG_PTR (_i) (IXGBE_FLEX_MNG + ((_i) * 4))#define IXGBE_HICR_EN 0x01/* Enable bit - RO */ /* Driver sets this bit when done to put command in RAM */
Signature · 1 line
2.17.1
PATCH v2 8/20 net/ixgbe/base: cleanup spelling mistakes in comments
In reply to Guinan SunSeveral functions in the driver code have a weird function comment formatting which uses two spaces instead of only one space for the main function body.
This formatting will be mechanically fixed by sed in a future patch, but doing so leads to some checkpatch.pl warnings on that patch. Cleanup the spelling mistakes that will be detected first. This way, it is easier to verify the mechanical transformation done by sed in the following patch.
--- drivers/net/ixgbe/base/ixgbe_mbx.c | 4 ++-- drivers/net/ixgbe/base/ixgbe_vf.c | 2 +- drivers/net/ixgbe/base/ixgbe_x550.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/net/ixgbe/base/ixgbe_mbx.c +2 -2
@@ -170,11 +170,11 @@ STATIC s32 ixgbe_poll_for_msg(struct ixgbe_hw *hw, u16 mbx_id) }/** -* ixgbe_poll_for_ack - Wait for message acknowledgement +* ixgbe_poll_for_ack - Wait for message acknowledgment * @hw: pointer to the HW structure * @mbx_id: id of mailbox to write * -* returns SUCCESS if it successfully received a message acknowledgement +* returns SUCCESS if it successfully received a message acknowledgment **/ STATIC s32 ixgbe_poll_for_ack(struct ixgbe_hw *hw, u16 mbx_id) {
drivers/net/ixgbe/base/ixgbe_vf.c +1 -1
@@ -142,7 +142,7 @@ s32 ixgbe_init_hw_vf(struct ixgbe_hw *hw)* ixgbe_reset_hw_vf - Performs hardware reset * @hw: pointer to hardware structure * -* Resets the hardware by reseting the transmit and receive units, masks and +* Resets the hardware by resetting the transmit and receive units, masks and * clears all interrupts. **/ s32 ixgbe_reset_hw_vf (struct ixgbe_hw *hw)
drivers/net/ixgbe/base/ixgbe_x550.c +1 -1
@@ -1034,7 +1034,7 @@ void ixgbe_set_source_address_pruning_X550(struct ixgbe_hw *hw, bool enable, }/** -* ixgbe_set_ethertype_anti_spoofing_X550 - Enable/Disable Ethertype anti-spoofing +* ixgbe_set_ethertype_anti_spoofing_X550 - Configure Ethertype anti-spoofing * @hw: pointer to hardware structure * @enable: enable or disable switch for Ethertype anti-spoofing * @vf: Virtual Function pool - VF Pool to set for Ethertype anti-spoofing
Signature · 1 line
2.17.1
PATCH v2 9/20 net/ixgbe/base: remove whitespace in function comments
In reply to Guinan SunRemove unnecessary extra whitespace on all function comments, replacing ' * ' with ' * '.
This was done automatically via sed using the following transformation:
sed 's/^ \* / * /'
--- drivers/net/ixgbe/base/ixgbe_82598.c | 238 +++--- drivers/net/ixgbe/base/ixgbe_82599.c | 384 +++++----- drivers/net/ixgbe/base/ixgbe_api.c | 874 ++++++++++----------- drivers/net/ixgbe/base/ixgbe_common.c | 1024 ++++++++++++------------- drivers/net/ixgbe/base/ixgbe_dcb.c | 6 +- drivers/net/ixgbe/base/ixgbe_hv_vf.c | 20 +- drivers/net/ixgbe/base/ixgbe_mbx.c | 258 +++---- drivers/net/ixgbe/base/ixgbe_phy.c | 394 +++++----- drivers/net/ixgbe/base/ixgbe_vf.c | 166 ++-- drivers/net/ixgbe/base/ixgbe_x540.c | 188 ++--- drivers/net/ixgbe/base/ixgbe_x550.c | 480 ++++++------ 11 files changed, 2016 insertions(+), 2016 deletions(-)
drivers/net/ixgbe/base/ixgbe_82598.c +119 -119
@@ -38,14 +38,14 @@ STATIC void ixgbe_set_rxpba_82598(struct ixgbe_hw *hw, int num_pb, STATIC s32 ixgbe_read_i2c_sff8472_82598(struct ixgbe_hw *hw, u8 byte_offset,u8 *sff8472_data);/** -* ixgbe_set_pcie_completion_timeout - set pci-e completion timeout -* @hw: pointer to the HW structure +* ixgbe_set_pcie_completion_timeout - set pci-e completion timeout +* @hw: pointer to the HW structure * -* The defaults for 82598 should be in the range of 50us to 50ms, -* however the hardware default for these parts is 500us to 1ms which is less -* than the 10ms recommended by the pci-e spec. To address this we need to -* increase the value to either 10ms to 250ms for capability version 1 config, -* or 16ms to 55ms for version 2. +* The defaults for 82598 should be in the range of 50us to 50ms, +* however the hardware default for these parts is 500us to 1ms which is less +* than the 10ms recommended by the pci-e spec. To address this we need to +* increase the value to either 10ms to 250ms for capability version 1 config, +* or 16ms to 55ms for version 2. **/ void ixgbe_set_pcie_completion_timeout (struct ixgbe_hw *hw) {
@@ -80,11 +80,11 @@ void ixgbe_set_pcie_completion_timeout(struct ixgbe_hw *hw) }/** -* ixgbe_init_ops_82598 - Inits func ptrs and MAC type -* @hw: pointer to hardware structure +* ixgbe_init_ops_82598 - Inits func ptrs and MAC type +* @hw: pointer to hardware structure * -* Initialize the function pointers and assign the MAC type for 82598. -* Does not touch the hardware. +* Initialize the function pointers and assign the MAC type for 82598. +* Does not touch the hardware. **/ s32 ixgbe_init_ops_82598 (struct ixgbe_hw *hw) {
@@ -150,12 +150,12 @@ s32 ixgbe_init_ops_82598(struct ixgbe_hw *hw) }/** -* ixgbe_init_phy_ops_82598 - PHY/SFP specific init -* @hw: pointer to hardware structure +* ixgbe_init_phy_ops_82598 - PHY/SFP specific init +* @hw: pointer to hardware structure * -* Initialize any function pointers that were not able to be -* set during init_shared_code because the PHY/SFP type was -* not known. Perform the SFP init if necessary. +* Initialize any function pointers that were not able to be +* set during init_shared_code because the PHY/SFP type was +* not known. Perform the SFP init if necessary. * **/ s32 ixgbe_init_phy_ops_82598 (struct ixgbe_hw *hw)
@@ -214,11 +214,11 @@ s32 ixgbe_init_phy_ops_82598(struct ixgbe_hw *hw) }/** -* ixgbe_start_hw_82598 - Prepare hardware for Tx/Rx -* @hw: pointer to hardware structure +* ixgbe_start_hw_82598 - Prepare hardware for Tx/Rx +* @hw: pointer to hardware structure * -* Starts the hardware using the generic start_hw function. -* Disables relaxed ordering Then set pcie completion timeout +* Starts the hardware using the generic start_hw function. +* Disables relaxed ordering Then set pcie completion timeout * **/ s32 ixgbe_start_hw_82598 (struct ixgbe_hw *hw)
@@ -256,12 +256,12 @@ s32 ixgbe_start_hw_82598(struct ixgbe_hw *hw) }/** -* ixgbe_get_link_capabilities_82598 - Determines link capabilities -* @hw: pointer to hardware structure -* @speed: pointer to link speed -* @autoneg: boolean auto-negotiation value +* ixgbe_get_link_capabilities_82598 - Determines link capabilities +* @hw: pointer to hardware structure +* @speed: pointer to link speed +* @autoneg: boolean auto-negotiation value * -* Determines the link capabilities by reading the AUTOC register. +* Determines the link capabilities by reading the AUTOC register. **/ STATIC s32 ixgbe_get_link_capabilities_82598(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
@@ -317,10 +317,10 @@ STATIC s32 ixgbe_get_link_capabilities_82598(struct ixgbe_hw *hw, }/** -* ixgbe_get_media_type_82598 - Determines media type -* @hw: pointer to hardware structure +* ixgbe_get_media_type_82598 - Determines media type +* @hw: pointer to hardware structure * -* Returns the media type (fiber, copper, backplane) +* Returns the media type (fiber, copper, backplane) **/ STATIC enum ixgbe_media_type ixgbe_get_media_type_82598(struct ixgbe_hw *hw) {
@@ -370,10 +370,10 @@ STATIC enum ixgbe_media_type ixgbe_get_media_type_82598(struct ixgbe_hw *hw) }/** -* ixgbe_fc_enable_82598 - Enable flow control -* @hw: pointer to hardware structure +* ixgbe_fc_enable_82598 - Enable flow control +* @hw: pointer to hardware structure * -* Enable flow control according to the current settings. +* Enable flow control according to the current settings. **/ s32 ixgbe_fc_enable_82598 (struct ixgbe_hw *hw) {
@@ -517,12 +517,12 @@ s32 ixgbe_fc_enable_82598(struct ixgbe_hw *hw) }/** -* ixgbe_start_mac_link_82598 - Configures MAC link settings -* @hw: pointer to hardware structure -* @autoneg_wait_to_complete: true when waiting for completion is needed +* ixgbe_start_mac_link_82598 - Configures MAC link settings +* @hw: pointer to hardware structure +* @autoneg_wait_to_complete: true when waiting for completion is needed * -* Configures link settings based on values in the ixgbe_hw struct. -* Restarts the link. Performs autonegotiation if needed. +* Configures link settings based on values in the ixgbe_hw struct. +* Restarts the link. Performs autonegotiation if needed. **/ STATIC s32 ixgbe_start_mac_link_82598(struct ixgbe_hw *hw,bool autoneg_wait_to_complete)
@@ -566,11 +566,11 @@ STATIC s32 ixgbe_start_mac_link_82598(struct ixgbe_hw *hw, }/** -* ixgbe_validate_link_ready - Function looks for phy link -* @hw: pointer to hardware structure +* ixgbe_validate_link_ready - Function looks for phy link +* @hw: pointer to hardware structure * -* Function indicates success when phy link is available. If phy is not ready -* within 5 seconds of MAC indicating link, the function returns error. +* Function indicates success when phy link is available. If phy is not ready +* within 5 seconds of MAC indicating link, the function returns error. **/ STATIC s32 ixgbe_validate_link_ready(struct ixgbe_hw *hw) {
@@ -601,13 +601,13 @@ STATIC s32 ixgbe_validate_link_ready(struct ixgbe_hw *hw) }/** -* ixgbe_check_mac_link_82598 - Get link/speed status -* @hw: pointer to hardware structure -* @speed: pointer to link speed -* @link_up: true is link is up, false otherwise -* @link_up_wait_to_complete: bool used to wait for link up or not +* ixgbe_check_mac_link_82598 - Get link/speed status +* @hw: pointer to hardware structure +* @speed: pointer to link speed +* @link_up: true is link is up, false otherwise +* @link_up_wait_to_complete: bool used to wait for link up or not * -* Reads the links register to determine if link is up and the current speed +* Reads the links register to determine if link is up and the current speed **/ STATIC s32 ixgbe_check_mac_link_82598(struct ixgbe_hw *hw, ixgbe_link_speed *speed, bool *link_up,
@@ -691,12 +691,12 @@ STATIC s32 ixgbe_check_mac_link_82598(struct ixgbe_hw *hw, }/** -* ixgbe_setup_mac_link_82598 - Set MAC link speed -* @hw: pointer to hardware structure -* @speed: new link speed -* @autoneg_wait_to_complete: true when waiting for completion is needed +* ixgbe_setup_mac_link_82598 - Set MAC link speed +* @hw: pointer to hardware structure +* @speed: new link speed +* @autoneg_wait_to_complete: true when waiting for completion is needed * -* Set the link speed in the AUTOC register and restarts link. +* Set the link speed in the AUTOC register and restarts link. **/ STATIC s32 ixgbe_setup_mac_link_82598(struct ixgbe_hw *hw, ixgbe_link_speed speed,
@@ -745,12 +745,12 @@ STATIC s32 ixgbe_setup_mac_link_82598(struct ixgbe_hw *hw,/** -* ixgbe_setup_copper_link_82598 - Set the PHY autoneg advertised field -* @hw: pointer to hardware structure -* @speed: new link speed -* @autoneg_wait_to_complete: true if waiting is needed to complete +* ixgbe_setup_copper_link_82598 - Set the PHY autoneg advertised field +* @hw: pointer to hardware structure +* @speed: new link speed +* @autoneg_wait_to_complete: true if waiting is needed to complete * -* Sets the link speed in the AUTOC register in the MAC and restarts link. +* Sets the link speed in the AUTOC register in the MAC and restarts link. **/ STATIC s32 ixgbe_setup_copper_link_82598(struct ixgbe_hw *hw, ixgbe_link_speed speed,
@@ -770,12 +770,12 @@ STATIC s32 ixgbe_setup_copper_link_82598(struct ixgbe_hw *hw, }/** -* ixgbe_reset_hw_82598 - Performs hardware reset -* @hw: pointer to hardware structure +* ixgbe_reset_hw_82598 - Performs hardware reset +* @hw: pointer to hardware structure * -* Resets the hardware by resetting the transmit and receive units, masks and -* clears all interrupts, performing a PHY reset, and performing a link (MAC) -* reset. +* Resets the hardware by resetting the transmit and receive units, masks and +* clears all interrupts, performing a PHY reset, and performing a link (MAC) +* reset. **/ STATIC s32 ixgbe_reset_hw_82598(struct ixgbe_hw *hw) {
@@ -908,10 +908,10 @@ STATIC s32 ixgbe_reset_hw_82598(struct ixgbe_hw *hw) }/** -* ixgbe_set_vmdq_82598 - Associate a VMDq set index with a rx address -* @hw: pointer to hardware struct -* @rar: receive address register index to associate with a VMDq index -* @vmdq: VMDq set index +* ixgbe_set_vmdq_82598 - Associate a VMDq set index with a rx address +* @hw: pointer to hardware struct +* @rar: receive address register index to associate with a VMDq index +* @vmdq: VMDq set index **/ s32 ixgbe_set_vmdq_82598 (struct ixgbe_hw *hw,u32 rar,u32 vmdq) {
@@ -934,10 +934,10 @@ s32 ixgbe_set_vmdq_82598(struct ixgbe_hw *hw, u32 rar, u32 vmdq) }/** -* ixgbe_clear_vmdq_82598 - Disassociate a VMDq set index from an rx address -* @hw: pointer to hardware struct -* @rar: receive address register index to associate with a VMDq index -* @vmdq: VMDq clear index (not used in 82598, but elsewhere) +* ixgbe_clear_vmdq_82598 - Disassociate a VMDq set index from an rx address +* @hw: pointer to hardware struct +* @rar: receive address register index to associate with a VMDq index +* @vmdq: VMDq clear index (not used in 82598, but elsewhere) **/ STATIC s32 ixgbe_clear_vmdq_82598(struct ixgbe_hw *hw, u32 rar, u32 vmdq) {
@@ -962,14 +962,14 @@ STATIC s32 ixgbe_clear_vmdq_82598(struct ixgbe_hw *hw, u32 rar, u32 vmdq) }/** -* ixgbe_set_vfta_82598 - Set VLAN filter table -* @hw: pointer to hardware structure -* @vlan: VLAN id to write to VLAN filter -* @vind: VMDq output index that maps queue to VLAN id in VFTA -* @vlan_on: boolean flag to turn on/off VLAN in VFTA -* @vlvf_bypass: boolean flag - unused +* ixgbe_set_vfta_82598 - Set VLAN filter table +* @hw: pointer to hardware structure +* @vlan: VLAN id to write to VLAN filter +* @vind: VMDq output index that maps queue to VLAN id in VFTA +* @vlan_on: boolean flag to turn on/off VLAN in VFTA +* @vlvf_bypass: boolean flag - unused * -* Turn on/off specified VLAN in the VLAN filter table. +* Turn on/off specified VLAN in the VLAN filter table. **/ s32 ixgbe_set_vfta_82598 (struct ixgbe_hw *hw,u32 vlan,u32 vind,bool vlan_on,bool vlvf_bypass)
@@ -1015,10 +1015,10 @@ s32 ixgbe_set_vfta_82598(struct ixgbe_hw *hw, u32 vlan, u32 vind, }/** -* ixgbe_clear_vfta_82598 - Clear VLAN filter table -* @hw: pointer to hardware structure +* ixgbe_clear_vfta_82598 - Clear VLAN filter table +* @hw: pointer to hardware structure * -* Clears the VLAN filer table, and the VMDq index associated with the filter +* Clears the VLAN filer table, and the VMDq index associated with the filter **/ STATIC s32 ixgbe_clear_vfta_82598(struct ixgbe_hw *hw) {
@@ -1039,12 +1039,12 @@ STATIC s32 ixgbe_clear_vfta_82598(struct ixgbe_hw *hw) }/** -* ixgbe_read_analog_reg8_82598 - Reads 8 bit Atlas analog register -* @hw: pointer to hardware structure -* @reg: analog register to read -* @val: read value +* ixgbe_read_analog_reg8_82598 - Reads 8 bit Atlas analog register +* @hw: pointer to hardware structure +* @reg: analog register to read +* @val: read value * -* Performs read operation to Atlas analog register specified. +* Performs read operation to Atlas analog register specified. **/ s32 ixgbe_read_analog_reg8_82598 (struct ixgbe_hw *hw,u32 reg,u8 *val) {
@@ -1063,12 +1063,12 @@ s32 ixgbe_read_analog_reg8_82598(struct ixgbe_hw *hw, u32 reg, u8 *val) }/** -* ixgbe_write_analog_reg8_82598 - Writes 8 bit Atlas analog register -* @hw: pointer to hardware structure -* @reg: atlas register to write -* @val: value to write +* ixgbe_write_analog_reg8_82598 - Writes 8 bit Atlas analog register +* @hw: pointer to hardware structure +* @reg: atlas register to write +* @val: value to write * -* Performs write operation to Atlas analog register specified. +* Performs write operation to Atlas analog register specified. **/ s32 ixgbe_write_analog_reg8_82598 (struct ixgbe_hw *hw,u32 reg,u8 val) {
@@ -1085,13 +1085,13 @@ s32 ixgbe_write_analog_reg8_82598(struct ixgbe_hw *hw, u32 reg, u8 val) }/** -* ixgbe_read_i2c_phy_82598 - Reads 8 bit word over I2C interface. -* @hw: pointer to hardware structure -* @dev_addr: address to read from -* @byte_offset: byte offset to read from dev_addr -* @eeprom_data: value read +* ixgbe_read_i2c_phy_82598 - Reads 8 bit word over I2C interface. +* @hw: pointer to hardware structure +* @dev_addr: address to read from +* @byte_offset: byte offset to read from dev_addr +* @eeprom_data: value read * -* Performs 8 byte read operation to SFP module's EEPROM over I2C interface. +* Performs 8 byte read operation to SFP module's EEPROM over I2C interface. **/ STATIC s32 ixgbe_read_i2c_phy_82598(struct ixgbe_hw *hw, u8 dev_addr,u8 byte_offset,u8 *eeprom_data)
@@ -1159,12 +1159,12 @@ STATIC s32 ixgbe_read_i2c_phy_82598(struct ixgbe_hw *hw, u8 dev_addr, }/** -* ixgbe_read_i2c_eeprom_82598 - Reads 8 bit word over I2C interface. -* @hw: pointer to hardware structure -* @byte_offset: EEPROM byte offset to read -* @eeprom_data: value read +* ixgbe_read_i2c_eeprom_82598 - Reads 8 bit word over I2C interface. +* @hw: pointer to hardware structure +* @byte_offset: EEPROM byte offset to read +* @eeprom_data: value read * -* Performs 8 byte read operation to SFP module's EEPROM over I2C interface. +* Performs 8 byte read operation to SFP module's EEPROM over I2C interface. **/ s32 ixgbe_read_i2c_eeprom_82598 (struct ixgbe_hw *hw,u8 byte_offset,u8 *eeprom_data)
@@ -1174,12 +1174,12 @@ s32 ixgbe_read_i2c_eeprom_82598(struct ixgbe_hw *hw, u8 byte_offset, }/** -* ixgbe_read_i2c_sff8472_82598 - Reads 8 bit word over I2C interface. -* @hw: pointer to hardware structure -* @byte_offset: byte offset at address 0xA2 -* @sff8472_data: value read +* ixgbe_read_i2c_sff8472_82598 - Reads 8 bit word over I2C interface. +* @hw: pointer to hardware structure +* @byte_offset: byte offset at address 0xA2 +* @sff8472_data: value read * -* Performs 8 byte read operation to SFP module's SFF-8472 data over I2C +* Performs 8 byte read operation to SFP module's SFF-8472 data over I2C **/ STATIC s32 ixgbe_read_i2c_sff8472_82598(struct ixgbe_hw *hw, u8 byte_offset,u8 *sff8472_data)
@@ -1189,10 +1189,10 @@ STATIC s32 ixgbe_read_i2c_sff8472_82598(struct ixgbe_hw *hw, u8 byte_offset, }/** -* ixgbe_get_supported_physical_layer_82598 - Returns physical layer type -* @hw: pointer to hardware structure +* ixgbe_get_supported_physical_layer_82598 - Returns physical layer type +* @hw: pointer to hardware structure * -* Determines physical layer capabilities of the current configuration. +* Determines physical layer capabilities of the current configuration. **/ u64 ixgbe_get_supported_physical_layer_82598 (struct ixgbe_hw *hw) {
@@ -1291,12 +1291,12 @@ u64 ixgbe_get_supported_physical_layer_82598(struct ixgbe_hw *hw) }/** -* ixgbe_set_lan_id_multi_port_pcie_82598 - Set LAN id for PCIe multiple -* port devices. -* @hw: pointer to the HW structure +* ixgbe_set_lan_id_multi_port_pcie_82598 - Set LAN id for PCIe multiple +* port devices. +* @hw: pointer to the HW structure * -* Calls common function and corrects issue with some single port devices -* that enable LAN1 but not LAN0. +* Calls common function and corrects issue with some single port devices +* that enable LAN1 but not LAN0. **/ void ixgbe_set_lan_id_multi_port_pcie_82598 (struct ixgbe_hw *hw) {
@@ -1325,8 +1325,8 @@ void ixgbe_set_lan_id_multi_port_pcie_82598(struct ixgbe_hw *hw) }/** -* ixgbe_enable_relaxed_ordering_82598 - enable relaxed ordering -* @hw: pointer to hardware structure +* ixgbe_enable_relaxed_ordering_82598 - enable relaxed ordering +* @hw: pointer to hardware structure * **/ void ixgbe_enable_relaxed_ordering_82598 (struct ixgbe_hw *hw)
@@ -1395,11 +1395,11 @@ STATIC void ixgbe_set_rxpba_82598(struct ixgbe_hw *hw, int num_pb, }/** -* ixgbe_enable_rx_dma_82598 - Enable the Rx DMA unit -* @hw: pointer to hardware structure -* @regval: register value to write to RXCTRL +* ixgbe_enable_rx_dma_82598 - Enable the Rx DMA unit +* @hw: pointer to hardware structure +* @regval: register value to write to RXCTRL * -* Enables the Rx DMA unit +* Enables the Rx DMA unit **/ s32 ixgbe_enable_rx_dma_82598 (struct ixgbe_hw *hw,u32 regval) {
drivers/net/ixgbe/base/ixgbe_82599.c +192 -192
653 lines not on this page · raw message
drivers/net/ixgbe/base/ixgbe_api.c +437 -437
1,534 lines not on this page · raw message
drivers/net/ixgbe/base/ixgbe_common.c +512 -512
396 lines not on this page · raw message
drivers/net/ixgbe/base/ixgbe_mbx.c +129 -129
258 lines not on this page · raw message
drivers/net/ixgbe/base/ixgbe_phy.c +197 -197
394 lines not on this page · raw message
drivers/net/ixgbe/base/ixgbe_vf.c +83 -83
166 lines not on this page · raw message
drivers/net/ixgbe/base/ixgbe_x540.c +94 -94
188 lines not on this page · raw message
drivers/net/ixgbe/base/ixgbe_x550.c +240 -240
480 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.17.1
Part of the diff is not shown here. View the raw message.
PATCH v2 10/20 net/ixgbe/base: move increments after evaluations
In reply to Guinan SunThe retry variable was being incremented before it was evaluated by the subsequent conditional against the maximum retries to figure out which message to print. So we'll move the increment op to the end.
--- drivers/net/ixgbe/base/ixgbe_phy.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-)
drivers/net/ixgbe/base/ixgbe_phy.c +8 -9
@@ -138,12 +138,12 @@ s32 ixgbe_read_i2c_combined_generic_int(struct ixgbe_hw *hw, u8 addr, u16 reg,ixgbe_i2c_bus_clear (hw);if (lock) hw->mac.ops.release_swfw_sync (hw, swfw_mask); - retry++;if (retry < max_retry)DEBUGOUT ("I2C byte read combined error - Retrying.\n" );else DEBUGOUT ("I2C byte read combined error.\n" ); - }while (retry < max_retry); + retry++; + }while (retry <= max_retry);return IXGBE_ERR_I2C ; }
@@ -203,12 +203,12 @@ s32 ixgbe_write_i2c_combined_generic_int(struct ixgbe_hw *hw, u8 addr, u16 reg,ixgbe_i2c_bus_clear (hw);if (lock) hw->mac.ops.release_swfw_sync (hw, swfw_mask); - retry++;if (retry < max_retry)DEBUGOUT ("I2C byte write combined error - Retrying.\n" );else DEBUGOUT ("I2C byte write combined error.\n" ); - }while (retry < max_retry); + retry++; + }while (retry <= max_retry);return IXGBE_ERR_I2C ; }
@@ -2057,13 +2057,12 @@ STATIC s32 ixgbe_read_i2c_byte_generic_int(struct ixgbe_hw *hw, u8 byte_offset, hw->mac.ops.release_swfw_sync (hw, swfw_mask);msec_delay (100 ); } - retry++;if (retry < max_retry)DEBUGOUT ("I2C byte read error - Retrying.\n" );else DEBUGOUT ("I2C byte read error.\n" ); - - }while (retry < max_retry); + retry++; + }while (retry <= max_retry);return status; }
@@ -2161,12 +2160,12 @@ STATIC s32 ixgbe_write_i2c_byte_generic_int(struct ixgbe_hw *hw, u8 byte_offset, fail:ixgbe_i2c_bus_clear (hw); - retry++;if (retry < max_retry)DEBUGOUT ("I2C byte write error - Retrying.\n" );else DEBUGOUT ("I2C byte write error.\n" ); - }while (retry < max_retry); + retry++; + }while (retry <= max_retry);if (lock) hw->mac.ops.release_swfw_sync (hw, swfw_mask);
Signature · 1 line
2.17.1
PATCH v2 11/20 net/ixgbe/base: create dedicated func to restart auto nego
In reply to Guinan SunThis patch is for restarting auto negotiation on PHY.
--- drivers/net/ixgbe/base/ixgbe_phy.c | 48 ++++++++++++++---------------- drivers/net/ixgbe/base/ixgbe_phy.h | 1 + 2 files changed, 23 insertions(+), 26 deletions(-)
drivers/net/ixgbe/base/ixgbe_phy.c +22 -26
@@ -542,6 +542,26 @@ s32 ixgbe_reset_phy_generic(struct ixgbe_hw *hw)return status; } +/** +* ixgbe_restart_auto_neg - Restart auto negotiation on the PHY +* @hw: pointer to hardware structure +**/ +void ixgbe_restart_auto_neg (struct ixgbe_hw *hw) +{ +u16 autoneg_reg; + +/* Check if PHY reset is blocked by MNG FW */ +if (ixgbe_check_reset_blocked (hw)) +return ; + +/* Restart PHY auto-negotiation. */ + hw->phy.ops.read_reg (hw,IXGBE_MDIO_AUTO_NEG_CONTROL , +IXGBE_MDIO_AUTO_NEG_DEV_TYPE , &autoneg_reg); + autoneg_reg |=IXGBE_MII_RESTART ; + hw->phy.ops.write_reg (hw,IXGBE_MDIO_AUTO_NEG_CONTROL , +IXGBE_MDIO_AUTO_NEG_DEV_TYPE , autoneg_reg); +} +/** * ixgbe_read_phy_mdi - Reads a value from a specified PHY register without * the SWFW lock
@@ -826,19 +846,7 @@ s32 ixgbe_setup_phy_link_generic(struct ixgbe_hw *hw)IXGBE_MDIO_AUTO_NEG_DEV_TYPE , autoneg_reg); -/* Blocked by MNG FW so don't reset PHY */ -if (ixgbe_check_reset_blocked (hw)) -return status; - -/* Restart PHY auto-negotiation. */ - hw->phy.ops.read_reg (hw,IXGBE_MDIO_AUTO_NEG_CONTROL , -IXGBE_MDIO_AUTO_NEG_DEV_TYPE , &autoneg_reg); - - autoneg_reg |=IXGBE_MII_RESTART ; - - hw->phy.ops.write_reg (hw,IXGBE_MDIO_AUTO_NEG_CONTROL , -IXGBE_MDIO_AUTO_NEG_DEV_TYPE , autoneg_reg); - +ixgbe_restart_auto_neg (hw);return status; }
@@ -1062,19 +1070,7 @@ s32 ixgbe_setup_phy_link_tnx(struct ixgbe_hw *hw) autoneg_reg); } -/* Blocked by MNG FW so don't reset PHY */ -if (ixgbe_check_reset_blocked (hw)) -return status; - -/* Restart PHY auto-negotiation. */ - hw->phy.ops.read_reg (hw,IXGBE_MDIO_AUTO_NEG_CONTROL , -IXGBE_MDIO_AUTO_NEG_DEV_TYPE , &autoneg_reg); - - autoneg_reg |=IXGBE_MII_RESTART ; - - hw->phy.ops.write_reg (hw,IXGBE_MDIO_AUTO_NEG_CONTROL , -IXGBE_MDIO_AUTO_NEG_DEV_TYPE , autoneg_reg); - +ixgbe_restart_auto_neg (hw);return status; }
drivers/net/ixgbe/base/ixgbe_phy.h +1 -0
@@ -133,6 +133,7 @@ enum ixgbe_phy_type ixgbe_get_phy_type_from_id(u32 phy_id);s32 ixgbe_get_phy_id (struct ixgbe_hw *hw);s32 ixgbe_identify_phy_generic (struct ixgbe_hw *hw);s32 ixgbe_reset_phy_generic (struct ixgbe_hw *hw); +void ixgbe_restart_auto_neg (struct ixgbe_hw *hw);s32 ixgbe_read_phy_reg_mdi (struct ixgbe_hw *hw,u32 reg_addr,u32 device_type,u16 *phy_data); s32 ixgbe_write_phy_reg_mdi(struct ixgbe_hw *hw, u32 reg_addr, u32 device_type,
Signature · 1 line
2.17.1
PATCH v2 12/20 net/ixgbe/base: modify coding style
In reply to Guinan SunFix unchecked return value.
Add cast for type mismatch.
--- drivers/net/ixgbe/base/ixgbe_82599.c | 12 +++++------- drivers/net/ixgbe/base/ixgbe_common.c | 6 ++---- drivers/net/ixgbe/base/ixgbe_common.h | 2 +- drivers/net/ixgbe/base/ixgbe_dcb_82598.c | 2 +- drivers/net/ixgbe/base/ixgbe_dcb_82599.c | 2 +- drivers/net/ixgbe/base/ixgbe_phy.c | 25 +++++++----------------- drivers/net/ixgbe/base/ixgbe_x540.c | 2 +- drivers/net/ixgbe/base/ixgbe_x550.c | 2 +- 8 files changed, 19 insertions(+), 34 deletions(-)
drivers/net/ixgbe/base/ixgbe_82599.c +5 -7
@@ -1547,7 +1547,7 @@ void ixgbe_fdir_add_signature_filter_82599(struct ixgbe_hw *hw,* is for FDIRCMD. Then do a 64-bit register write from FDIRHASH. */ fdirhashcmd = (u64 )fdircmd <<32 ; - fdirhashcmd |=ixgbe_atr_compute_sig_hash_82599 (input, common); + fdirhashcmd |= (u64 )ixgbe_atr_compute_sig_hash_82599 (input, common);IXGBE_WRITE_REG64 (hw,IXGBE_FDIRHASH , fdirhashcmd);DEBUGOUT2 ("Tx Queue=%x hash=%x\n" , queue, (u32 )fdirhashcmd);
@@ -1636,7 +1636,7 @@ STATIC u32 ixgbe_get_fdirtcpm_82599(union ixgbe_atr_input *input_mask) {u32 mask =IXGBE_NTOHS (input_mask->formatted.dst_port); mask <<=IXGBE_FDIRTCPM_DPORTM_SHIFT ; - mask |=IXGBE_NTOHS (input_mask->formatted.src_port); + mask |= (u32 )IXGBE_NTOHS (input_mask->formatted.src_port); mask = ((mask &0x55555555 ) <<1 ) | ((mask &0xAAAAAAAA ) >>1 ); mask = ((mask &0x33333333 ) <<2 ) | ((mask &0xCCCCCCCC ) >>2 ); mask = ((mask &0x0F0F0F0F ) <<4 ) | ((mask &0xF0F0F0F0 ) >>4 );
@@ -1868,14 +1868,14 @@ s32 ixgbe_fdir_write_perfect_filter_82599(struct ixgbe_hw *hw,/* 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); + fdirport |= (u32 )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); fdirvlan <<=IXGBE_FDIRVLAN_FLEX_SHIFT ; - fdirvlan |=IXGBE_NTOHS (input->formatted.vlan_id); + fdirvlan |= (u32 )IXGBE_NTOHS (input->formatted.vlan_id);IXGBE_WRITE_REG (hw,IXGBE_FDIRVLAN , fdirvlan);if (cloud_mode) {
@@ -2093,9 +2093,7 @@ s32 ixgbe_start_hw_82599(struct ixgbe_hw *hw)if (ret_val !=IXGBE_SUCCESS ) goto out; - ret_val =ixgbe_start_hw_gen2 (hw); -if (ret_val !=IXGBE_SUCCESS ) - goto out; +ixgbe_start_hw_gen2 (hw);/* We need to run link autotry after the driver loads */ hw->mac.autotry_restart = true;
drivers/net/ixgbe/base/ixgbe_common.c +2 -4
@@ -422,7 +422,7 @@ s32 ixgbe_start_hw_generic(struct ixgbe_hw *hw)* 82599 * X540 **/ -s32 ixgbe_start_hw_gen2 (struct ixgbe_hw *hw) +void ixgbe_start_hw_gen2 (struct ixgbe_hw *hw) {u32 i;u32 regval;
@@ -447,8 +447,6 @@ s32 ixgbe_start_hw_gen2(struct ixgbe_hw *hw) IXGBE_DCA_RXCTRL_HEAD_WRO_EN);IXGBE_WRITE_REG (hw,IXGBE_DCA_RXCTRL (i), regval); } - -return IXGBE_SUCCESS ; }/**
@@ -739,7 +737,7 @@ s32 ixgbe_read_pba_num_generic(struct ixgbe_hw *hw, u32 *pba_num)DEBUGOUT ("NVM Read Error\n" );return ret_val; } - *pba_num |= data; + *pba_num |= (u32 )data;return IXGBE_SUCCESS ; }
drivers/net/ixgbe/base/ixgbe_common.h +1 -1
@@ -23,7 +23,7 @@ u16 ixgbe_get_pcie_msix_count_generic(struct ixgbe_hw *hw);s32 ixgbe_init_ops_generic (struct ixgbe_hw *hw);s32 ixgbe_init_hw_generic (struct ixgbe_hw *hw);s32 ixgbe_start_hw_generic (struct ixgbe_hw *hw); -s32 ixgbe_start_hw_gen2 (struct ixgbe_hw *hw); +void ixgbe_start_hw_gen2 (struct ixgbe_hw *hw);s32 ixgbe_clear_hw_cntrs_generic (struct ixgbe_hw *hw);s32 ixgbe_read_pba_num_generic (struct ixgbe_hw *hw,u32 *pba_num); s32 ixgbe_read_pba_string_generic(struct ixgbe_hw *hw, u8 *pba_num,
drivers/net/ixgbe/base/ixgbe_dcb_82598.c +1 -1
@@ -159,7 +159,7 @@ s32 ixgbe_dcb_config_tx_desc_arbiter_82598(struct ixgbe_hw *hw,for (i =0 ; i <IXGBE_DCB_MAX_TRAFFIC_CLASS ; i++) { max_credits = max[i]; reg = max_credits <<IXGBE_TDTQ2TCCR_MCL_SHIFT ; - reg |= refill[i]; + reg |= (u32)(refill[i]); reg |= (u32)(bwg_id[i]) <<IXGBE_TDTQ2TCCR_BWG_SHIFT ;if (tsa[i] == ixgbe_dcb_tsa_group_strict_cee)
drivers/net/ixgbe/base/ixgbe_dcb_82599.c +1 -1
@@ -166,7 +166,7 @@ s32 ixgbe_dcb_config_tx_desc_arbiter_82599(struct ixgbe_hw *hw, u16 *refill,for (i =0 ; i <IXGBE_DCB_MAX_TRAFFIC_CLASS ; i++) { max_credits = max[i]; reg = max_credits <<IXGBE_RTTDT2C_MCL_SHIFT ; - reg |= refill[i]; + reg |= (u32)(refill[i]); reg |= (u32)(bwg_id[i]) <<IXGBE_RTTDT2C_BWG_SHIFT ;if (tsa[i] == ixgbe_dcb_tsa_group_strict_cee)
drivers/net/ixgbe/base/ixgbe_phy.c +7 -18
@@ -8,10 +8,10 @@ STATIC void ixgbe_i2c_start(struct ixgbe_hw *hw); STATIC void ixgbe_i2c_stop(struct ixgbe_hw *hw); -STATIC s32 ixgbe_clock_in_i2c_byte(struct ixgbe_hw *hw, u8 *data); +STATIC void ixgbe_clock_in_i2c_byte(struct ixgbe_hw *hw, u8 *data); STATIC s32 ixgbe_clock_out_i2c_byte(struct ixgbe_hw *hw, u8 data); STATIC s32 ixgbe_get_i2c_ack(struct ixgbe_hw *hw); -STATIC s32 ixgbe_clock_in_i2c_bit(struct ixgbe_hw *hw, bool *data); +STATIC void ixgbe_clock_in_i2c_bit(struct ixgbe_hw *hw, bool *data); STATIC s32 ixgbe_clock_out_i2c_bit(struct ixgbe_hw *hw, bool data); STATIC void ixgbe_raise_i2c_clk(struct ixgbe_hw *hw, u32 *i2cctl); STATIC void ixgbe_lower_i2c_clk(struct ixgbe_hw *hw, u32 *i2cctl);
@@ -46,11 +46,7 @@ STATIC s32 ixgbe_out_i2c_byte_ack(struct ixgbe_hw *hw, u8 byte)*/ STATIC s32 ixgbe_in_i2c_byte_ack(struct ixgbe_hw *hw, u8 *byte) { -s32 status; - - status =ixgbe_clock_in_i2c_byte (hw, byte); -if (status) -return status; +ixgbe_clock_in_i2c_byte (hw, byte);/* ACK */ return ixgbe_clock_out_i2c_bit (hw, false); }
@@ -123,8 +119,7 @@ s32 ixgbe_read_i2c_combined_generic_int(struct ixgbe_hw *hw, u8 addr, u16 reg,if (ixgbe_in_i2c_byte_ack (hw, &low_bits)) goto fail;/* Get csum */ -if (ixgbe_clock_in_i2c_byte (hw, &csum_byte)) - goto fail; +ixgbe_clock_in_i2c_byte (hw, &csum_byte);/* NACK */ if (ixgbe_clock_out_i2c_bit (hw, false)) goto fail;
@@ -2034,9 +2029,7 @@ STATIC s32 ixgbe_read_i2c_byte_generic_int(struct ixgbe_hw *hw, u8 byte_offset,if (status !=IXGBE_SUCCESS ) goto fail; - status =ixgbe_clock_in_i2c_byte (hw, data); -if (status !=IXGBE_SUCCESS ) - goto fail; +ixgbe_clock_in_i2c_byte (hw, data); status =ixgbe_clock_out_i2c_bit (hw, nack);if (status !=IXGBE_SUCCESS )
@@ -2281,7 +2274,7 @@ STATIC void ixgbe_i2c_stop(struct ixgbe_hw *hw)* * Clocks in one byte data via I2C data/clock **/ -STATIC s32 ixgbe_clock_in_i2c_byte(struct ixgbe_hw *hw, u8 *data) +STATIC void ixgbe_clock_in_i2c_byte(struct ixgbe_hw *hw, u8 *data) {s32 i;bool bit =0 ;
@@ -2293,8 +2286,6 @@ STATIC s32 ixgbe_clock_in_i2c_byte(struct ixgbe_hw *hw, u8 *data)ixgbe_clock_in_i2c_bit (hw, &bit); *data |= bit << i; } - -return IXGBE_SUCCESS ; }/**
@@ -2390,7 +2381,7 @@ STATIC s32 ixgbe_get_i2c_ack(struct ixgbe_hw *hw)* * Clocks in one bit via I2C data/clock **/ -STATIC s32 ixgbe_clock_in_i2c_bit(struct ixgbe_hw *hw, bool *data) +STATIC void 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);
@@ -2415,8 +2406,6 @@ STATIC s32 ixgbe_clock_in_i2c_bit(struct ixgbe_hw *hw, bool *data)/* Minimum low period of clock is 4.7 us */ usec_delay (IXGBE_I2C_T_LOW ); - -return IXGBE_SUCCESS ; }/**
drivers/net/ixgbe/base/ixgbe_x540.c +1 -1
@@ -288,7 +288,7 @@ s32 ixgbe_start_hw_X540(struct ixgbe_hw *hw)if (ret_val !=IXGBE_SUCCESS ) goto out; - ret_val =ixgbe_start_hw_gen2 (hw); +ixgbe_start_hw_gen2 (hw); out:return ret_val;
drivers/net/ixgbe/base/ixgbe_x550.c +1 -1
@@ -699,7 +699,7 @@ static s32 ixgbe_setup_fw_link(struct ixgbe_hw *hw)for (i =0 ; i <sizeof (ixgbe_fw_map) /sizeof (ixgbe_fw_map[0 ]); ++i) {if (hw->phy.autoneg_advertised & ixgbe_fw_map[i].phy_speed) - setup[0 ] |= ixgbe_fw_map[i].fw_speed; + setup[0 ] |= (u32)(ixgbe_fw_map[i].fw_speed); } setup[0 ] |=FW_PHY_ACT_SETUP_LINK_HP |FW_PHY_ACT_SETUP_LINK_AN ;
Signature · 1 line
2.17.1
Re: [dpdk-dev] [PATCH v2 12/20] net/ixgbe/base: modify coding style
Quoted 21 lines · Guinan Sun
Fix unchecked return value.
Add cast for type mismatch.Signed-off-by Jakub Chylkowski <[email protected]>Signed-off-by Guinan Sun <[email protected]>--- drivers/net/ixgbe/base/ixgbe_82599.c | 12 +++++------- drivers/net/ixgbe/base/ixgbe_common.c | 6 ++---- drivers/net/ixgbe/base/ixgbe_common.h | 2 +- drivers/net/ixgbe/base/ixgbe_dcb_82598.c | 2 +- drivers/net/ixgbe/base/ixgbe_dcb_82599.c | 2 +- drivers/net/ixgbe/base/ixgbe_phy.c | 25 +++++++----------------- drivers/net/ixgbe/base/ixgbe_x540.c | 2 +- drivers/net/ixgbe/base/ixgbe_x550.c | 2 +- 8 files changed, 19 insertions(+), 34 deletions(-)drivers/net/ixgbe/base/ixgbe_82599.c +0
-0
drivers/net/ixgbe/base/ixgbe_82599.c void ixgbe_fdir_add_signature_filter_82599(struct ixgbe_hw *hw, · line 1550
Quoted 5 lines
drivers/net/ixgbe/base/ixgbe_82599.c +1
-1@@ -1547,7 +1547,7 @@ void ixgbe_fdir_add_signature_filter_82599(struct ixgbe_hw *hw,* is for FDIRCMD. Then do a 64-bit register write from FDIRHASH. */ fdirhashcmd = (u64 )fdircmd <<32 ; - fdirhashcmd |=ixgbe_atr_compute_sig_hash_82599 (input, common); + fdirhashcmd |= (u64 )ixgbe_atr_compute_sig_hash_82599 (input, common);
Hi Guinan, Qi,
These are not coding style changes, as commit log says they are fixes in the code.
Can you please properly separate the patch based on the fix type and provide relevant patch title?
Re: [dpdk-dev] [PATCH v2 12/20] net/ixgbe/base: modify coding style
Hi Ferruh
Quoted 40 lines
-----Original Message-----
From: Yigit, Ferruh
Sent: Wednesday, July 8, 2020 11:26 PM
To: Sun, GuinanX <[email protected]>; [email protected]; Zhang, Qi Z <[email protected]>
Cc: Guo, Jia <[email protected]>; Zhao1, Wei <[email protected]>; Chylkowski, JakubX <[email protected]>
Subject: Re: [dpdk-dev] [PATCH v2 12/20]net/ixgbe/base: modify coding styledrivers/net/ixgbe/base/ixgbe_82599.c void ixgbe_fdir_add_signature_filter_82599(struct
Quoted 22 lines · Guinan Sun
Fix unchecked return value.
Add cast for type mismatch.Signed-off-by Jakub Chylkowski <[email protected]>Signed-off-by Guinan Sun <[email protected]>--- drivers/net/ixgbe/base/ixgbe_82599.c | 12 +++++------- drivers/net/ixgbe/base/ixgbe_common.c | 6 ++---- drivers/net/ixgbe/base/ixgbe_common.h | 2 +- drivers/net/ixgbe/base/ixgbe_dcb_82598.c | 2 +- drivers/net/ixgbe/base/ixgbe_dcb_82599.c | 2 +- drivers/net/ixgbe/base/ixgbe_phy.c | 25 +++++++----------------- drivers/net/ixgbe/base/ixgbe_x540.c | 2 +- drivers/net/ixgbe/base/ixgbe_x550.c | 2 +- 8 files changed, 19 insertions(+), 34 deletions(-)drivers/net/ixgbe/base/ixgbe_82599.c +0
-0@@ -1547,7 +1547,7 @@ void ixgbe_fdir_add_signature_filter_82599(struct
ixgbe_hw*hw,drivers/net/ixgbe/base/ixgbe_82599.c void ixgbe_fdir_add_signature_filter_82599(struct ixgbe_hw *hw,
Quoted 5 lines
drivers/net/ixgbe/base/ixgbe_82599.c +1
-1* is for FDIRCMD. Then do a 64-bit register write from FDIRHASH. */ fdirhashcmd = (u64 )fdircmd <<32 ; - fdirhashcmd |=ixgbe_atr_compute_sig_hash_82599 (input, common); + fdirhashcmd |= (u64)ixgbe_atr_compute_sig_hash_82599(input,common);
Quoted 7 lines
Hi Guinan, Qi,
These are not coding style changes, as commit log says they are fixes in the code.
Can you please properly separate the patch based on the fix type and provide relevant patch title?
First, we will make changes to the commit log.
The reason is that this is not a fix, but some unnecessary return value check is deleted. Secondly, we split this patch into two. This will make the expression clearer.
PATCH v2 13/20 net/ixgbe/base: remove unnecessary log message FC autonego
In reply to Guinan SunThe function ixgbe_device_supports_autoneg_fc is checking whether a particular device and medium configuration is supporting Flow Control Autonegotiation. In case of non-support, the message is always logged which is confusing.
The fix is removing unnecessary log entry.
--- drivers/net/ixgbe/base/ixgbe_common.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/net/ixgbe/base/ixgbe_common.c +0 -4
@@ -187,10 +187,6 @@ bool ixgbe_device_supports_autoneg_fc(struct ixgbe_hw *hw)break ; } -if (!supported) -ERROR_REPORT2 (IXGBE_ERROR_UNSUPPORTED , -"Device %x does not support flow control autoneg" , - hw->device_id);return supported; }
Signature · 1 line
2.17.1
PATCH v2 14/20 net/ixgbe/base: initialize data field in struct buffer
In reply to Guinan SunWhile sending request using ixgbe_hic_unlocked() the data field in buffer struct is not used. It is set when the struct is overwritten by FW to deliver the response. To not pass random data to FW the whole structure should be zeroed before use.
--- drivers/net/ixgbe/base/ixgbe_x550.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/ixgbe/base/ixgbe_x550.c +2 -0
@@ -3126,6 +3126,7 @@ s32 ixgbe_read_ee_hostif_X550(struct ixgbe_hw *hw, u16 offset, u16 *data)/* one word */ buffer.length =IXGBE_CPU_TO_BE16 (sizeof (u16)); buffer.pad2 =0 ; + buffer.data =0 ; buffer.pad3 =0 ; status = hw->mac.ops.acquire_swfw_sync (hw, mask);
@@ -3186,6 +3187,7 @@ s32 ixgbe_read_ee_hostif_buffer_X550(struct ixgbe_hw *hw, buffer.address =IXGBE_CPU_TO_BE32 ((offset + current_word) *2 ); buffer.length =IXGBE_CPU_TO_BE16 (words_to_read *2 ); buffer.pad2 =0 ; + buffer.data =0 ; buffer.pad3 =0 ; status = ixgbe_hic_unlocked(hw, (u32 *)&buffer, sizeof(buffer),
Signature · 1 line
2.17.1
PATCH v2 15/20 net/ixgbe/base: improve log about autonego being disabled
In reply to Guinan SunOn ESXi OS, when user disables auto negotiation, the following log
appears: "(unsupported) Flow control autoneg is disabled". It is true that auto negotiation is disabled but it is not necessarily true that it is not supported.
--- drivers/net/ixgbe/base/ixgbe_common.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/ixgbe/base/ixgbe_common.c +3 -2
@@ -3077,8 +3077,9 @@ void ixgbe_fc_autoneg(struct ixgbe_hw *hw)* - link is not up. */ if (hw->fc.disable_fc_autoneg) { -ERROR_REPORT1 (IXGBE_ERROR_UNSUPPORTED , -"Flow control autoneg is disabled" ); +/* TODO: This should be just an informative log */ +ERROR_REPORT1 (IXGBE_ERROR_CAUTION , +"Flow control autoneg is disabled" ); goto out; }
Signature · 1 line
2.17.1
PATCH v2 16/20 net/ixgbe/base: add ipv6 mask for FDIR feature
In reply to Guinan SunWrite FDIRIP6M register to allow flow director filter to set ipv6 rules without setting ipv6 source/destination address.
--- drivers/net/ixgbe/base/ixgbe_82599.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ixgbe/base/ixgbe_82599.c +1 -0
@@ -1832,6 +1832,7 @@ s32 ixgbe_fdir_set_input_mask_82599(struct ixgbe_hw *hw, ~input_mask->formatted.src_ip[0]);IXGBE_WRITE_REG_BE32 (hw,IXGBE_FDIRDIP4M , ~input_mask->formatted.dst_ip[0 ]); +IXGBE_WRITE_REG_BE32 (hw,IXGBE_FDIRIP6M ,0xFFFFFFFF ); }return IXGBE_SUCCESS ; }
Signature · 1 line
2.17.1
PATCH v2 17/20 net/ixgbe/base: remove default advertising for x550 2.5G/5G
In reply to Guinan SunWe are seeing interoperability issues with switches when 2.5G and 5G in x550 are advertised by default, so default to off.
--- drivers/net/ixgbe/base/ixgbe_phy.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/net/ixgbe/base/ixgbe_phy.c +0 -4
@@ -915,10 +915,6 @@ static s32 ixgbe_get_copper_speeds_supported(struct ixgbe_hw *hw) hw->phy.speeds_supported |=IXGBE_LINK_SPEED_100_FULL ;switch (hw->mac.type) { -case ixgbe_mac_X550: - hw->phy.speeds_supported |=IXGBE_LINK_SPEED_2_5GB_FULL ; - hw->phy.speeds_supported |=IXGBE_LINK_SPEED_5GB_FULL ; -break ;case ixgbe_mac_X550EM_x:case ixgbe_mac_X550EM_a: hw->phy.speeds_supported &= ~IXGBE_LINK_SPEED_100_FULL ;
Signature · 1 line
2.17.1
PATCH v2 18/20 net/ixgbe/base: check host interface return status
In reply to Guinan SunWriting to read-only fields returns a non-OK Return Status for shadow RAM write command for X550.
This information was previously discarded.
--- drivers/net/ixgbe/base/ixgbe_x550.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
drivers/net/ixgbe/base/ixgbe_x550.c +12 -1
@@ -3248,7 +3248,18 @@ s32 ixgbe_write_ee_hostif_data_X550(struct ixgbe_hw *hw, u16 offset, status =ixgbe_host_interface_command (hw, (u32 *)&buffer,sizeof (buffer), -IXGBE_HI_COMMAND_TIMEOUT , false); +IXGBE_HI_COMMAND_TIMEOUT , true); +if (status !=IXGBE_SUCCESS ) { +DEBUGOUT2 ("for offset %04x failed with status %d\n" , + offset, status); +return status; + } + +if (buffer.hdr.rsp.buf_lenh_status !=FW_CEM_RESP_STATUS_SUCCESS ) { +DEBUGOUT2 ("for offset %04x host interface return status %02x\n" , + offset, buffer.hdr.rsp.buf_lenh_status); +return IXGBE_ERR_HOST_INTERFACE_COMMAND ; + }return status; }
Signature · 1 line
2.17.1
PATCH v2 19/20 net/ixgbe/base: cleanup pre-processor tags
In reply to Guinan SunThe codes has been exposed correctly, so remove pre-processor tags.
--- drivers/net/ixgbe/base/ixgbe_common.c | 8 -------- drivers/net/ixgbe/base/ixgbe_phy.h | 2 -- drivers/net/ixgbe/base/ixgbe_type.h | 10 ---------- drivers/net/ixgbe/base/ixgbe_vf.c | 4 ---- drivers/net/ixgbe/base/ixgbe_x550.c | 22 ---------------------- 5 files changed, 46 deletions(-)
drivers/net/ixgbe/base/ixgbe_common.c +0 -8
@@ -4274,17 +4274,9 @@ s32 ixgbe_check_mac_link_generic(struct ixgbe_hw *hw, ixgbe_link_speed *speed,break ;case IXGBE_LINKS_SPEED_10_X550EM_A : *speed =IXGBE_LINK_SPEED_UNKNOWN ; -#ifdef PREBOOT_SUPPORT -if (hw->device_id ==IXGBE_DEV_ID_X550EM_A_1G_T || - hw->device_id ==IXGBE_DEV_ID_X550EM_A_1G_T_L || - hw->device_id ==IXGBE_DEV_ID_X550EM_A_SGMII || - hw->device_id ==IXGBE_DEV_ID_X550EM_A_SGMII_L ) - *speed =IXGBE_LINK_SPEED_10_FULL ; -#else if (hw->device_id ==IXGBE_DEV_ID_X550EM_A_1G_T || hw->device_id ==IXGBE_DEV_ID_X550EM_A_1G_T_L ) *speed =IXGBE_LINK_SPEED_10_FULL ; -#endif /* PREBOOT_SUPPORT */ break ;default : *speed =IXGBE_LINK_SPEED_UNKNOWN ;
drivers/net/ixgbe/base/ixgbe_phy.h +0 -2
@@ -117,10 +117,8 @@#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
drivers/net/ixgbe/base/ixgbe_type.h +0 -10
@@ -2413,9 +2413,7 @@ enum {#define IXGBE_EEPROM_CTRL_2 1/* EEPROM CTRL word 2 */ #define IXGBE_EEPROM_CCD_BIT 2 -#ifndef IXGBE_EEPROM_GRANT_ATTEMPTS #define IXGBE_EEPROM_GRANT_ATTEMPTS 1000/* EEPROM attempts to gain grant */ -#endif /* Number of 5 microseconds we wait for EERD read and * EERW write to complete */
@@ -3145,11 +3143,7 @@ enum ixgbe_fdir_pballoc_type {/* Host Interface Command Structures */ -#ifdef C99 #pragma pack(push, 1) -#else -#pragma pack (1) -#endif /* C99 */ struct ixgbe_hic_hdr {u8 cmd;
@@ -3262,11 +3256,7 @@ struct ixgbe_hic_phy_activity_resp {__be32 data[FW_PHY_ACT_DATA_COUNT ]; }; -#ifdef C99 #pragma pack(pop) -#else -#pragma pack() -#endif /* C99 */ /* Transmit Descriptor - Legacy */ struct ixgbe_legacy_tx_desc {
drivers/net/ixgbe/base/ixgbe_vf.c +0 -4
@@ -7,12 +7,8 @@#include "ixgbe_type.h" #include "ixgbe_vf.h" -#ifndef IXGBE_VFWRITE_REG #define IXGBE_VFWRITE_REG IXGBE_WRITE_REG -#endif -#ifndef IXGBE_VFREAD_REG #define IXGBE_VFREAD_REG IXGBE_READ_REG -#endif /** * ixgbe_init_ops_vf - Initialize the pointers for vf
drivers/net/ixgbe/base/ixgbe_x550.c +0 -22
@@ -1642,7 +1642,6 @@ STATIC s32 ixgbe_restart_an_internal_phy_x550em(struct ixgbe_hw *hw)return status; } -#ifndef PREBOOT_SUPPORT /** * ixgbe_setup_sgmii - Set up link for sgmii * @hw: pointer to hardware structure
@@ -1712,7 +1711,6 @@ STATIC s32 ixgbe_setup_sgmii(struct ixgbe_hw *hw, ixgbe_link_speed speed,return hw->phy.ops.setup_link_speed (hw, speed, autoneg_wait); } -#endif /* PREBOOT_SUPPORT */ /** * ixgbe_setup_sgmii_fw - Set up link for internal PHY SGMII auto-negotiation * @hw: pointer to hardware structure
@@ -1837,11 +1835,7 @@ void ixgbe_init_mac_link_ops_X550em(struct ixgbe_hw *hw)case ixgbe_media_type_backplane:if (hw->device_id ==IXGBE_DEV_ID_X550EM_A_SGMII || hw->device_id ==IXGBE_DEV_ID_X550EM_A_SGMII_L ) -#ifdef PREBOOT_SUPPORT - mac->ops.setup_link = ixgbe_setup_sgmii_fw; -#else mac->ops.setup_link = ixgbe_setup_sgmii; -#endif /* PREBOOT_SUPPORT */ break ;default :break ;
@@ -1900,18 +1894,8 @@ s32 ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw, *autoneg = false;break ;case ixgbe_phy_ext_1g_t: -#ifdef PREBOOT_SUPPORT - *speed =IXGBE_LINK_SPEED_1GB_FULL ; -break ; -#endif /* PREBOOT_SUPPORT */ case ixgbe_phy_sgmii: -#ifdef PREBOOT_SUPPORT - *speed =IXGBE_LINK_SPEED_1GB_FULL | -IXGBE_LINK_SPEED_100_FULL | -IXGBE_LINK_SPEED_10_FULL ; -#else *speed =IXGBE_LINK_SPEED_1GB_FULL ; -#endif /* PREBOOT_SUPPORT */ break ;case ixgbe_phy_x550em_kr:if (hw->mac.type == ixgbe_mac_X550EM_a) {
@@ -3673,13 +3657,7 @@ u64 ixgbe_get_supported_physical_layer_X550em(struct ixgbe_hw *hw) physical_layer |=IXGBE_PHYSICAL_LAYER_10BASE_T ;break ;case ixgbe_phy_sgmii: -#ifdef PREBOOT_SUPPORT - physical_layer =IXGBE_PHYSICAL_LAYER_1000BASE_KX | -IXGBE_PHYSICAL_LAYER_100BASE_TX | -IXGBE_PHYSICAL_LAYER_10BASE_T ; -#else physical_layer =IXGBE_PHYSICAL_LAYER_1000BASE_KX ; -#endif /* PREBOOT_SUPPORT */ break ;case ixgbe_phy_ext_1g_t: physical_layer |=IXGBE_PHYSICAL_LAYER_1000BASE_T ;
Signature · 1 line
2.17.1
PATCH v2 20/20 net/ixgbe/base: update version
In reply to Guinan SunUpdate base code version in readme.
--- drivers/net/ixgbe/base/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ixgbe/base/README +1 -1
@@ -6,7 +6,7 @@ Intel® IXGBE driver =================== This directory contains source code of FreeBSD ixgbe driver of version -cid-ixgbe.2018.08.28.tar.gz released by the team which develop +not-released-cid-ixgbe.2020.06.09.tar.gz 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.17.1
Zhang, Qi Z
AppliedQuoted 73 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Guinan Sun
Sent: Thursday, July 2, 2020 11:13 AM
To: [email protected]
Cc: Guo, Jia <[email protected]>; Zhao1, Wei <[email protected]>; Sun, GuinanX <[email protected]>
Subject: [dpdk-dev] [PATCH v2 00/20] update ixgbe base codesource code of ixgbe driver:
not-released-cid-ixgbe.2020.06.09.tar.gz released by the team which develop basic drivers for any ixgbe NIC.changelog in ND share repo:
From66d7da32d8e8("ixgbe-shared: Add support to clear VFMBMEM and toggle VF's TX queues") To7f2d73c9742b("ixgbe-shared: check Host Interface Return Status for Shadow RAM Write command for X550") v2:
* Remove codes aboutIXGBE_NVMUPD_SUPPORT.
* Remove codes aboutPREBOOT_SUPPORT.
* Remove codes aboutIXGBE_SFP_DETECT_RETRIES.
* Remove codes aboutIXGBE_EEPROM_GRANT_ATTEMPTS.
* Remove codes aboutIXGBE_VFWRITE_REG.
* Remove some useless defines.
* Modify commit messages.
* Split some patch to two patches and Merge some patches to one patch.
* Update README.
* RebaseGuinan Sun (20):
net/ixgbe/base: toggle VF's Tx queuesnet/ixgbe/base: add support to clear VFMBMEMnet/ixgbe/base: fix host interface shadow RAM readnet/ixgbe/base: change flow for "Apply Update" commandnet/ixgbe/base: fix x550em 10G NIC link status reportnet/ixgbe/base: resolve infinite recursion on PCIe link downnet/ixgbe/base: added register definitions for NVM updatenet/ixgbe/base: cleanup spelling mistakes in commentsnet/ixgbe/base: remove whitespace in function commentsnet/ixgbe/base: move increments after evaluationsnet/ixgbe/base: create dedicated func to restart auto negonet/ixgbe/base: modify coding stylenet/ixgbe/base: remove unnecessary log message FC autonegonet/ixgbe/base: initialize data field in struct buffernet/ixgbe/base: improve log about autonego being disablednet/ixgbe/base: add ipv6 mask for FDIR featurenet/ixgbe/base: remove default advertising for x550 2.5G/5Gnet/ixgbe/base: check host interface return statusnet/ixgbe/base: cleanup pre-processor tagsnet/ixgbe/base: update versiondrivers/net/ixgbe/base/README | 2 +- drivers/net/ixgbe/base/ixgbe_82598.c | 238 ++--- drivers/net/ixgbe/base/ixgbe_82599.c | 397 ++++---- drivers/net/ixgbe/base/ixgbe_api.c | 879 ++++++++--------- drivers/net/ixgbe/base/ixgbe_api.h | 1 + drivers/net/ixgbe/base/ixgbe_common.c | 1110 +++++++++++----------- drivers/net/ixgbe/base/ixgbe_common.h | 3 +- drivers/net/ixgbe/base/ixgbe_dcb.c | 6 +- drivers/net/ixgbe/base/ixgbe_dcb_82598.c | 2 +- drivers/net/ixgbe/base/ixgbe_dcb_82599.c | 2 +- drivers/net/ixgbe/base/ixgbe_hv_vf.c | 20 +- drivers/net/ixgbe/base/ixgbe_mbx.c | 285 +++--- drivers/net/ixgbe/base/ixgbe_mbx.h | 1 + drivers/net/ixgbe/base/ixgbe_phy.c | 488 +++++----- drivers/net/ixgbe/base/ixgbe_phy.h | 3 +- drivers/net/ixgbe/base/ixgbe_type.h | 26 +- drivers/net/ixgbe/base/ixgbe_vf.c | 170 ++-- drivers/net/ixgbe/base/ixgbe_x540.c | 190 ++-- drivers/net/ixgbe/base/ixgbe_x550.c | 527 +++++----- 19 files changed, 2218 insertions(+), 2132 deletions(-)
Quoted 2 lines
--
2.17.1
Applied to dpdk-next-net-intel.
Thanks
Qi
v3 cover update ixgbe base code
In reply to Guinan Sunsource code of ixgbe driver:
not-released-cid-ixgbe.2020.06.09.tar.gz released by the team which develop basic drivers for any ixgbe NIC.
changelog in ND share repo:
From 66d7da32d8e8 ("ixgbe-shared: Add support to clear VFMBMEM and toggle VF's TX queues") To 7f2d73c9742b ("ixgbe-shared: check Host Interface Return Status for Shadow RAM Write command for X550")
66d7da32d8e8 is ignore as no use in this release.
---
v3:
* Modify hardcode.
* Remove patch "toggle VF's Tx queues"
* Remove patch "add support to clear VFMBMEM"
* Split patch into two.
v2:
* Remove codes about IXGBE_NVMUPD_SUPPORT.
* Remove codes about PREBOOT_SUPPORT.
* Remove codes about IXGBE_SFP_DETECT_RETRIES.
* Remove codes about IXGBE_EEPROM_GRANT_ATTEMPTS.
* Remove codes about IXGBE_VFWRITE_REG.
* Remove some useless defines.
* Modify commit messages.
* Split some patch to two patches and Merge some patches to one patch.
* Update README.
Guinan Sun (19):
net/ixgbe/base: fix host interface shadow RAM read net/ixgbe/base: change flow for "Apply Update" command net/ixgbe/base: fix x550em 10G NIC link status report net/ixgbe/base: resolve infinite recursion on PCIe link down net/ixgbe/base: added register definitions for NVM update net/ixgbe/base: cleanup spelling mistakes in comments net/ixgbe/base: remove whitespace in function comments net/ixgbe/base: move increments after evaluations net/ixgbe/base: create dedicated func to restart auto nego net/ixgbe/base: add typecast for type mismatch net/ixgbe/base: remove unnecessary return value check net/ixgbe/base: remove unnecessary log message FC autonego net/ixgbe/base: initialize data field in struct buffer net/ixgbe/base: improve log about autonego being disabled net/ixgbe/base: add ipv6 mask for FDIR feature net/ixgbe/base: remove default advertising for x550 2.5G/5G net/ixgbe/base: check host interface return status net/ixgbe/base: cleanup pre-processor tags net/ixgbe/base: update version
drivers/net/ixgbe/base/README | 2 +- drivers/net/ixgbe/base/ixgbe_82598.c | 238 ++--- drivers/net/ixgbe/base/ixgbe_82599.c | 397 ++++---- drivers/net/ixgbe/base/ixgbe_api.c | 866 +++++++++--------- drivers/net/ixgbe/base/ixgbe_common.c | 1055 +++++++++++----------- drivers/net/ixgbe/base/ixgbe_common.h | 2 +- drivers/net/ixgbe/base/ixgbe_dcb.c | 6 +- drivers/net/ixgbe/base/ixgbe_dcb_82598.c | 2 +- drivers/net/ixgbe/base/ixgbe_dcb_82599.c | 2 +- drivers/net/ixgbe/base/ixgbe_hv_vf.c | 20 +- drivers/net/ixgbe/base/ixgbe_mbx.c | 242 ++--- drivers/net/ixgbe/base/ixgbe_phy.c | 488 +++++----- drivers/net/ixgbe/base/ixgbe_phy.h | 3 +- drivers/net/ixgbe/base/ixgbe_type.h | 24 +- drivers/net/ixgbe/base/ixgbe_vf.c | 170 ++-- drivers/net/ixgbe/base/ixgbe_x540.c | 190 ++-- drivers/net/ixgbe/base/ixgbe_x550.c | 527 ++++++----- 17 files changed, 2102 insertions(+), 2132 deletions(-)
Signature · 1 line
2.17.1
PATCH v3 1/19 net/ixgbe/base: fix host interface shadow RAM read
Host interface Shadow RAM Read (0x31) command response buffer length should be stored in two bytes, instead of one byte. This patch fixes it.
--- drivers/net/ixgbe/base/ixgbe_common.c | 3 ++- drivers/net/ixgbe/base/ixgbe_type.h | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-)
drivers/net/ixgbe/base/ixgbe_common.c +2 -1
@@ -4600,7 +4600,8 @@ s32 ixgbe_host_interface_command(struct ixgbe_hw *hw, u32 *buffer,* Read Flash command requires reading buffer length from * two byes instead of one byte */ -if (resp->cmd ==0x30 ) { +if (resp->cmd ==IXGBE_HOST_INTERFACE_FLASH_READ_CMD || + resp->cmd ==IXGBE_HOST_INTERFACE_SHADOW_RAM_READ_CMD ) {for (; bi < dword_len +2 ; bi++) { buffer[bi] =IXGBE_READ_REG_ARRAY (hw,IXGBE_FLEX_MNG , bi);
drivers/net/ixgbe/base/ixgbe_type.h +12 -0
@@ -4364,4 +4364,16 @@ struct ixgbe_hw {#define IXGBE_NW_MNG_IF_SEL_MDIO_PHY_ADD \ (0x1F << IXGBE_NW_MNG_IF_SEL_MDIO_PHY_ADD_SHIFT) +/* Code Command (Flash I/F Interface) */ +#define IXGBE_HOST_INTERFACE_FLASH_READ_CMD 0x30 +#define IXGBE_HOST_INTERFACE_SHADOW_RAM_READ_CMD 0x31 +#define IXGBE_HOST_INTERFACE_FLASH_WRITE_CMD 0x32 +#define IXGBE_HOST_INTERFACE_SHADOW_RAM_WRITE_CMD 0x33 +#define IXGBE_HOST_INTERFACE_FLASH_MODULE_UPDATE_CMD 0x34 +#define IXGBE_HOST_INTERFACE_FLASH_BLOCK_EREASE_CMD 0x35 +#define IXGBE_HOST_INTERFACE_SHADOW_RAM_DUMP_CMD 0x36 +#define IXGBE_HOST_INTERFACE_FLASH_INFO_CMD 0x37 +#define IXGBE_HOST_INTERFACE_APPLY_UPDATE_CMD 0x38 +#define IXGBE_HOST_INTERFACE_MASK_CMD 0x000000FF +#endif /* _IXGBE_TYPE_H_ */
Signature · 1 line
2.17.1
PATCH v3 2/19 net/ixgbe/base: change flow for "Apply Update" command
In reply to Guinan SunFor the "Apply Update" command the firmware does not given an response. For this command, success should be return.
--- drivers/net/ixgbe/base/ixgbe_common.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/net/ixgbe/base/ixgbe_common.c +8 -1
@@ -4528,11 +4528,18 @@ s32 ixgbe_hic_unlocked(struct ixgbe_hw *hw, u32 *buffer, u32 length,msec_delay (1 ); } +/* For each command except "Apply Update" perform +* status checks in the HICR registry. +*/ +if ((buffer[0 ] &IXGBE_HOST_INTERFACE_MASK_CMD ) == +IXGBE_HOST_INTERFACE_APPLY_UPDATE_CMD ) +return IXGBE_SUCCESS ; +/* Check command completion */ if ((timeout && i == timeout) || !(IXGBE_READ_REG (hw,IXGBE_HICR ) &IXGBE_HICR_SV )) {ERROR_REPORT1 (IXGBE_ERROR_CAUTION , -"Command has failed with no status valid.\n" ); +"Command has failed with no status valid.\n" );return IXGBE_ERR_HOST_INTERFACE_COMMAND ; }
Signature · 1 line
2.17.1
PATCH v3 3/19 net/ixgbe/base: fix x550em 10G NIC link status report
In reply to Guinan SunWith the NVM image for x550em XFI will not report the auto-negotiation feature correctly. The auto-negotiation should be "No" for supports and advertised items. At the same time update speed makes it support 1G and 10G.
--- drivers/net/ixgbe/base/ixgbe_x550.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/net/ixgbe/base/ixgbe_x550.c +7 -1
@@ -1891,7 +1891,14 @@ s32 ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw,else *speed =IXGBE_LINK_SPEED_10GB_FULL ; }else { + *autoneg = true; +switch (hw->phy.type) { +case ixgbe_phy_x550em_xfi: + *speed =IXGBE_LINK_SPEED_1GB_FULL | +IXGBE_LINK_SPEED_10GB_FULL ; + *autoneg = false; +break ;case ixgbe_phy_ext_1g_t:#ifdef PREBOOT_SUPPORT *speed =IXGBE_LINK_SPEED_1GB_FULL ;
@@ -1925,7 +1932,6 @@ s32 ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw,IXGBE_LINK_SPEED_1GB_FULL ;break ; } - *autoneg = true; }return IXGBE_SUCCESS ;
Signature · 1 line
2.17.1
PATCH v3 4/19 net/ixgbe/base: resolve infinite recursion on PCIe link down
In reply to Guinan SunIn some corner cases the functions ixgbe_clear_rar_generic and ixgbe_clear_vmdq_generic may call one another leading to infinite recursion.
When ixgbe_clear_vmdq_generic is called with IXGBE_CLEAR_VMDQ_ALL flag, it's going to clear MPSAR registers, and proceed to call ixgbe_clear_rar_generic, which in turn will clear the RAR registers, and recursively call back ixgbe_clear_vmdq_generic. Normally, the latter would detect that MPSAR registers have already been cleared and terminate the recursion.
However, when PCIe link is down, and before the driver has had the opportunity to shut itself down, all register reads return 0xFFFFFFFF, and all register writes fail silently. In such case, because ixgbe_clear_vmdq_generic blindly assumes that clearing MPSAR registers succeeded, it's going to always call ixgbe_clear_rar_generic, which in turn will always call back ixgbe_clear_vmdq_generic, creating inifinite recursion.
This patch re-reads MPSAR register values after they had been cleared. In case of PCIe link failure, the values read will be non-zero, which will terminate the recursion. On the other hand, under normal circumstances the value read from MPSAR registers is going to be equal to the value previously written, so this patch is expected not to cause any regressions.
--- drivers/net/ixgbe/base/ixgbe_common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/ixgbe/base/ixgbe_common.c +2 -2
@@ -3777,11 +3777,11 @@ s32 ixgbe_clear_vmdq_generic(struct ixgbe_hw *hw, u32 rar, u32 vmdq)if (vmdq ==IXGBE_CLEAR_VMDQ_ALL ) {if (mpsar_lo) {IXGBE_WRITE_REG (hw,IXGBE_MPSAR_LO (rar),0 ); - mpsar_lo =0 ; + mpsar_lo =IXGBE_READ_REG (hw,IXGBE_MPSAR_LO (rar)); }if (mpsar_hi) {IXGBE_WRITE_REG (hw,IXGBE_MPSAR_HI (rar),0 ); - mpsar_hi =0 ; + mpsar_hi =IXGBE_READ_REG (hw,IXGBE_MPSAR_HI (rar)); } }else if (vmdq <32 ) { mpsar_lo &= ~(1 << vmdq);
Signature · 1 line
2.17.1
PATCH v3 5/19 net/ixgbe/base: added register definitions for NVM update
In reply to Guinan SunAdded additional register for X550 and above device family.
--- drivers/net/ixgbe/base/ixgbe_type.h | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/ixgbe/base/ixgbe_type.h +2 -0
@@ -1082,8 +1082,10 @@ struct ixgbe_dmac_config {#define IXGBE_HSMC0R 0x15F04#define IXGBE_HSMC1R 0x15F08#define IXGBE_SWSR 0x15F10 +#define IXGBE_FWRESETCNT 0x15F40#define IXGBE_HFDR 0x15FE8#define IXGBE_FLEX_MNG 0x15800/* 0x15800 - 0x15EFC */ +#define IXGBE_FLEX_MNG_PTR (_i) (IXGBE_FLEX_MNG + ((_i) * 4))#define IXGBE_HICR_EN 0x01/* Enable bit - RO */ /* Driver sets this bit when done to put command in RAM */
Signature · 1 line
2.17.1
PATCH v3 6/19 net/ixgbe/base: cleanup spelling mistakes in comments
In reply to Guinan SunSeveral functions in the driver code have a weird function comment formatting which uses two spaces instead of only one space for the main function body.
This formatting will be mechanically fixed by sed in a future patch, but doing so leads to some checkpatch.pl warnings on that patch. Cleanup the spelling mistakes that will be detected first. This way, it is easier to verify the mechanical transformation done by sed in the following patch.
--- drivers/net/ixgbe/base/ixgbe_mbx.c | 4 ++-- drivers/net/ixgbe/base/ixgbe_vf.c | 2 +- drivers/net/ixgbe/base/ixgbe_x550.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/net/ixgbe/base/ixgbe_mbx.c +2 -2
@@ -150,11 +150,11 @@ STATIC s32 ixgbe_poll_for_msg(struct ixgbe_hw *hw, u16 mbx_id) }/** -* ixgbe_poll_for_ack - Wait for message acknowledgement +* ixgbe_poll_for_ack - Wait for message acknowledgment * @hw: pointer to the HW structure * @mbx_id: id of mailbox to write * -* returns SUCCESS if it successfully received a message acknowledgement +* returns SUCCESS if it successfully received a message acknowledgment **/ STATIC s32 ixgbe_poll_for_ack(struct ixgbe_hw *hw, u16 mbx_id) {
drivers/net/ixgbe/base/ixgbe_vf.c +1 -1
@@ -142,7 +142,7 @@ s32 ixgbe_init_hw_vf(struct ixgbe_hw *hw)* ixgbe_reset_hw_vf - Performs hardware reset * @hw: pointer to hardware structure * -* Resets the hardware by reseting the transmit and receive units, masks and +* Resets the hardware by resetting the transmit and receive units, masks and * clears all interrupts. **/ s32 ixgbe_reset_hw_vf (struct ixgbe_hw *hw)
drivers/net/ixgbe/base/ixgbe_x550.c +1 -1
@@ -1034,7 +1034,7 @@ void ixgbe_set_source_address_pruning_X550(struct ixgbe_hw *hw, bool enable, }/** -* ixgbe_set_ethertype_anti_spoofing_X550 - Enable/Disable Ethertype anti-spoofing +* ixgbe_set_ethertype_anti_spoofing_X550 - Configure Ethertype anti-spoofing * @hw: pointer to hardware structure * @enable: enable or disable switch for Ethertype anti-spoofing * @vf: Virtual Function pool - VF Pool to set for Ethertype anti-spoofing
Signature · 1 line
2.17.1
PATCH v3 7/19 net/ixgbe/base: remove whitespace in function comments
In reply to Guinan SunRemove unnecessary extra whitespace on all function comments, replacing ' * ' with ' * '.
This was done automatically via sed using the following transformation:
sed 's/^ \* / * /'
--- drivers/net/ixgbe/base/ixgbe_82598.c | 238 +++--- drivers/net/ixgbe/base/ixgbe_82599.c | 384 +++++----- drivers/net/ixgbe/base/ixgbe_api.c | 866 ++++++++++----------- drivers/net/ixgbe/base/ixgbe_common.c | 1016 ++++++++++++------------- drivers/net/ixgbe/base/ixgbe_dcb.c | 6 +- drivers/net/ixgbe/base/ixgbe_hv_vf.c | 20 +- drivers/net/ixgbe/base/ixgbe_mbx.c | 242 +++--- drivers/net/ixgbe/base/ixgbe_phy.c | 394 +++++----- drivers/net/ixgbe/base/ixgbe_vf.c | 166 ++-- drivers/net/ixgbe/base/ixgbe_x540.c | 188 ++--- drivers/net/ixgbe/base/ixgbe_x550.c | 480 ++++++------ 11 files changed, 2000 insertions(+), 2000 deletions(-)
drivers/net/ixgbe/base/ixgbe_82598.c +119 -119
@@ -38,14 +38,14 @@ STATIC void ixgbe_set_rxpba_82598(struct ixgbe_hw *hw, int num_pb, STATIC s32 ixgbe_read_i2c_sff8472_82598(struct ixgbe_hw *hw, u8 byte_offset,u8 *sff8472_data);/** -* ixgbe_set_pcie_completion_timeout - set pci-e completion timeout -* @hw: pointer to the HW structure +* ixgbe_set_pcie_completion_timeout - set pci-e completion timeout +* @hw: pointer to the HW structure * -* The defaults for 82598 should be in the range of 50us to 50ms, -* however the hardware default for these parts is 500us to 1ms which is less -* than the 10ms recommended by the pci-e spec. To address this we need to -* increase the value to either 10ms to 250ms for capability version 1 config, -* or 16ms to 55ms for version 2. +* The defaults for 82598 should be in the range of 50us to 50ms, +* however the hardware default for these parts is 500us to 1ms which is less +* than the 10ms recommended by the pci-e spec. To address this we need to +* increase the value to either 10ms to 250ms for capability version 1 config, +* or 16ms to 55ms for version 2. **/ void ixgbe_set_pcie_completion_timeout (struct ixgbe_hw *hw) {
@@ -80,11 +80,11 @@ void ixgbe_set_pcie_completion_timeout(struct ixgbe_hw *hw) }/** -* ixgbe_init_ops_82598 - Inits func ptrs and MAC type -* @hw: pointer to hardware structure +* ixgbe_init_ops_82598 - Inits func ptrs and MAC type +* @hw: pointer to hardware structure * -* Initialize the function pointers and assign the MAC type for 82598. -* Does not touch the hardware. +* Initialize the function pointers and assign the MAC type for 82598. +* Does not touch the hardware. **/ s32 ixgbe_init_ops_82598 (struct ixgbe_hw *hw) {
@@ -150,12 +150,12 @@ s32 ixgbe_init_ops_82598(struct ixgbe_hw *hw) }/** -* ixgbe_init_phy_ops_82598 - PHY/SFP specific init -* @hw: pointer to hardware structure +* ixgbe_init_phy_ops_82598 - PHY/SFP specific init +* @hw: pointer to hardware structure * -* Initialize any function pointers that were not able to be -* set during init_shared_code because the PHY/SFP type was -* not known. Perform the SFP init if necessary. +* Initialize any function pointers that were not able to be +* set during init_shared_code because the PHY/SFP type was +* not known. Perform the SFP init if necessary. * **/ s32 ixgbe_init_phy_ops_82598 (struct ixgbe_hw *hw)
@@ -214,11 +214,11 @@ s32 ixgbe_init_phy_ops_82598(struct ixgbe_hw *hw) }/** -* ixgbe_start_hw_82598 - Prepare hardware for Tx/Rx -* @hw: pointer to hardware structure +* ixgbe_start_hw_82598 - Prepare hardware for Tx/Rx +* @hw: pointer to hardware structure * -* Starts the hardware using the generic start_hw function. -* Disables relaxed ordering Then set pcie completion timeout +* Starts the hardware using the generic start_hw function. +* Disables relaxed ordering Then set pcie completion timeout * **/ s32 ixgbe_start_hw_82598 (struct ixgbe_hw *hw)
@@ -256,12 +256,12 @@ s32 ixgbe_start_hw_82598(struct ixgbe_hw *hw) }/** -* ixgbe_get_link_capabilities_82598 - Determines link capabilities -* @hw: pointer to hardware structure -* @speed: pointer to link speed -* @autoneg: boolean auto-negotiation value +* ixgbe_get_link_capabilities_82598 - Determines link capabilities +* @hw: pointer to hardware structure +* @speed: pointer to link speed +* @autoneg: boolean auto-negotiation value * -* Determines the link capabilities by reading the AUTOC register. +* Determines the link capabilities by reading the AUTOC register. **/ STATIC s32 ixgbe_get_link_capabilities_82598(struct ixgbe_hw *hw, ixgbe_link_speed *speed,
@@ -317,10 +317,10 @@ STATIC s32 ixgbe_get_link_capabilities_82598(struct ixgbe_hw *hw, }/** -* ixgbe_get_media_type_82598 - Determines media type -* @hw: pointer to hardware structure +* ixgbe_get_media_type_82598 - Determines media type +* @hw: pointer to hardware structure * -* Returns the media type (fiber, copper, backplane) +* Returns the media type (fiber, copper, backplane) **/ STATIC enum ixgbe_media_type ixgbe_get_media_type_82598(struct ixgbe_hw *hw) {
@@ -370,10 +370,10 @@ STATIC enum ixgbe_media_type ixgbe_get_media_type_82598(struct ixgbe_hw *hw) }/** -* ixgbe_fc_enable_82598 - Enable flow control -* @hw: pointer to hardware structure +* ixgbe_fc_enable_82598 - Enable flow control +* @hw: pointer to hardware structure * -* Enable flow control according to the current settings. +* Enable flow control according to the current settings. **/ s32 ixgbe_fc_enable_82598 (struct ixgbe_hw *hw) {
@@ -517,12 +517,12 @@ s32 ixgbe_fc_enable_82598(struct ixgbe_hw *hw) }/** -* ixgbe_start_mac_link_82598 - Configures MAC link settings -* @hw: pointer to hardware structure -* @autoneg_wait_to_complete: true when waiting for completion is needed +* ixgbe_start_mac_link_82598 - Configures MAC link settings +* @hw: pointer to hardware structure +* @autoneg_wait_to_complete: true when waiting for completion is needed * -* Configures link settings based on values in the ixgbe_hw struct. -* Restarts the link. Performs autonegotiation if needed. +* Configures link settings based on values in the ixgbe_hw struct. +* Restarts the link. Performs autonegotiation if needed. **/ STATIC s32 ixgbe_start_mac_link_82598(struct ixgbe_hw *hw,bool autoneg_wait_to_complete)
@@ -566,11 +566,11 @@ STATIC s32 ixgbe_start_mac_link_82598(struct ixgbe_hw *hw, }/** -* ixgbe_validate_link_ready - Function looks for phy link -* @hw: pointer to hardware structure +* ixgbe_validate_link_ready - Function looks for phy link +* @hw: pointer to hardware structure * -* Function indicates success when phy link is available. If phy is not ready -* within 5 seconds of MAC indicating link, the function returns error. +* Function indicates success when phy link is available. If phy is not ready +* within 5 seconds of MAC indicating link, the function returns error. **/ STATIC s32 ixgbe_validate_link_ready(struct ixgbe_hw *hw) {
@@ -601,13 +601,13 @@ STATIC s32 ixgbe_validate_link_ready(struct ixgbe_hw *hw) }/** -* ixgbe_check_mac_link_82598 - Get link/speed status -* @hw: pointer to hardware structure -* @speed: pointer to link speed -* @link_up: true is link is up, false otherwise -* @link_up_wait_to_complete: bool used to wait for link up or not +* ixgbe_check_mac_link_82598 - Get link/speed status +* @hw: pointer to hardware structure +* @speed: pointer to link speed +* @link_up: true is link is up, false otherwise +* @link_up_wait_to_complete: bool used to wait for link up or not * -* Reads the links register to determine if link is up and the current speed +* Reads the links register to determine if link is up and the current speed **/ STATIC s32 ixgbe_check_mac_link_82598(struct ixgbe_hw *hw, ixgbe_link_speed *speed, bool *link_up,
@@ -691,12 +691,12 @@ STATIC s32 ixgbe_check_mac_link_82598(struct ixgbe_hw *hw, }/** -* ixgbe_setup_mac_link_82598 - Set MAC link speed -* @hw: pointer to hardware structure -* @speed: new link speed -* @autoneg_wait_to_complete: true when waiting for completion is needed +* ixgbe_setup_mac_link_82598 - Set MAC link speed +* @hw: pointer to hardware structure +* @speed: new link speed +* @autoneg_wait_to_complete: true when waiting for completion is needed * -* Set the link speed in the AUTOC register and restarts link. +* Set the link speed in the AUTOC register and restarts link. **/ STATIC s32 ixgbe_setup_mac_link_82598(struct ixgbe_hw *hw, ixgbe_link_speed speed,
@@ -745,12 +745,12 @@ STATIC s32 ixgbe_setup_mac_link_82598(struct ixgbe_hw *hw,/** -* ixgbe_setup_copper_link_82598 - Set the PHY autoneg advertised field -* @hw: pointer to hardware structure -* @speed: new link speed -* @autoneg_wait_to_complete: true if waiting is needed to complete +* ixgbe_setup_copper_link_82598 - Set the PHY autoneg advertised field +* @hw: pointer to hardware structure +* @speed: new link speed +* @autoneg_wait_to_complete: true if waiting is needed to complete * -* Sets the link speed in the AUTOC register in the MAC and restarts link. +* Sets the link speed in the AUTOC register in the MAC and restarts link. **/ STATIC s32 ixgbe_setup_copper_link_82598(struct ixgbe_hw *hw, ixgbe_link_speed speed,
@@ -770,12 +770,12 @@ STATIC s32 ixgbe_setup_copper_link_82598(struct ixgbe_hw *hw, }/** -* ixgbe_reset_hw_82598 - Performs hardware reset -* @hw: pointer to hardware structure +* ixgbe_reset_hw_82598 - Performs hardware reset +* @hw: pointer to hardware structure * -* Resets the hardware by resetting the transmit and receive units, masks and -* clears all interrupts, performing a PHY reset, and performing a link (MAC) -* reset. +* Resets the hardware by resetting the transmit and receive units, masks and +* clears all interrupts, performing a PHY reset, and performing a link (MAC) +* reset. **/ STATIC s32 ixgbe_reset_hw_82598(struct ixgbe_hw *hw) {
@@ -908,10 +908,10 @@ STATIC s32 ixgbe_reset_hw_82598(struct ixgbe_hw *hw) }/** -* ixgbe_set_vmdq_82598 - Associate a VMDq set index with a rx address -* @hw: pointer to hardware struct -* @rar: receive address register index to associate with a VMDq index -* @vmdq: VMDq set index +* ixgbe_set_vmdq_82598 - Associate a VMDq set index with a rx address +* @hw: pointer to hardware struct +* @rar: receive address register index to associate with a VMDq index +* @vmdq: VMDq set index **/ s32 ixgbe_set_vmdq_82598 (struct ixgbe_hw *hw,u32 rar,u32 vmdq) {
@@ -934,10 +934,10 @@ s32 ixgbe_set_vmdq_82598(struct ixgbe_hw *hw, u32 rar, u32 vmdq) }/** -* ixgbe_clear_vmdq_82598 - Disassociate a VMDq set index from an rx address -* @hw: pointer to hardware struct -* @rar: receive address register index to associate with a VMDq index -* @vmdq: VMDq clear index (not used in 82598, but elsewhere) +* ixgbe_clear_vmdq_82598 - Disassociate a VMDq set index from an rx address +* @hw: pointer to hardware struct +* @rar: receive address register index to associate with a VMDq index +* @vmdq: VMDq clear index (not used in 82598, but elsewhere) **/ STATIC s32 ixgbe_clear_vmdq_82598(struct ixgbe_hw *hw, u32 rar, u32 vmdq) {
@@ -962,14 +962,14 @@ STATIC s32 ixgbe_clear_vmdq_82598(struct ixgbe_hw *hw, u32 rar, u32 vmdq) }/** -* ixgbe_set_vfta_82598 - Set VLAN filter table -* @hw: pointer to hardware structure -* @vlan: VLAN id to write to VLAN filter -* @vind: VMDq output index that maps queue to VLAN id in VFTA -* @vlan_on: boolean flag to turn on/off VLAN in VFTA -* @vlvf_bypass: boolean flag - unused +* ixgbe_set_vfta_82598 - Set VLAN filter table +* @hw: pointer to hardware structure +* @vlan: VLAN id to write to VLAN filter +* @vind: VMDq output index that maps queue to VLAN id in VFTA +* @vlan_on: boolean flag to turn on/off VLAN in VFTA +* @vlvf_bypass: boolean flag - unused * -* Turn on/off specified VLAN in the VLAN filter table. +* Turn on/off specified VLAN in the VLAN filter table. **/ s32 ixgbe_set_vfta_82598 (struct ixgbe_hw *hw,u32 vlan,u32 vind,bool vlan_on,bool vlvf_bypass)
@@ -1015,10 +1015,10 @@ s32 ixgbe_set_vfta_82598(struct ixgbe_hw *hw, u32 vlan, u32 vind, }/** -* ixgbe_clear_vfta_82598 - Clear VLAN filter table -* @hw: pointer to hardware structure +* ixgbe_clear_vfta_82598 - Clear VLAN filter table +* @hw: pointer to hardware structure * -* Clears the VLAN filer table, and the VMDq index associated with the filter +* Clears the VLAN filer table, and the VMDq index associated with the filter **/ STATIC s32 ixgbe_clear_vfta_82598(struct ixgbe_hw *hw) {
@@ -1039,12 +1039,12 @@ STATIC s32 ixgbe_clear_vfta_82598(struct ixgbe_hw *hw) }/** -* ixgbe_read_analog_reg8_82598 - Reads 8 bit Atlas analog register -* @hw: pointer to hardware structure -* @reg: analog register to read -* @val: read value +* ixgbe_read_analog_reg8_82598 - Reads 8 bit Atlas analog register +* @hw: pointer to hardware structure +* @reg: analog register to read +* @val: read value * -* Performs read operation to Atlas analog register specified. +* Performs read operation to Atlas analog register specified. **/ s32 ixgbe_read_analog_reg8_82598 (struct ixgbe_hw *hw,u32 reg,u8 *val) {
@@ -1063,12 +1063,12 @@ s32 ixgbe_read_analog_reg8_82598(struct ixgbe_hw *hw, u32 reg, u8 *val) }/** -* ixgbe_write_analog_reg8_82598 - Writes 8 bit Atlas analog register -* @hw: pointer to hardware structure -* @reg: atlas register to write -* @val: value to write +* ixgbe_write_analog_reg8_82598 - Writes 8 bit Atlas analog register +* @hw: pointer to hardware structure +* @reg: atlas register to write +* @val: value to write * -* Performs write operation to Atlas analog register specified. +* Performs write operation to Atlas analog register specified. **/ s32 ixgbe_write_analog_reg8_82598 (struct ixgbe_hw *hw,u32 reg,u8 val) {
@@ -1085,13 +1085,13 @@ s32 ixgbe_write_analog_reg8_82598(struct ixgbe_hw *hw, u32 reg, u8 val) }/** -* ixgbe_read_i2c_phy_82598 - Reads 8 bit word over I2C interface. -* @hw: pointer to hardware structure -* @dev_addr: address to read from -* @byte_offset: byte offset to read from dev_addr -* @eeprom_data: value read +* ixgbe_read_i2c_phy_82598 - Reads 8 bit word over I2C interface. +* @hw: pointer to hardware structure +* @dev_addr: address to read from +* @byte_offset: byte offset to read from dev_addr +* @eeprom_data: value read * -* Performs 8 byte read operation to SFP module's EEPROM over I2C interface. +* Performs 8 byte read operation to SFP module's EEPROM over I2C interface. **/ STATIC s32 ixgbe_read_i2c_phy_82598(struct ixgbe_hw *hw, u8 dev_addr,u8 byte_offset,u8 *eeprom_data)
@@ -1159,12 +1159,12 @@ STATIC s32 ixgbe_read_i2c_phy_82598(struct ixgbe_hw *hw, u8 dev_addr, }/** -* ixgbe_read_i2c_eeprom_82598 - Reads 8 bit word over I2C interface. -* @hw: pointer to hardware structure -* @byte_offset: EEPROM byte offset to read -* @eeprom_data: value read +* ixgbe_read_i2c_eeprom_82598 - Reads 8 bit word over I2C interface. +* @hw: pointer to hardware structure +* @byte_offset: EEPROM byte offset to read +* @eeprom_data: value read * -* Performs 8 byte read operation to SFP module's EEPROM over I2C interface. +* Performs 8 byte read operation to SFP module's EEPROM over I2C interface. **/ s32 ixgbe_read_i2c_eeprom_82598 (struct ixgbe_hw *hw,u8 byte_offset,u8 *eeprom_data)
@@ -1174,12 +1174,12 @@ s32 ixgbe_read_i2c_eeprom_82598(struct ixgbe_hw *hw, u8 byte_offset, }/** -* ixgbe_read_i2c_sff8472_82598 - Reads 8 bit word over I2C interface. -* @hw: pointer to hardware structure -* @byte_offset: byte offset at address 0xA2 -* @sff8472_data: value read +* ixgbe_read_i2c_sff8472_82598 - Reads 8 bit word over I2C interface. +* @hw: pointer to hardware structure +* @byte_offset: byte offset at address 0xA2 +* @sff8472_data: value read * -* Performs 8 byte read operation to SFP module's SFF-8472 data over I2C +* Performs 8 byte read operation to SFP module's SFF-8472 data over I2C **/ STATIC s32 ixgbe_read_i2c_sff8472_82598(struct ixgbe_hw *hw, u8 byte_offset,u8 *sff8472_data)
@@ -1189,10 +1189,10 @@ STATIC s32 ixgbe_read_i2c_sff8472_82598(struct ixgbe_hw *hw, u8 byte_offset, }/** -* ixgbe_get_supported_physical_layer_82598 - Returns physical layer type -* @hw: pointer to hardware structure +* ixgbe_get_supported_physical_layer_82598 - Returns physical layer type +* @hw: pointer to hardware structure * -* Determines physical layer capabilities of the current configuration. +* Determines physical layer capabilities of the current configuration. **/ u64 ixgbe_get_supported_physical_layer_82598 (struct ixgbe_hw *hw) {
@@ -1291,12 +1291,12 @@ u64 ixgbe_get_supported_physical_layer_82598(struct ixgbe_hw *hw) }/** -* ixgbe_set_lan_id_multi_port_pcie_82598 - Set LAN id for PCIe multiple -* port devices. -* @hw: pointer to the HW structure +* ixgbe_set_lan_id_multi_port_pcie_82598 - Set LAN id for PCIe multiple +* port devices. +* @hw: pointer to the HW structure * -* Calls common function and corrects issue with some single port devices -* that enable LAN1 but not LAN0. +* Calls common function and corrects issue with some single port devices +* that enable LAN1 but not LAN0. **/ void ixgbe_set_lan_id_multi_port_pcie_82598 (struct ixgbe_hw *hw) {
@@ -1325,8 +1325,8 @@ void ixgbe_set_lan_id_multi_port_pcie_82598(struct ixgbe_hw *hw) }/** -* ixgbe_enable_relaxed_ordering_82598 - enable relaxed ordering -* @hw: pointer to hardware structure +* ixgbe_enable_relaxed_ordering_82598 - enable relaxed ordering +* @hw: pointer to hardware structure * **/ void ixgbe_enable_relaxed_ordering_82598 (struct ixgbe_hw *hw)
@@ -1395,11 +1395,11 @@ STATIC void ixgbe_set_rxpba_82598(struct ixgbe_hw *hw, int num_pb, }/** -* ixgbe_enable_rx_dma_82598 - Enable the Rx DMA unit -* @hw: pointer to hardware structure -* @regval: register value to write to RXCTRL +* ixgbe_enable_rx_dma_82598 - Enable the Rx DMA unit +* @hw: pointer to hardware structure +* @regval: register value to write to RXCTRL * -* Enables the Rx DMA unit +* Enables the Rx DMA unit **/ s32 ixgbe_enable_rx_dma_82598 (struct ixgbe_hw *hw,u32 regval) {
drivers/net/ixgbe/base/ixgbe_82599.c +192 -192
653 lines not on this page · raw message
drivers/net/ixgbe/base/ixgbe_api.c +433 -433
1,519 lines not on this page · raw message
drivers/net/ixgbe/base/ixgbe_common.c +508 -508
411 lines not on this page · raw message
drivers/net/ixgbe/base/ixgbe_mbx.c +121 -121
242 lines not on this page · raw message
drivers/net/ixgbe/base/ixgbe_phy.c +197 -197
394 lines not on this page · raw message
drivers/net/ixgbe/base/ixgbe_vf.c +83 -83
166 lines not on this page · raw message
drivers/net/ixgbe/base/ixgbe_x540.c +94 -94
188 lines not on this page · raw message
drivers/net/ixgbe/base/ixgbe_x550.c +240 -240
480 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.17.1
Part of the diff is not shown here. View the raw message.
PATCH v3 8/19 net/ixgbe/base: move increments after evaluations
In reply to Guinan SunThe retry variable was being incremented before it was evaluated by the subsequent conditional against the maximum retries to figure out which message to print. So we'll move the increment op to the end.
--- drivers/net/ixgbe/base/ixgbe_phy.c | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-)
drivers/net/ixgbe/base/ixgbe_phy.c +8 -9
@@ -138,12 +138,12 @@ s32 ixgbe_read_i2c_combined_generic_int(struct ixgbe_hw *hw, u8 addr, u16 reg,ixgbe_i2c_bus_clear (hw);if (lock) hw->mac.ops.release_swfw_sync (hw, swfw_mask); - retry++;if (retry < max_retry)DEBUGOUT ("I2C byte read combined error - Retrying.\n" );else DEBUGOUT ("I2C byte read combined error.\n" ); - }while (retry < max_retry); + retry++; + }while (retry <= max_retry);return IXGBE_ERR_I2C ; }
@@ -203,12 +203,12 @@ s32 ixgbe_write_i2c_combined_generic_int(struct ixgbe_hw *hw, u8 addr, u16 reg,ixgbe_i2c_bus_clear (hw);if (lock) hw->mac.ops.release_swfw_sync (hw, swfw_mask); - retry++;if (retry < max_retry)DEBUGOUT ("I2C byte write combined error - Retrying.\n" );else DEBUGOUT ("I2C byte write combined error.\n" ); - }while (retry < max_retry); + retry++; + }while (retry <= max_retry);return IXGBE_ERR_I2C ; }
@@ -2057,13 +2057,12 @@ STATIC s32 ixgbe_read_i2c_byte_generic_int(struct ixgbe_hw *hw, u8 byte_offset, hw->mac.ops.release_swfw_sync (hw, swfw_mask);msec_delay (100 ); } - retry++;if (retry < max_retry)DEBUGOUT ("I2C byte read error - Retrying.\n" );else DEBUGOUT ("I2C byte read error.\n" ); - - }while (retry < max_retry); + retry++; + }while (retry <= max_retry);return status; }
@@ -2161,12 +2160,12 @@ STATIC s32 ixgbe_write_i2c_byte_generic_int(struct ixgbe_hw *hw, u8 byte_offset, fail:ixgbe_i2c_bus_clear (hw); - retry++;if (retry < max_retry)DEBUGOUT ("I2C byte write error - Retrying.\n" );else DEBUGOUT ("I2C byte write error.\n" ); - }while (retry < max_retry); + retry++; + }while (retry <= max_retry);if (lock) hw->mac.ops.release_swfw_sync (hw, swfw_mask);
Signature · 1 line
2.17.1
PATCH v3 9/19 net/ixgbe/base: create dedicated func to restart auto nego
In reply to Guinan SunThis patch is for restarting auto negotiation on PHY.
--- drivers/net/ixgbe/base/ixgbe_phy.c | 48 ++++++++++++++---------------- drivers/net/ixgbe/base/ixgbe_phy.h | 1 + 2 files changed, 23 insertions(+), 26 deletions(-)
drivers/net/ixgbe/base/ixgbe_phy.c +22 -26
@@ -542,6 +542,26 @@ s32 ixgbe_reset_phy_generic(struct ixgbe_hw *hw)return status; } +/** +* ixgbe_restart_auto_neg - Restart auto negotiation on the PHY +* @hw: pointer to hardware structure +**/ +void ixgbe_restart_auto_neg (struct ixgbe_hw *hw) +{ +u16 autoneg_reg; + +/* Check if PHY reset is blocked by MNG FW */ +if (ixgbe_check_reset_blocked (hw)) +return ; + +/* Restart PHY auto-negotiation. */ + hw->phy.ops.read_reg (hw,IXGBE_MDIO_AUTO_NEG_CONTROL , +IXGBE_MDIO_AUTO_NEG_DEV_TYPE , &autoneg_reg); + autoneg_reg |=IXGBE_MII_RESTART ; + hw->phy.ops.write_reg (hw,IXGBE_MDIO_AUTO_NEG_CONTROL , +IXGBE_MDIO_AUTO_NEG_DEV_TYPE , autoneg_reg); +} +/** * ixgbe_read_phy_mdi - Reads a value from a specified PHY register without * the SWFW lock
@@ -826,19 +846,7 @@ s32 ixgbe_setup_phy_link_generic(struct ixgbe_hw *hw)IXGBE_MDIO_AUTO_NEG_DEV_TYPE , autoneg_reg); -/* Blocked by MNG FW so don't reset PHY */ -if (ixgbe_check_reset_blocked (hw)) -return status; - -/* Restart PHY auto-negotiation. */ - hw->phy.ops.read_reg (hw,IXGBE_MDIO_AUTO_NEG_CONTROL , -IXGBE_MDIO_AUTO_NEG_DEV_TYPE , &autoneg_reg); - - autoneg_reg |=IXGBE_MII_RESTART ; - - hw->phy.ops.write_reg (hw,IXGBE_MDIO_AUTO_NEG_CONTROL , -IXGBE_MDIO_AUTO_NEG_DEV_TYPE , autoneg_reg); - +ixgbe_restart_auto_neg (hw);return status; }
@@ -1062,19 +1070,7 @@ s32 ixgbe_setup_phy_link_tnx(struct ixgbe_hw *hw) autoneg_reg); } -/* Blocked by MNG FW so don't reset PHY */ -if (ixgbe_check_reset_blocked (hw)) -return status; - -/* Restart PHY auto-negotiation. */ - hw->phy.ops.read_reg (hw,IXGBE_MDIO_AUTO_NEG_CONTROL , -IXGBE_MDIO_AUTO_NEG_DEV_TYPE , &autoneg_reg); - - autoneg_reg |=IXGBE_MII_RESTART ; - - hw->phy.ops.write_reg (hw,IXGBE_MDIO_AUTO_NEG_CONTROL , -IXGBE_MDIO_AUTO_NEG_DEV_TYPE , autoneg_reg); - +ixgbe_restart_auto_neg (hw);return status; }
drivers/net/ixgbe/base/ixgbe_phy.h +1 -0
@@ -133,6 +133,7 @@ enum ixgbe_phy_type ixgbe_get_phy_type_from_id(u32 phy_id);s32 ixgbe_get_phy_id (struct ixgbe_hw *hw);s32 ixgbe_identify_phy_generic (struct ixgbe_hw *hw);s32 ixgbe_reset_phy_generic (struct ixgbe_hw *hw); +void ixgbe_restart_auto_neg (struct ixgbe_hw *hw);s32 ixgbe_read_phy_reg_mdi (struct ixgbe_hw *hw,u32 reg_addr,u32 device_type,u16 *phy_data); s32 ixgbe_write_phy_reg_mdi(struct ixgbe_hw *hw, u32 reg_addr, u32 device_type,
Signature · 1 line
2.17.1
PATCH v3 10/19 net/ixgbe/base: add typecast for type mismatch
In reply to Guinan SunAdd typecast for type mismatch.
--- drivers/net/ixgbe/base/ixgbe_82599.c | 8 ++++---- drivers/net/ixgbe/base/ixgbe_common.c | 2 +- drivers/net/ixgbe/base/ixgbe_dcb_82598.c | 2 +- drivers/net/ixgbe/base/ixgbe_dcb_82599.c | 2 +- drivers/net/ixgbe/base/ixgbe_x550.c | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-)
drivers/net/ixgbe/base/ixgbe_82599.c +4 -4
@@ -1547,7 +1547,7 @@ void ixgbe_fdir_add_signature_filter_82599(struct ixgbe_hw *hw,* is for FDIRCMD. Then do a 64-bit register write from FDIRHASH. */ fdirhashcmd = (u64 )fdircmd <<32 ; - fdirhashcmd |=ixgbe_atr_compute_sig_hash_82599 (input, common); + fdirhashcmd |= (u64 )ixgbe_atr_compute_sig_hash_82599 (input, common);IXGBE_WRITE_REG64 (hw,IXGBE_FDIRHASH , fdirhashcmd);DEBUGOUT2 ("Tx Queue=%x hash=%x\n" , queue, (u32 )fdirhashcmd);
@@ -1636,7 +1636,7 @@ STATIC u32 ixgbe_get_fdirtcpm_82599(union ixgbe_atr_input *input_mask) {u32 mask =IXGBE_NTOHS (input_mask->formatted.dst_port); mask <<=IXGBE_FDIRTCPM_DPORTM_SHIFT ; - mask |=IXGBE_NTOHS (input_mask->formatted.src_port); + mask |= (u32 )IXGBE_NTOHS (input_mask->formatted.src_port); mask = ((mask &0x55555555 ) <<1 ) | ((mask &0xAAAAAAAA ) >>1 ); mask = ((mask &0x33333333 ) <<2 ) | ((mask &0xCCCCCCCC ) >>2 ); mask = ((mask &0x0F0F0F0F ) <<4 ) | ((mask &0xF0F0F0F0 ) >>4 );
@@ -1868,14 +1868,14 @@ s32 ixgbe_fdir_write_perfect_filter_82599(struct ixgbe_hw *hw,/* 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); + fdirport |= (u32 )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); fdirvlan <<=IXGBE_FDIRVLAN_FLEX_SHIFT ; - fdirvlan |=IXGBE_NTOHS (input->formatted.vlan_id); + fdirvlan |= (u32 )IXGBE_NTOHS (input->formatted.vlan_id);IXGBE_WRITE_REG (hw,IXGBE_FDIRVLAN , fdirvlan);if (cloud_mode) {
drivers/net/ixgbe/base/ixgbe_common.c +1 -1
@@ -738,7 +738,7 @@ s32 ixgbe_read_pba_num_generic(struct ixgbe_hw *hw, u32 *pba_num)DEBUGOUT ("NVM Read Error\n" );return ret_val; } - *pba_num |= data; + *pba_num |= (u32 )data;return IXGBE_SUCCESS ; }
drivers/net/ixgbe/base/ixgbe_dcb_82598.c +1 -1
@@ -167,7 +167,7 @@ s32 ixgbe_dcb_config_tx_desc_arbiter_82598(struct ixgbe_hw *hw,for (i =0 ; i <IXGBE_DCB_MAX_TRAFFIC_CLASS ; i++) { max_credits = max[i]; reg = max_credits <<IXGBE_TDTQ2TCCR_MCL_SHIFT ; - reg |= refill[i]; + reg |= (u32)(refill[i]); reg |= (u32)(bwg_id[i]) <<IXGBE_TDTQ2TCCR_BWG_SHIFT ;if (tsa[i] == ixgbe_dcb_tsa_group_strict_cee)
drivers/net/ixgbe/base/ixgbe_dcb_82599.c +1 -1
@@ -166,7 +166,7 @@ s32 ixgbe_dcb_config_tx_desc_arbiter_82599(struct ixgbe_hw *hw, u16 *refill,for (i =0 ; i <IXGBE_DCB_MAX_TRAFFIC_CLASS ; i++) { max_credits = max[i]; reg = max_credits <<IXGBE_RTTDT2C_MCL_SHIFT ; - reg |= refill[i]; + reg |= (u32)(refill[i]); reg |= (u32)(bwg_id[i]) <<IXGBE_RTTDT2C_BWG_SHIFT ;if (tsa[i] == ixgbe_dcb_tsa_group_strict_cee)
drivers/net/ixgbe/base/ixgbe_x550.c +1 -1
@@ -699,7 +699,7 @@ static s32 ixgbe_setup_fw_link(struct ixgbe_hw *hw)for (i =0 ; i <sizeof (ixgbe_fw_map) /sizeof (ixgbe_fw_map[0 ]); ++i) {if (hw->phy.autoneg_advertised & ixgbe_fw_map[i].phy_speed) - setup[0 ] |= ixgbe_fw_map[i].fw_speed; + setup[0 ] |= (u32)(ixgbe_fw_map[i].fw_speed); } setup[0 ] |=FW_PHY_ACT_SETUP_LINK_HP |FW_PHY_ACT_SETUP_LINK_AN ;
Signature · 1 line
2.17.1
PATCH v3 11/19 net/ixgbe/base: remove unnecessary return value check
In reply to Guinan SunRemove unnecessary return value check.
--- drivers/net/ixgbe/base/ixgbe_82599.c | 4 +--- drivers/net/ixgbe/base/ixgbe_common.c | 4 +--- drivers/net/ixgbe/base/ixgbe_common.h | 2 +- drivers/net/ixgbe/base/ixgbe_phy.c | 25 +++++++------------------ drivers/net/ixgbe/base/ixgbe_x540.c | 2 +- 5 files changed, 11 insertions(+), 26 deletions(-)
drivers/net/ixgbe/base/ixgbe_82599.c +1 -3
@@ -2093,9 +2093,7 @@ s32 ixgbe_start_hw_82599(struct ixgbe_hw *hw)if (ret_val !=IXGBE_SUCCESS ) goto out; - ret_val =ixgbe_start_hw_gen2 (hw); -if (ret_val !=IXGBE_SUCCESS ) - goto out; +ixgbe_start_hw_gen2 (hw);/* We need to run link autotry after the driver loads */ hw->mac.autotry_restart = true;
drivers/net/ixgbe/base/ixgbe_common.c +1 -3
@@ -421,7 +421,7 @@ s32 ixgbe_start_hw_generic(struct ixgbe_hw *hw)* 82599 * X540 **/ -s32 ixgbe_start_hw_gen2 (struct ixgbe_hw *hw) +void ixgbe_start_hw_gen2 (struct ixgbe_hw *hw) {u32 i;u32 regval;
@@ -446,8 +446,6 @@ s32 ixgbe_start_hw_gen2(struct ixgbe_hw *hw) IXGBE_DCA_RXCTRL_HEAD_WRO_EN);IXGBE_WRITE_REG (hw,IXGBE_DCA_RXCTRL (i), regval); } - -return IXGBE_SUCCESS ; }/**
drivers/net/ixgbe/base/ixgbe_common.h +1 -1
@@ -23,7 +23,7 @@ u16 ixgbe_get_pcie_msix_count_generic(struct ixgbe_hw *hw);s32 ixgbe_init_ops_generic (struct ixgbe_hw *hw);s32 ixgbe_init_hw_generic (struct ixgbe_hw *hw);s32 ixgbe_start_hw_generic (struct ixgbe_hw *hw); -s32 ixgbe_start_hw_gen2 (struct ixgbe_hw *hw); +void ixgbe_start_hw_gen2 (struct ixgbe_hw *hw);s32 ixgbe_clear_hw_cntrs_generic (struct ixgbe_hw *hw);s32 ixgbe_read_pba_num_generic (struct ixgbe_hw *hw,u32 *pba_num); s32 ixgbe_read_pba_string_generic(struct ixgbe_hw *hw, u8 *pba_num,
drivers/net/ixgbe/base/ixgbe_phy.c +7 -18
@@ -8,10 +8,10 @@ STATIC void ixgbe_i2c_start(struct ixgbe_hw *hw); STATIC void ixgbe_i2c_stop(struct ixgbe_hw *hw); -STATIC s32 ixgbe_clock_in_i2c_byte(struct ixgbe_hw *hw, u8 *data); +STATIC void ixgbe_clock_in_i2c_byte(struct ixgbe_hw *hw, u8 *data); STATIC s32 ixgbe_clock_out_i2c_byte(struct ixgbe_hw *hw, u8 data); STATIC s32 ixgbe_get_i2c_ack(struct ixgbe_hw *hw); -STATIC s32 ixgbe_clock_in_i2c_bit(struct ixgbe_hw *hw, bool *data); +STATIC void ixgbe_clock_in_i2c_bit(struct ixgbe_hw *hw, bool *data); STATIC s32 ixgbe_clock_out_i2c_bit(struct ixgbe_hw *hw, bool data); STATIC void ixgbe_raise_i2c_clk(struct ixgbe_hw *hw, u32 *i2cctl); STATIC void ixgbe_lower_i2c_clk(struct ixgbe_hw *hw, u32 *i2cctl);
@@ -46,11 +46,7 @@ STATIC s32 ixgbe_out_i2c_byte_ack(struct ixgbe_hw *hw, u8 byte)*/ STATIC s32 ixgbe_in_i2c_byte_ack(struct ixgbe_hw *hw, u8 *byte) { -s32 status; - - status =ixgbe_clock_in_i2c_byte (hw, byte); -if (status) -return status; +ixgbe_clock_in_i2c_byte (hw, byte);/* ACK */ return ixgbe_clock_out_i2c_bit (hw, false); }
@@ -123,8 +119,7 @@ s32 ixgbe_read_i2c_combined_generic_int(struct ixgbe_hw *hw, u8 addr, u16 reg,if (ixgbe_in_i2c_byte_ack (hw, &low_bits)) goto fail;/* Get csum */ -if (ixgbe_clock_in_i2c_byte (hw, &csum_byte)) - goto fail; +ixgbe_clock_in_i2c_byte (hw, &csum_byte);/* NACK */ if (ixgbe_clock_out_i2c_bit (hw, false)) goto fail;
@@ -2034,9 +2029,7 @@ STATIC s32 ixgbe_read_i2c_byte_generic_int(struct ixgbe_hw *hw, u8 byte_offset,if (status !=IXGBE_SUCCESS ) goto fail; - status =ixgbe_clock_in_i2c_byte (hw, data); -if (status !=IXGBE_SUCCESS ) - goto fail; +ixgbe_clock_in_i2c_byte (hw, data); status =ixgbe_clock_out_i2c_bit (hw, nack);if (status !=IXGBE_SUCCESS )
@@ -2281,7 +2274,7 @@ STATIC void ixgbe_i2c_stop(struct ixgbe_hw *hw)* * Clocks in one byte data via I2C data/clock **/ -STATIC s32 ixgbe_clock_in_i2c_byte(struct ixgbe_hw *hw, u8 *data) +STATIC void ixgbe_clock_in_i2c_byte(struct ixgbe_hw *hw, u8 *data) {s32 i;bool bit =0 ;
@@ -2293,8 +2286,6 @@ STATIC s32 ixgbe_clock_in_i2c_byte(struct ixgbe_hw *hw, u8 *data)ixgbe_clock_in_i2c_bit (hw, &bit); *data |= bit << i; } - -return IXGBE_SUCCESS ; }/**
@@ -2390,7 +2381,7 @@ STATIC s32 ixgbe_get_i2c_ack(struct ixgbe_hw *hw)* * Clocks in one bit via I2C data/clock **/ -STATIC s32 ixgbe_clock_in_i2c_bit(struct ixgbe_hw *hw, bool *data) +STATIC void 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);
@@ -2415,8 +2406,6 @@ STATIC s32 ixgbe_clock_in_i2c_bit(struct ixgbe_hw *hw, bool *data)/* Minimum low period of clock is 4.7 us */ usec_delay (IXGBE_I2C_T_LOW ); - -return IXGBE_SUCCESS ; }/**
drivers/net/ixgbe/base/ixgbe_x540.c +1 -1
@@ -288,7 +288,7 @@ s32 ixgbe_start_hw_X540(struct ixgbe_hw *hw)if (ret_val !=IXGBE_SUCCESS ) goto out; - ret_val =ixgbe_start_hw_gen2 (hw); +ixgbe_start_hw_gen2 (hw); out:return ret_val;
Signature · 1 line
2.17.1
PATCH v3 12/19 net/ixgbe/base: remove unnecessary log message FC autonego
In reply to Guinan SunThe function ixgbe_device_supports_autoneg_fc is checking whether a particular device and medium configuration is supporting Flow Control Autonegotiation. In case of non-support, the message is always logged which is confusing.
The fix is removing unnecessary log entry.
--- drivers/net/ixgbe/base/ixgbe_common.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/net/ixgbe/base/ixgbe_common.c +0 -4
@@ -186,10 +186,6 @@ bool ixgbe_device_supports_autoneg_fc(struct ixgbe_hw *hw)break ; } -if (!supported) -ERROR_REPORT2 (IXGBE_ERROR_UNSUPPORTED , -"Device %x does not support flow control autoneg" , - hw->device_id);return supported; }
Signature · 1 line
2.17.1
PATCH v3 13/19 net/ixgbe/base: initialize data field in struct buffer
In reply to Guinan SunWhile sending request using ixgbe_hic_unlocked() the data field in buffer struct is not used. It is set when the struct is overwritten by FW to deliver the response. To not pass random data to FW the whole structure should be zeroed before use.
--- drivers/net/ixgbe/base/ixgbe_x550.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/ixgbe/base/ixgbe_x550.c +2 -0
@@ -3126,6 +3126,7 @@ s32 ixgbe_read_ee_hostif_X550(struct ixgbe_hw *hw, u16 offset, u16 *data)/* one word */ buffer.length =IXGBE_CPU_TO_BE16 (sizeof (u16)); buffer.pad2 =0 ; + buffer.data =0 ; buffer.pad3 =0 ; status = hw->mac.ops.acquire_swfw_sync (hw, mask);
@@ -3186,6 +3187,7 @@ s32 ixgbe_read_ee_hostif_buffer_X550(struct ixgbe_hw *hw, buffer.address =IXGBE_CPU_TO_BE32 ((offset + current_word) *2 ); buffer.length =IXGBE_CPU_TO_BE16 (words_to_read *2 ); buffer.pad2 =0 ; + buffer.data =0 ; buffer.pad3 =0 ; status = ixgbe_hic_unlocked(hw, (u32 *)&buffer, sizeof(buffer),
Signature · 1 line
2.17.1
PATCH v3 14/19 net/ixgbe/base: improve log about autonego being disabled
In reply to Guinan SunOn ESXi OS, when user disables auto negotiation, the following log
appears: "(unsupported) Flow control autoneg is disabled". It is true that auto negotiation is disabled but it is not necessarily true that it is not supported.
--- drivers/net/ixgbe/base/ixgbe_common.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/net/ixgbe/base/ixgbe_common.c +3 -2
@@ -3076,8 +3076,9 @@ void ixgbe_fc_autoneg(struct ixgbe_hw *hw)* - link is not up. */ if (hw->fc.disable_fc_autoneg) { -ERROR_REPORT1 (IXGBE_ERROR_UNSUPPORTED , -"Flow control autoneg is disabled" ); +/* TODO: This should be just an informative log */ +ERROR_REPORT1 (IXGBE_ERROR_CAUTION , +"Flow control autoneg is disabled" ); goto out; }
Signature · 1 line
2.17.1
PATCH v3 15/19 net/ixgbe/base: add ipv6 mask for FDIR feature
In reply to Guinan SunWrite FDIRIP6M register to allow flow director filter to set ipv6 rules without setting ipv6 source/destination address.
--- drivers/net/ixgbe/base/ixgbe_82599.c | 1 + 1 file changed, 1 insertion(+)
drivers/net/ixgbe/base/ixgbe_82599.c +1 -0
@@ -1832,6 +1832,7 @@ s32 ixgbe_fdir_set_input_mask_82599(struct ixgbe_hw *hw, ~input_mask->formatted.src_ip[0]);IXGBE_WRITE_REG_BE32 (hw,IXGBE_FDIRDIP4M , ~input_mask->formatted.dst_ip[0 ]); +IXGBE_WRITE_REG_BE32 (hw,IXGBE_FDIRIP6M ,0xFFFFFFFF ); }return IXGBE_SUCCESS ; }
Signature · 1 line
2.17.1
PATCH v3 16/19 net/ixgbe/base: remove default advertising for x550 2.5G/5G
In reply to Guinan SunWe are seeing interoperability issues with switches when 2.5G and 5G in x550 are advertised by default, so default to off.
--- drivers/net/ixgbe/base/ixgbe_phy.c | 4 ---- 1 file changed, 4 deletions(-)
drivers/net/ixgbe/base/ixgbe_phy.c +0 -4
@@ -915,10 +915,6 @@ static s32 ixgbe_get_copper_speeds_supported(struct ixgbe_hw *hw) hw->phy.speeds_supported |=IXGBE_LINK_SPEED_100_FULL ;switch (hw->mac.type) { -case ixgbe_mac_X550: - hw->phy.speeds_supported |=IXGBE_LINK_SPEED_2_5GB_FULL ; - hw->phy.speeds_supported |=IXGBE_LINK_SPEED_5GB_FULL ; -break ;case ixgbe_mac_X550EM_x:case ixgbe_mac_X550EM_a: hw->phy.speeds_supported &= ~IXGBE_LINK_SPEED_100_FULL ;
Signature · 1 line
2.17.1
PATCH v3 17/19 net/ixgbe/base: check host interface return status
In reply to Guinan SunWriting to read-only fields returns a non-OK Return Status for shadow RAM write command for X550.
This information was previously discarded.
--- drivers/net/ixgbe/base/ixgbe_x550.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
drivers/net/ixgbe/base/ixgbe_x550.c +12 -1
@@ -3248,7 +3248,18 @@ s32 ixgbe_write_ee_hostif_data_X550(struct ixgbe_hw *hw, u16 offset, status =ixgbe_host_interface_command (hw, (u32 *)&buffer,sizeof (buffer), -IXGBE_HI_COMMAND_TIMEOUT , false); +IXGBE_HI_COMMAND_TIMEOUT , true); +if (status !=IXGBE_SUCCESS ) { +DEBUGOUT2 ("for offset %04x failed with status %d\n" , + offset, status); +return status; + } + +if (buffer.hdr.rsp.buf_lenh_status !=FW_CEM_RESP_STATUS_SUCCESS ) { +DEBUGOUT2 ("for offset %04x host interface return status %02x\n" , + offset, buffer.hdr.rsp.buf_lenh_status); +return IXGBE_ERR_HOST_INTERFACE_COMMAND ; + }return status; }
Signature · 1 line
2.17.1
PATCH v3 18/19 net/ixgbe/base: cleanup pre-processor tags
In reply to Guinan SunThe codes has been exposed correctly, so remove pre-processor tags.
--- drivers/net/ixgbe/base/ixgbe_common.c | 8 -------- drivers/net/ixgbe/base/ixgbe_phy.h | 2 -- drivers/net/ixgbe/base/ixgbe_type.h | 10 ---------- drivers/net/ixgbe/base/ixgbe_vf.c | 4 ---- drivers/net/ixgbe/base/ixgbe_x550.c | 22 ---------------------- 5 files changed, 46 deletions(-)
drivers/net/ixgbe/base/ixgbe_common.c +0 -8
@@ -4218,17 +4218,9 @@ s32 ixgbe_check_mac_link_generic(struct ixgbe_hw *hw, ixgbe_link_speed *speed,break ;case IXGBE_LINKS_SPEED_10_X550EM_A : *speed =IXGBE_LINK_SPEED_UNKNOWN ; -#ifdef PREBOOT_SUPPORT -if (hw->device_id ==IXGBE_DEV_ID_X550EM_A_1G_T || - hw->device_id ==IXGBE_DEV_ID_X550EM_A_1G_T_L || - hw->device_id ==IXGBE_DEV_ID_X550EM_A_SGMII || - hw->device_id ==IXGBE_DEV_ID_X550EM_A_SGMII_L ) - *speed =IXGBE_LINK_SPEED_10_FULL ; -#else if (hw->device_id ==IXGBE_DEV_ID_X550EM_A_1G_T || hw->device_id ==IXGBE_DEV_ID_X550EM_A_1G_T_L ) *speed =IXGBE_LINK_SPEED_10_FULL ; -#endif /* PREBOOT_SUPPORT */ break ;default : *speed =IXGBE_LINK_SPEED_UNKNOWN ;
drivers/net/ixgbe/base/ixgbe_phy.h +0 -2
@@ -117,10 +117,8 @@#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
drivers/net/ixgbe/base/ixgbe_type.h +0 -10
@@ -2413,9 +2413,7 @@ enum {#define IXGBE_EEPROM_CTRL_2 1/* EEPROM CTRL word 2 */ #define IXGBE_EEPROM_CCD_BIT 2 -#ifndef IXGBE_EEPROM_GRANT_ATTEMPTS #define IXGBE_EEPROM_GRANT_ATTEMPTS 1000/* EEPROM attempts to gain grant */ -#endif /* Number of 5 microseconds we wait for EERD read and * EERW write to complete */
@@ -3145,11 +3143,7 @@ enum ixgbe_fdir_pballoc_type {/* Host Interface Command Structures */ -#ifdef C99 #pragma pack(push, 1) -#else -#pragma pack (1) -#endif /* C99 */ struct ixgbe_hic_hdr {u8 cmd;
@@ -3262,11 +3256,7 @@ struct ixgbe_hic_phy_activity_resp {__be32 data[FW_PHY_ACT_DATA_COUNT ]; }; -#ifdef C99 #pragma pack(pop) -#else -#pragma pack() -#endif /* C99 */ /* Transmit Descriptor - Legacy */ struct ixgbe_legacy_tx_desc {
drivers/net/ixgbe/base/ixgbe_vf.c +0 -4
@@ -7,12 +7,8 @@#include "ixgbe_type.h" #include "ixgbe_vf.h" -#ifndef IXGBE_VFWRITE_REG #define IXGBE_VFWRITE_REG IXGBE_WRITE_REG -#endif -#ifndef IXGBE_VFREAD_REG #define IXGBE_VFREAD_REG IXGBE_READ_REG -#endif /** * ixgbe_init_ops_vf - Initialize the pointers for vf
drivers/net/ixgbe/base/ixgbe_x550.c +0 -22
@@ -1642,7 +1642,6 @@ STATIC s32 ixgbe_restart_an_internal_phy_x550em(struct ixgbe_hw *hw)return status; } -#ifndef PREBOOT_SUPPORT /** * ixgbe_setup_sgmii - Set up link for sgmii * @hw: pointer to hardware structure
@@ -1712,7 +1711,6 @@ STATIC s32 ixgbe_setup_sgmii(struct ixgbe_hw *hw, ixgbe_link_speed speed,return hw->phy.ops.setup_link_speed (hw, speed, autoneg_wait); } -#endif /* PREBOOT_SUPPORT */ /** * ixgbe_setup_sgmii_fw - Set up link for internal PHY SGMII auto-negotiation * @hw: pointer to hardware structure
@@ -1837,11 +1835,7 @@ void ixgbe_init_mac_link_ops_X550em(struct ixgbe_hw *hw)case ixgbe_media_type_backplane:if (hw->device_id ==IXGBE_DEV_ID_X550EM_A_SGMII || hw->device_id ==IXGBE_DEV_ID_X550EM_A_SGMII_L ) -#ifdef PREBOOT_SUPPORT - mac->ops.setup_link = ixgbe_setup_sgmii_fw; -#else mac->ops.setup_link = ixgbe_setup_sgmii; -#endif /* PREBOOT_SUPPORT */ break ;default :break ;
@@ -1900,18 +1894,8 @@ s32 ixgbe_get_link_capabilities_X550em(struct ixgbe_hw *hw, *autoneg = false;break ;case ixgbe_phy_ext_1g_t: -#ifdef PREBOOT_SUPPORT - *speed =IXGBE_LINK_SPEED_1GB_FULL ; -break ; -#endif /* PREBOOT_SUPPORT */ case ixgbe_phy_sgmii: -#ifdef PREBOOT_SUPPORT - *speed =IXGBE_LINK_SPEED_1GB_FULL | -IXGBE_LINK_SPEED_100_FULL | -IXGBE_LINK_SPEED_10_FULL ; -#else *speed =IXGBE_LINK_SPEED_1GB_FULL ; -#endif /* PREBOOT_SUPPORT */ break ;case ixgbe_phy_x550em_kr:if (hw->mac.type == ixgbe_mac_X550EM_a) {
@@ -3673,13 +3657,7 @@ u64 ixgbe_get_supported_physical_layer_X550em(struct ixgbe_hw *hw) physical_layer |=IXGBE_PHYSICAL_LAYER_10BASE_T ;break ;case ixgbe_phy_sgmii: -#ifdef PREBOOT_SUPPORT - physical_layer =IXGBE_PHYSICAL_LAYER_1000BASE_KX | -IXGBE_PHYSICAL_LAYER_100BASE_TX | -IXGBE_PHYSICAL_LAYER_10BASE_T ; -#else physical_layer =IXGBE_PHYSICAL_LAYER_1000BASE_KX ; -#endif /* PREBOOT_SUPPORT */ break ;case ixgbe_phy_ext_1g_t: physical_layer |=IXGBE_PHYSICAL_LAYER_1000BASE_T ;
Signature · 1 line
2.17.1
PATCH v3 19/19 net/ixgbe/base: update version
In reply to Guinan SunUpdate base code version in readme.
--- drivers/net/ixgbe/base/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ixgbe/base/README +1 -1
@@ -6,7 +6,7 @@ Intel® IXGBE driver =================== This directory contains source code of FreeBSD ixgbe driver of version -cid-ixgbe.2018.08.28.tar.gz released by the team which develop +not-released-cid-ixgbe.2020.06.09.tar.gz 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.17.1
Quoted 78 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Guinan Sun
Sent: Thursday, July 9, 2020 4:00 PM
To: [email protected]
Cc: Guo, Jia <[email protected]>; Zhao1, Wei <[email protected]>; Sun, GuinanX <[email protected]>
Subject: [dpdk-dev] [PATCH v3 00/19] update ixgbe base codesource code of ixgbe driver:
not-released-cid-ixgbe.2020.06.09.tar.gz released by the team which develop basic drivers for any ixgbe NIC.changelog in ND share repo:
From66d7da32d8e8("ixgbe-shared: Add support to clear VFMBMEM and toggle VF's TX queues") To7f2d73c9742b("ixgbe-shared: check Host Interface Return Status for Shadow RAM Write command for X550")
66d7da32d8e8is ignore as no use in this release.Reviewed-by Wei Zhao <[email protected]>---
v3:
* Modify hardcode.
* Remove patch "toggle VF's Tx queues"
* Remove patch "add support to clear VFMBMEM"
* Split patch into two.
v2:
* Remove codes aboutIXGBE_NVMUPD_SUPPORT.
* Remove codes aboutPREBOOT_SUPPORT.
* Remove codes aboutIXGBE_SFP_DETECT_RETRIES.
* Remove codes aboutIXGBE_EEPROM_GRANT_ATTEMPTS.
* Remove codes aboutIXGBE_VFWRITE_REG.
* Remove some useless defines.
* Modify commit messages.
* Split some patch to two patches and Merge some patches to one patch.
* Update README.Guinan Sun (19):
net/ixgbe/base: fix host interface shadow RAM readnet/ixgbe/base: change flow for "Apply Update" commandnet/ixgbe/base: fix x550em 10G NIC link status reportnet/ixgbe/base: resolve infinite recursion on PCIe link downnet/ixgbe/base: added register definitions for NVM updatenet/ixgbe/base: cleanup spelling mistakes in commentsnet/ixgbe/base: remove whitespace in function commentsnet/ixgbe/base: move increments after evaluationsnet/ixgbe/base: create dedicated func to restart auto negonet/ixgbe/base: add typecast for type mismatchnet/ixgbe/base: remove unnecessary return value checknet/ixgbe/base: remove unnecessary log message FC autonegonet/ixgbe/base: initialize data field in struct buffernet/ixgbe/base: improve log about autonego being disablednet/ixgbe/base: add ipv6 mask for FDIR featurenet/ixgbe/base: remove default advertising for x550 2.5G/5Gnet/ixgbe/base: check host interface return statusnet/ixgbe/base: cleanup pre-processor tagsnet/ixgbe/base: update versiondrivers/net/ixgbe/base/README | 2 +- drivers/net/ixgbe/base/ixgbe_82598.c | 238 ++--- drivers/net/ixgbe/base/ixgbe_82599.c | 397 ++++---- drivers/net/ixgbe/base/ixgbe_api.c | 866 +++++++++--------- drivers/net/ixgbe/base/ixgbe_common.c | 1055 +++++++++++----------- drivers/net/ixgbe/base/ixgbe_common.h | 2 +- drivers/net/ixgbe/base/ixgbe_dcb.c | 6 +- drivers/net/ixgbe/base/ixgbe_dcb_82598.c | 2 +- drivers/net/ixgbe/base/ixgbe_dcb_82599.c | 2 +- drivers/net/ixgbe/base/ixgbe_hv_vf.c | 20 +- drivers/net/ixgbe/base/ixgbe_mbx.c | 242 ++--- drivers/net/ixgbe/base/ixgbe_phy.c | 488 +++++----- drivers/net/ixgbe/base/ixgbe_phy.h | 3 +- drivers/net/ixgbe/base/ixgbe_type.h | 24 +- drivers/net/ixgbe/base/ixgbe_vf.c | 170 ++-- drivers/net/ixgbe/base/ixgbe_x540.c | 190 ++-- drivers/net/ixgbe/base/ixgbe_x550.c | 527 ++++++----- 17 files changed, 2102 insertions(+), 2132 deletions(-)
Quoted 2 lines
--
2.17.1
Update v2 to v3 in dpdk-next-net-intel.