patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH 06/14] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters
       [not found] <20210618063851.3694702-1-robinx.zhang@intel.com>
@ 2021-06-18  6:38 ` Robin Zhang
  2021-06-18  6:38 ` [dpdk-stable] [PATCH 07/14] net/i40e/base: fix PF reset failed Robin Zhang
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 45+ messages in thread
From: Robin Zhang @ 2021-06-18  6:38 UTC (permalink / raw)
  To: dev
  Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, stable,
	Dawid Lukwinski

Unlike other supported adapters, 2.5G and 5G use different
PHY type identifiers for reading/writing PHY settings
and for reading link status. This commit intruduces
separate PHY identifiers for these two operation types.

Fixes: 988ed63c7441 ("net/i40e/base: add support for Carlsville device")
Cc: stable@dpdk.org

Signed-off-by: Dawid Lukwinski <dawid.lukwinski@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_adminq_cmd.h | 6 ++++--
 drivers/net/i40e/base/i40e_common.c     | 4 ++--
 drivers/net/i40e/base/i40e_type.h       | 8 ++------
 3 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
index a73a08aae6..1aafe1de38 100644
--- a/drivers/net/i40e/base/i40e_adminq_cmd.h
+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
@@ -1947,8 +1947,10 @@ enum i40e_aq_phy_type {
 	I40E_PHY_TYPE_25GBASE_LR		= 0x22,
 	I40E_PHY_TYPE_25GBASE_AOC		= 0x23,
 	I40E_PHY_TYPE_25GBASE_ACC		= 0x24,
-	I40E_PHY_TYPE_2_5GBASE_T		= 0x30,
-	I40E_PHY_TYPE_5GBASE_T			= 0x31,
+	I40E_PHY_TYPE_2_5GBASE_T		= 0x26,
+	I40E_PHY_TYPE_5GBASE_T			= 0x27,
+	I40E_PHY_TYPE_2_5GBASE_T_LINK_STATUS	= 0x30,
+	I40E_PHY_TYPE_5GBASE_T_LINK_STATUS	= 0x31,
 	I40E_PHY_TYPE_MAX,
 	I40E_PHY_TYPE_NOT_SUPPORTED_HIGH_TEMP	= 0xFD,
 	I40E_PHY_TYPE_EMPTY			= 0xFE,
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 32642f3e2b..ceedec68bf 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1280,8 +1280,8 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw)
 		break;
 	case I40E_PHY_TYPE_100BASE_TX:
 	case I40E_PHY_TYPE_1000BASE_T:
-	case I40E_PHY_TYPE_2_5GBASE_T:
-	case I40E_PHY_TYPE_5GBASE_T:
+	case I40E_PHY_TYPE_2_5GBASE_T_LINK_STATUS:
+	case I40E_PHY_TYPE_5GBASE_T_LINK_STATUS:
 	case I40E_PHY_TYPE_10GBASE_T:
 		media = I40E_MEDIA_TYPE_BASET;
 		break;
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index 007484f227..a9e019d101 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -329,12 +329,8 @@ struct i40e_phy_info {
 					     I40E_PHY_TYPE_OFFSET)
 #define I40E_CAP_PHY_TYPE_25GBASE_ACC BIT_ULL(I40E_PHY_TYPE_25GBASE_ACC + \
 					     I40E_PHY_TYPE_OFFSET)
-/* Offset for 2.5G/5G PHY Types value to bit number conversion */
-#define I40E_PHY_TYPE_OFFSET2 (-10)
-#define I40E_CAP_PHY_TYPE_2_5GBASE_T BIT_ULL(I40E_PHY_TYPE_2_5GBASE_T + \
-					     I40E_PHY_TYPE_OFFSET2)
-#define I40E_CAP_PHY_TYPE_5GBASE_T BIT_ULL(I40E_PHY_TYPE_5GBASE_T + \
-					     I40E_PHY_TYPE_OFFSET2)
+#define I40E_CAP_PHY_TYPE_2_5GBASE_T BIT_ULL(I40E_PHY_TYPE_2_5GBASE_T)
+#define I40E_CAP_PHY_TYPE_5GBASE_T BIT_ULL(I40E_PHY_TYPE_5GBASE_T)
 #define I40E_HW_CAP_MAX_GPIO			30
 #define I40E_HW_CAP_MDIO_PORT_MODE_MDIO		0
 #define I40E_HW_CAP_MDIO_PORT_MODE_I2C		1
-- 
2.25.1


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [dpdk-stable] [PATCH 07/14] net/i40e/base: fix PF reset failed
       [not found] <20210618063851.3694702-1-robinx.zhang@intel.com>
  2021-06-18  6:38 ` [dpdk-stable] [PATCH 06/14] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters Robin Zhang
@ 2021-06-18  6:38 ` Robin Zhang
  2021-06-18  6:38 ` [dpdk-stable] [PATCH 08/14] net/i40e/base: fix update link data for X722 Robin Zhang
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 45+ messages in thread
From: Robin Zhang @ 2021-06-18  6:38 UTC (permalink / raw)
  To: dev
  Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, stable,
	Sylwester Dziedziuch

PF has to delete all the filters during reset.
If it is fully loaded with filters then it is possible
that it will take more than 200 ms to finish the reset
resulting in timeout during pf_reset and
PF reset failed, -15 error indication.
Increasing the timeout value for PF reset from 200 to 1000
to give PF more time to finish reset if it is loaded with filters.

Fixes: 1e32378f0774 ("i40e/base: increase PF reset max loop limit")
Cc: stable@dpdk.org

Signed-off-by: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index ceedec68bf..aa424e6010 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1341,7 +1341,7 @@ STATIC enum i40e_status_code i40e_poll_globr(struct i40e_hw *hw,
 	return I40E_ERR_RESET_FAILED;
 }
 
-#define I40E_PF_RESET_WAIT_COUNT	200
+#define I40E_PF_RESET_WAIT_COUNT	1000
 /**
  * i40e_pf_reset - Reset the PF
  * @hw: pointer to the hardware structure
-- 
2.25.1


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [dpdk-stable] [PATCH 08/14] net/i40e/base: fix update link data for X722
       [not found] <20210618063851.3694702-1-robinx.zhang@intel.com>
  2021-06-18  6:38 ` [dpdk-stable] [PATCH 06/14] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters Robin Zhang
  2021-06-18  6:38 ` [dpdk-stable] [PATCH 07/14] net/i40e/base: fix PF reset failed Robin Zhang
@ 2021-06-18  6:38 ` Robin Zhang
  2021-06-18  6:38 ` [dpdk-stable] [PATCH 09/14] net/i40e/base: fix AOC media type reported by ethtool Robin Zhang
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 45+ messages in thread
From: Robin Zhang @ 2021-06-18  6:38 UTC (permalink / raw)
  To: dev
  Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, stable,
	Jaroslaw Gawin

The X722 card has 'Link Type' information elsewhere than the X710.
Previously, for all cards, the 'Link Type' information was retrieved by
opcode 0x0607 and this value was wrong for all X722 cards.
Now this information for X722 only is taken by opcode 0x0600
(function: i40e_aq_get_phy_capabilities) instead of an opcode
0x0607 (function: i40e_aq_get_link_info).
All other parameters read by opcode 0x0607 unchanged.

Fixes: e6691b428eb1 ("i40e/base: fix PHY NVM interaction")
Fixes: 75c3de654ead ("net/i40e/base: fix long link down notification time")
Cc: stable@dpdk.org

Signed-off-by: Jaroslaw Gawin <jaroslawx.gawin@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_common.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index aa424e6010..ef061a6b63 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -2078,6 +2078,9 @@ enum i40e_status_code i40e_aq_get_link_info(struct i40e_hw *hw,
 	     hw->aq.fw_min_ver < 40)) && hw_link_info->phy_type == 0xE)
 		hw_link_info->phy_type = I40E_PHY_TYPE_10GBASE_SFPP_CU;
 
+	/* 'Get Link Status' response data structure from X722 FW has
+	 * different format and does not contain this information
+	 */
 	if (hw->flags & I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE &&
 	    hw->mac.type != I40E_MAC_X722) {
 		__le32 tmp;
@@ -2948,10 +2951,13 @@ enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw)
 		return status;
 
 	/* extra checking needed to ensure link info to user is timely */
-	if ((hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) &&
-	    ((hw->phy.link_info.link_info & I40E_AQ_LINK_UP) ||
-	     !(hw->phy.link_info_old.link_info & I40E_AQ_LINK_UP))) {
-		status = i40e_aq_get_phy_capabilities(hw, false, false,
+	if (((hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) &&
+	     ((hw->phy.link_info.link_info & I40E_AQ_LINK_UP) ||
+	      !(hw->phy.link_info_old.link_info & I40E_AQ_LINK_UP))) ||
+		hw->mac.type == I40E_MAC_X722) {
+		status = i40e_aq_get_phy_capabilities(hw, false,
+						      hw->mac.type ==
+						      I40E_MAC_X722,
 						      &abilities, NULL);
 		if (status)
 			return status;
-- 
2.25.1


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [dpdk-stable] [PATCH 09/14] net/i40e/base: fix AOC media type reported by ethtool
       [not found] <20210618063851.3694702-1-robinx.zhang@intel.com>
                   ` (2 preceding siblings ...)
  2021-06-18  6:38 ` [dpdk-stable] [PATCH 08/14] net/i40e/base: fix update link data for X722 Robin Zhang
@ 2021-06-18  6:38 ` Robin Zhang
  2021-06-18  6:38 ` [dpdk-stable] [PATCH 12/14] net/i40e/base: fix headers to match functions Robin Zhang
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 45+ messages in thread
From: Robin Zhang @ 2021-06-18  6:38 UTC (permalink / raw)
  To: dev
  Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, stable,
	Dawid Lukwinski

For Active Optical Cable (AOC) the correct media type is "Fibre",
not "Direct Attach Copper".

Fixes: d749d4d89969 ("i40e/base: add AOC PHY types")
Fixes: aa153cc89ff0 ("net/i40e/base: add new PHY types for 25G AOC and
ACC")
Cc: stable@dpdk.org

Signed-off-by: Dawid Lukwinski <dawid.lukwinski@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_common.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index ef061a6b63..2ca6a13e79 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1276,6 +1276,9 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw)
 	case I40E_PHY_TYPE_40GBASE_LR4:
 	case I40E_PHY_TYPE_25GBASE_LR:
 	case I40E_PHY_TYPE_25GBASE_SR:
+	case I40E_PHY_TYPE_10GBASE_AOC:
+	case I40E_PHY_TYPE_25GBASE_AOC:
+	case I40E_PHY_TYPE_40GBASE_AOC:
 		media = I40E_MEDIA_TYPE_FIBER;
 		break;
 	case I40E_PHY_TYPE_100BASE_TX:
@@ -1290,10 +1293,7 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw)
 	case I40E_PHY_TYPE_10GBASE_CR1:
 	case I40E_PHY_TYPE_40GBASE_CR4:
 	case I40E_PHY_TYPE_10GBASE_SFPP_CU:
-	case I40E_PHY_TYPE_40GBASE_AOC:
-	case I40E_PHY_TYPE_10GBASE_AOC:
 	case I40E_PHY_TYPE_25GBASE_CR:
-	case I40E_PHY_TYPE_25GBASE_AOC:
 	case I40E_PHY_TYPE_25GBASE_ACC:
 		media = I40E_MEDIA_TYPE_DA;
 		break;
-- 
2.25.1


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [dpdk-stable] [PATCH 12/14] net/i40e/base: fix headers to match functions
       [not found] <20210618063851.3694702-1-robinx.zhang@intel.com>
                   ` (3 preceding siblings ...)
  2021-06-18  6:38 ` [dpdk-stable] [PATCH 09/14] net/i40e/base: fix AOC media type reported by ethtool Robin Zhang
@ 2021-06-18  6:38 ` Robin Zhang
  2021-06-18  6:38 ` [dpdk-stable] [PATCH 13/14] net/i40e/base: fix potentially uninitialized variables in NVM code Robin Zhang
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 45+ messages in thread
From: Robin Zhang @ 2021-06-18  6:38 UTC (permalink / raw)
  To: dev
  Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, stable,
	Jesse Brandeburg

Fix several kernel-doc warnings when building with W=1. These changes
are only to comments.

Fixes: 8db9e2a1b232 ("i40e: base driver")
Fixes: 842ea1996335 ("i40e/base: save link module type")
Fixes: fd72a2284a89 ("i40e/base: support LED blinking with new PHY")
Fixes: 788fc17b2dec ("i40e/base: support proxy config for X722")
Cc: stable@dpdk.org

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_common.c  | 10 +++++-----
 drivers/net/i40e/base/i40e_dcb.c     |  2 +-
 drivers/net/i40e/base/i40e_lan_hmc.c |  2 +-
 drivers/net/i40e/base/i40e_nvm.c     |  2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index e077bf8fd3..3f3896aea4 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -2678,7 +2678,7 @@ enum i40e_status_code i40e_aq_set_vsi_vlan_promisc(struct i40e_hw *hw,
 }
 
 /**
- * i40e_get_vsi_params - get VSI configuration info
+ * i40e_aq_get_vsi_params - get VSI configuration info
  * @hw: pointer to the hw struct
  * @vsi_ctx: pointer to a vsi context struct
  * @cmd_details: pointer to command details structure or NULL
@@ -2939,7 +2939,7 @@ enum i40e_status_code i40e_get_link_status(struct i40e_hw *hw, bool *link_up)
 }
 
 /**
- * i40e_updatelink_status - update status of the HW network link
+ * i40e_update_link_info - update status of the HW network link
  * @hw: pointer to the hw struct
  **/
 enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw)
@@ -4831,7 +4831,7 @@ enum i40e_status_code i40e_aq_del_udp_tunnel(struct i40e_hw *hw, u8 index,
 }
 
 /**
- * i40e_aq_get_switch_resource_alloc (0x0204)
+ * i40e_aq_get_switch_resource_alloc - command (0x0204) to get allocations
  * @hw: pointer to the hw struct
  * @num_entries: pointer to u8 to store the number of resource entries returned
  * @buf: pointer to a user supplied buffer.  This buffer must be large enough
@@ -6978,7 +6978,7 @@ u8 i40e_get_phy_address(struct i40e_hw *hw, u8 dev_num)
 }
 
 /**
- * i40e_blink_phy_led
+ * i40e_blink_phy_link_led
  * @hw: pointer to the HW structure
  * @time: time how long led will blinks in secs
  * @interval: gap between LED on and off in msecs
@@ -7825,7 +7825,7 @@ enum i40e_status_code i40e_aq_set_arp_proxy_config(struct i40e_hw *hw,
 }
 
 /**
- * i40e_aq_opc_set_ns_proxy_table_entry
+ * i40e_aq_set_ns_proxy_table_entry
  * @hw: pointer to the HW structure
  * @ns_proxy_table_entry: pointer to NS table entry command struct
  * @cmd_details: pointer to command details
diff --git a/drivers/net/i40e/base/i40e_dcb.c b/drivers/net/i40e/base/i40e_dcb.c
index 27b52bc365..8f9b7e823f 100644
--- a/drivers/net/i40e/base/i40e_dcb.c
+++ b/drivers/net/i40e/base/i40e_dcb.c
@@ -235,7 +235,7 @@ static void i40e_parse_ieee_app_tlv(struct i40e_lldp_org_tlv *tlv,
 }
 
 /**
- * i40e_parse_ieee_etsrec_tlv
+ * i40e_parse_ieee_tlv
  * @tlv: IEEE 802.1Qaz TLV
  * @dcbcfg: Local store to update ETS REC data
  *
diff --git a/drivers/net/i40e/base/i40e_lan_hmc.c b/drivers/net/i40e/base/i40e_lan_hmc.c
index d3969396f0..d3bd683ff3 100644
--- a/drivers/net/i40e/base/i40e_lan_hmc.c
+++ b/drivers/net/i40e/base/i40e_lan_hmc.c
@@ -516,7 +516,7 @@ enum i40e_status_code i40e_configure_lan_hmc(struct i40e_hw *hw,
 }
 
 /**
- * i40e_delete_hmc_object - remove hmc objects
+ * i40e_delete_lan_hmc_object - remove hmc objects
  * @hw: pointer to the HW structure
  * @info: pointer to i40e_hmc_delete_obj_info struct
  *
diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c
index 561ed21136..67e58cc195 100644
--- a/drivers/net/i40e/base/i40e_nvm.c
+++ b/drivers/net/i40e/base/i40e_nvm.c
@@ -7,7 +7,7 @@
 #include "i40e_prototype.h"
 
 /**
- * i40e_init_nvm_ops - Initialize NVM function pointers
+ * i40e_init_nvm - Initialize NVM function pointers
  * @hw: pointer to the HW structure
  *
  * Setup the function pointers and the NVM info structure. Should be called
-- 
2.25.1


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [dpdk-stable] [PATCH 13/14] net/i40e/base: fix potentially uninitialized variables in NVM code
       [not found] <20210618063851.3694702-1-robinx.zhang@intel.com>
                   ` (4 preceding siblings ...)
  2021-06-18  6:38 ` [dpdk-stable] [PATCH 12/14] net/i40e/base: fix headers to match functions Robin Zhang
@ 2021-06-18  6:38 ` Robin Zhang
  2021-06-21  6:52   ` Xing, Beilei
       [not found] ` <20210621063708.4014937-1-robinx.zhang@intel.com>
                   ` (4 subsequent siblings)
  10 siblings, 1 reply; 45+ messages in thread
From: Robin Zhang @ 2021-06-18  6:38 UTC (permalink / raw)
  To: dev
  Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, stable,
	Christopher Pau

The status of i40e_read_nvm_word is not checked, so variables set
from this function could be used uninitialized. In this case, preserve
the existing flow that does not block initialization by initializing
these values from the start.

The variable checksum from i40e_calc_nvm_checksum is used before return
value is checked. Fix this logic.

Fixes: 8d6c51fcd24b ("i40e/base: get OEM version")
Fixes: 2db70574247b ("net/i40e/base: limit PF/VF specific code to that driver only")
Fixes: 8db9e2a1b232 ("i40e: base driver")
Fixes: 3ed6c3246f43 ("i40e/base: handle AQ timeout when releasing NVM")
Cc: stable@dpdk.org

Signed-off-by: Christopher Pau <christopher.pau@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_adminq.c | 6 ++++--
 drivers/net/i40e/base/i40e_nvm.c    | 5 +++--
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c
index eafacbdbec..d27ccde29a 100644
--- a/drivers/net/i40e/base/i40e_adminq.c
+++ b/drivers/net/i40e/base/i40e_adminq.c
@@ -648,8 +648,10 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw)
 {
 	struct i40e_adminq_info *aq = &hw->aq;
 	enum i40e_status_code ret_code;
-	u16 cfg_ptr, oem_hi, oem_lo;
-	u16 eetrack_lo, eetrack_hi;
+	u16 oem_hi = 0, oem_lo = 0;
+	u16 eetrack_hi = 0;
+	u16 eetrack_lo = 0;
+	u16 cfg_ptr = 0;
 	int retry = 0;
 
 	/* verify input for valid configuration */
diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c
index 67e58cc195..f385042601 100644
--- a/drivers/net/i40e/base/i40e_nvm.c
+++ b/drivers/net/i40e/base/i40e_nvm.c
@@ -755,10 +755,11 @@ enum i40e_status_code i40e_update_nvm_checksum(struct i40e_hw *hw)
 	DEBUGFUNC("i40e_update_nvm_checksum");
 
 	ret_code = i40e_calc_nvm_checksum(hw, &checksum);
-	le_sum = CPU_TO_LE16(checksum);
-	if (ret_code == I40E_SUCCESS)
+	if (ret_code == I40E_SUCCESS) {
+		le_sum = CPU_TO_LE16(checksum);
 		ret_code = i40e_write_nvm_aq(hw, 0x00, I40E_SR_SW_CHECKSUM_WORD,
 					     1, &le_sum, true);
+	}
 
 	return ret_code;
 }
-- 
2.25.1


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [dpdk-stable] [PATCH v2 06/14] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters
       [not found] ` <20210621063708.4014937-1-robinx.zhang@intel.com>
@ 2021-06-21  6:37   ` Robin Zhang
  2021-06-21  6:37   ` [dpdk-stable] [PATCH v2 07/14] net/i40e/base: fix PF reset failed Robin Zhang
                     ` (4 subsequent siblings)
  5 siblings, 0 replies; 45+ messages in thread
From: Robin Zhang @ 2021-06-21  6:37 UTC (permalink / raw)
  To: dev
  Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, stable,
	Dawid Lukwinski

Unlike other supported adapters, 2.5G and 5G use different
PHY type identifiers for reading/writing PHY settings
and for reading link status. This commit intruduces
separate PHY identifiers for these two operation types.

Fixes: 988ed63c7441 ("net/i40e/base: add support for Carlsville device")
Cc: stable@dpdk.org

Signed-off-by: Dawid Lukwinski <dawid.lukwinski@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_adminq_cmd.h | 6 ++++--
 drivers/net/i40e/base/i40e_common.c     | 4 ++--
 drivers/net/i40e/base/i40e_type.h       | 8 ++------
 3 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
index a73a08aae6..1aafe1de38 100644
--- a/drivers/net/i40e/base/i40e_adminq_cmd.h
+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
@@ -1947,8 +1947,10 @@ enum i40e_aq_phy_type {
 	I40E_PHY_TYPE_25GBASE_LR		= 0x22,
 	I40E_PHY_TYPE_25GBASE_AOC		= 0x23,
 	I40E_PHY_TYPE_25GBASE_ACC		= 0x24,
-	I40E_PHY_TYPE_2_5GBASE_T		= 0x30,
-	I40E_PHY_TYPE_5GBASE_T			= 0x31,
+	I40E_PHY_TYPE_2_5GBASE_T		= 0x26,
+	I40E_PHY_TYPE_5GBASE_T			= 0x27,
+	I40E_PHY_TYPE_2_5GBASE_T_LINK_STATUS	= 0x30,
+	I40E_PHY_TYPE_5GBASE_T_LINK_STATUS	= 0x31,
 	I40E_PHY_TYPE_MAX,
 	I40E_PHY_TYPE_NOT_SUPPORTED_HIGH_TEMP	= 0xFD,
 	I40E_PHY_TYPE_EMPTY			= 0xFE,
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 32642f3e2b..ceedec68bf 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1280,8 +1280,8 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw)
 		break;
 	case I40E_PHY_TYPE_100BASE_TX:
 	case I40E_PHY_TYPE_1000BASE_T:
-	case I40E_PHY_TYPE_2_5GBASE_T:
-	case I40E_PHY_TYPE_5GBASE_T:
+	case I40E_PHY_TYPE_2_5GBASE_T_LINK_STATUS:
+	case I40E_PHY_TYPE_5GBASE_T_LINK_STATUS:
 	case I40E_PHY_TYPE_10GBASE_T:
 		media = I40E_MEDIA_TYPE_BASET;
 		break;
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index e5a3729183..0323887550 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -329,12 +329,8 @@ struct i40e_phy_info {
 					     I40E_PHY_TYPE_OFFSET)
 #define I40E_CAP_PHY_TYPE_25GBASE_ACC BIT_ULL(I40E_PHY_TYPE_25GBASE_ACC + \
 					     I40E_PHY_TYPE_OFFSET)
-/* Offset for 2.5G/5G PHY Types value to bit number conversion */
-#define I40E_PHY_TYPE_OFFSET2 (-10)
-#define I40E_CAP_PHY_TYPE_2_5GBASE_T BIT_ULL(I40E_PHY_TYPE_2_5GBASE_T + \
-					     I40E_PHY_TYPE_OFFSET2)
-#define I40E_CAP_PHY_TYPE_5GBASE_T BIT_ULL(I40E_PHY_TYPE_5GBASE_T + \
-					     I40E_PHY_TYPE_OFFSET2)
+#define I40E_CAP_PHY_TYPE_2_5GBASE_T BIT_ULL(I40E_PHY_TYPE_2_5GBASE_T)
+#define I40E_CAP_PHY_TYPE_5GBASE_T BIT_ULL(I40E_PHY_TYPE_5GBASE_T)
 #define I40E_HW_CAP_MAX_GPIO			30
 #define I40E_HW_CAP_MDIO_PORT_MODE_MDIO		0
 #define I40E_HW_CAP_MDIO_PORT_MODE_I2C		1
-- 
2.25.1


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [dpdk-stable] [PATCH v2 07/14] net/i40e/base: fix PF reset failed
       [not found] ` <20210621063708.4014937-1-robinx.zhang@intel.com>
  2021-06-21  6:37   ` [dpdk-stable] [PATCH v2 06/14] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters Robin Zhang
@ 2021-06-21  6:37   ` Robin Zhang
  2021-06-21  6:37   ` [dpdk-stable] [PATCH v2 08/14] net/i40e/base: fix update link data for X722 Robin Zhang
                     ` (3 subsequent siblings)
  5 siblings, 0 replies; 45+ messages in thread
From: Robin Zhang @ 2021-06-21  6:37 UTC (permalink / raw)
  To: dev
  Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, stable,
	Sylwester Dziedziuch

PF has to delete all the filters during reset.
If it is fully loaded with filters then it is possible
that it will take more than 200 ms to finish the reset
resulting in timeout during pf_reset and
PF reset failed, -15 error indication.
Increasing the timeout value for PF reset from 200 to 1000
to give PF more time to finish reset if it is loaded with filters.

Fixes: 1e32378f0774 ("i40e/base: increase PF reset max loop limit")
Cc: stable@dpdk.org

Signed-off-by: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index ceedec68bf..aa424e6010 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1341,7 +1341,7 @@ STATIC enum i40e_status_code i40e_poll_globr(struct i40e_hw *hw,
 	return I40E_ERR_RESET_FAILED;
 }
 
-#define I40E_PF_RESET_WAIT_COUNT	200
+#define I40E_PF_RESET_WAIT_COUNT	1000
 /**
  * i40e_pf_reset - Reset the PF
  * @hw: pointer to the hardware structure
-- 
2.25.1


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [dpdk-stable] [PATCH v2 08/14] net/i40e/base: fix update link data for X722
       [not found] ` <20210621063708.4014937-1-robinx.zhang@intel.com>
  2021-06-21  6:37   ` [dpdk-stable] [PATCH v2 06/14] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters Robin Zhang
  2021-06-21  6:37   ` [dpdk-stable] [PATCH v2 07/14] net/i40e/base: fix PF reset failed Robin Zhang
@ 2021-06-21  6:37   ` Robin Zhang
  2021-06-21  6:37   ` [dpdk-stable] [PATCH v2 09/14] net/i40e/base: fix AOC media type reported by ethtool Robin Zhang
                     ` (2 subsequent siblings)
  5 siblings, 0 replies; 45+ messages in thread
From: Robin Zhang @ 2021-06-21  6:37 UTC (permalink / raw)
  To: dev
  Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, stable,
	Jaroslaw Gawin

The X722 card has 'Link Type' information elsewhere than the X710.
Previously, for all cards, the 'Link Type' information was retrieved by
opcode 0x0607 and this value was wrong for all X722 cards.
Now this information for X722 only is taken by opcode 0x0600
(function: i40e_aq_get_phy_capabilities) instead of an opcode
0x0607 (function: i40e_aq_get_link_info).
All other parameters read by opcode 0x0607 unchanged.

Fixes: e6691b428eb1 ("i40e/base: fix PHY NVM interaction")
Fixes: 75c3de654ead ("net/i40e/base: fix long link down notification time")
Cc: stable@dpdk.org

Signed-off-by: Jaroslaw Gawin <jaroslawx.gawin@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_common.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index aa424e6010..ef061a6b63 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -2078,6 +2078,9 @@ enum i40e_status_code i40e_aq_get_link_info(struct i40e_hw *hw,
 	     hw->aq.fw_min_ver < 40)) && hw_link_info->phy_type == 0xE)
 		hw_link_info->phy_type = I40E_PHY_TYPE_10GBASE_SFPP_CU;
 
+	/* 'Get Link Status' response data structure from X722 FW has
+	 * different format and does not contain this information
+	 */
 	if (hw->flags & I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE &&
 	    hw->mac.type != I40E_MAC_X722) {
 		__le32 tmp;
@@ -2948,10 +2951,13 @@ enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw)
 		return status;
 
 	/* extra checking needed to ensure link info to user is timely */
-	if ((hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) &&
-	    ((hw->phy.link_info.link_info & I40E_AQ_LINK_UP) ||
-	     !(hw->phy.link_info_old.link_info & I40E_AQ_LINK_UP))) {
-		status = i40e_aq_get_phy_capabilities(hw, false, false,
+	if (((hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) &&
+	     ((hw->phy.link_info.link_info & I40E_AQ_LINK_UP) ||
+	      !(hw->phy.link_info_old.link_info & I40E_AQ_LINK_UP))) ||
+		hw->mac.type == I40E_MAC_X722) {
+		status = i40e_aq_get_phy_capabilities(hw, false,
+						      hw->mac.type ==
+						      I40E_MAC_X722,
 						      &abilities, NULL);
 		if (status)
 			return status;
-- 
2.25.1


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [dpdk-stable] [PATCH v2 09/14] net/i40e/base: fix AOC media type reported by ethtool
       [not found] ` <20210621063708.4014937-1-robinx.zhang@intel.com>
                     ` (2 preceding siblings ...)
  2021-06-21  6:37   ` [dpdk-stable] [PATCH v2 08/14] net/i40e/base: fix update link data for X722 Robin Zhang
@ 2021-06-21  6:37   ` Robin Zhang
  2021-06-21  6:37   ` [dpdk-stable] [PATCH v2 12/14] net/i40e/base: fix headers to match functions Robin Zhang
  2021-06-21  6:37   ` [dpdk-stable] [PATCH v2 13/14] net/i40e/base: fix potentially uninitialized variables in NVM code Robin Zhang
  5 siblings, 0 replies; 45+ messages in thread
From: Robin Zhang @ 2021-06-21  6:37 UTC (permalink / raw)
  To: dev
  Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, stable,
	Dawid Lukwinski

For Active Optical Cable (AOC) the correct media type is "Fibre",
not "Direct Attach Copper".

Fixes: d749d4d89969 ("i40e/base: add AOC PHY types")
Fixes: aa153cc89ff0 ("net/i40e/base: add new PHY types for 25G AOC and
ACC")
Cc: stable@dpdk.org

Signed-off-by: Dawid Lukwinski <dawid.lukwinski@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_common.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index ef061a6b63..2ca6a13e79 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1276,6 +1276,9 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw)
 	case I40E_PHY_TYPE_40GBASE_LR4:
 	case I40E_PHY_TYPE_25GBASE_LR:
 	case I40E_PHY_TYPE_25GBASE_SR:
+	case I40E_PHY_TYPE_10GBASE_AOC:
+	case I40E_PHY_TYPE_25GBASE_AOC:
+	case I40E_PHY_TYPE_40GBASE_AOC:
 		media = I40E_MEDIA_TYPE_FIBER;
 		break;
 	case I40E_PHY_TYPE_100BASE_TX:
@@ -1290,10 +1293,7 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw)
 	case I40E_PHY_TYPE_10GBASE_CR1:
 	case I40E_PHY_TYPE_40GBASE_CR4:
 	case I40E_PHY_TYPE_10GBASE_SFPP_CU:
-	case I40E_PHY_TYPE_40GBASE_AOC:
-	case I40E_PHY_TYPE_10GBASE_AOC:
 	case I40E_PHY_TYPE_25GBASE_CR:
-	case I40E_PHY_TYPE_25GBASE_AOC:
 	case I40E_PHY_TYPE_25GBASE_ACC:
 		media = I40E_MEDIA_TYPE_DA;
 		break;
-- 
2.25.1


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [dpdk-stable] [PATCH v2 12/14] net/i40e/base: fix headers to match functions
       [not found] ` <20210621063708.4014937-1-robinx.zhang@intel.com>
                     ` (3 preceding siblings ...)
  2021-06-21  6:37   ` [dpdk-stable] [PATCH v2 09/14] net/i40e/base: fix AOC media type reported by ethtool Robin Zhang
@ 2021-06-21  6:37   ` Robin Zhang
  2021-06-21  6:37   ` [dpdk-stable] [PATCH v2 13/14] net/i40e/base: fix potentially uninitialized variables in NVM code Robin Zhang
  5 siblings, 0 replies; 45+ messages in thread
From: Robin Zhang @ 2021-06-21  6:37 UTC (permalink / raw)
  To: dev
  Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, stable,
	Jesse Brandeburg

Fix several kernel-doc warnings when building with W=1. These changes
are only to comments.

Fixes: 8db9e2a1b232 ("i40e: base driver")
Fixes: 842ea1996335 ("i40e/base: save link module type")
Fixes: fd72a2284a89 ("i40e/base: support LED blinking with new PHY")
Fixes: 788fc17b2dec ("i40e/base: support proxy config for X722")
Cc: stable@dpdk.org

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_common.c  | 10 +++++-----
 drivers/net/i40e/base/i40e_dcb.c     |  2 +-
 drivers/net/i40e/base/i40e_lan_hmc.c |  2 +-
 drivers/net/i40e/base/i40e_nvm.c     |  2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index e077bf8fd3..3f3896aea4 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -2678,7 +2678,7 @@ enum i40e_status_code i40e_aq_set_vsi_vlan_promisc(struct i40e_hw *hw,
 }
 
 /**
- * i40e_get_vsi_params - get VSI configuration info
+ * i40e_aq_get_vsi_params - get VSI configuration info
  * @hw: pointer to the hw struct
  * @vsi_ctx: pointer to a vsi context struct
  * @cmd_details: pointer to command details structure or NULL
@@ -2939,7 +2939,7 @@ enum i40e_status_code i40e_get_link_status(struct i40e_hw *hw, bool *link_up)
 }
 
 /**
- * i40e_updatelink_status - update status of the HW network link
+ * i40e_update_link_info - update status of the HW network link
  * @hw: pointer to the hw struct
  **/
 enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw)
@@ -4831,7 +4831,7 @@ enum i40e_status_code i40e_aq_del_udp_tunnel(struct i40e_hw *hw, u8 index,
 }
 
 /**
- * i40e_aq_get_switch_resource_alloc (0x0204)
+ * i40e_aq_get_switch_resource_alloc - command (0x0204) to get allocations
  * @hw: pointer to the hw struct
  * @num_entries: pointer to u8 to store the number of resource entries returned
  * @buf: pointer to a user supplied buffer.  This buffer must be large enough
@@ -6978,7 +6978,7 @@ u8 i40e_get_phy_address(struct i40e_hw *hw, u8 dev_num)
 }
 
 /**
- * i40e_blink_phy_led
+ * i40e_blink_phy_link_led
  * @hw: pointer to the HW structure
  * @time: time how long led will blinks in secs
  * @interval: gap between LED on and off in msecs
@@ -7825,7 +7825,7 @@ enum i40e_status_code i40e_aq_set_arp_proxy_config(struct i40e_hw *hw,
 }
 
 /**
- * i40e_aq_opc_set_ns_proxy_table_entry
+ * i40e_aq_set_ns_proxy_table_entry
  * @hw: pointer to the HW structure
  * @ns_proxy_table_entry: pointer to NS table entry command struct
  * @cmd_details: pointer to command details
diff --git a/drivers/net/i40e/base/i40e_dcb.c b/drivers/net/i40e/base/i40e_dcb.c
index 27b52bc365..8f9b7e823f 100644
--- a/drivers/net/i40e/base/i40e_dcb.c
+++ b/drivers/net/i40e/base/i40e_dcb.c
@@ -235,7 +235,7 @@ static void i40e_parse_ieee_app_tlv(struct i40e_lldp_org_tlv *tlv,
 }
 
 /**
- * i40e_parse_ieee_etsrec_tlv
+ * i40e_parse_ieee_tlv
  * @tlv: IEEE 802.1Qaz TLV
  * @dcbcfg: Local store to update ETS REC data
  *
diff --git a/drivers/net/i40e/base/i40e_lan_hmc.c b/drivers/net/i40e/base/i40e_lan_hmc.c
index d3969396f0..d3bd683ff3 100644
--- a/drivers/net/i40e/base/i40e_lan_hmc.c
+++ b/drivers/net/i40e/base/i40e_lan_hmc.c
@@ -516,7 +516,7 @@ enum i40e_status_code i40e_configure_lan_hmc(struct i40e_hw *hw,
 }
 
 /**
- * i40e_delete_hmc_object - remove hmc objects
+ * i40e_delete_lan_hmc_object - remove hmc objects
  * @hw: pointer to the HW structure
  * @info: pointer to i40e_hmc_delete_obj_info struct
  *
diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c
index 561ed21136..67e58cc195 100644
--- a/drivers/net/i40e/base/i40e_nvm.c
+++ b/drivers/net/i40e/base/i40e_nvm.c
@@ -7,7 +7,7 @@
 #include "i40e_prototype.h"
 
 /**
- * i40e_init_nvm_ops - Initialize NVM function pointers
+ * i40e_init_nvm - Initialize NVM function pointers
  * @hw: pointer to the HW structure
  *
  * Setup the function pointers and the NVM info structure. Should be called
-- 
2.25.1


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [dpdk-stable] [PATCH v2 13/14] net/i40e/base: fix potentially uninitialized variables in NVM code
       [not found] ` <20210621063708.4014937-1-robinx.zhang@intel.com>
                     ` (4 preceding siblings ...)
  2021-06-21  6:37   ` [dpdk-stable] [PATCH v2 12/14] net/i40e/base: fix headers to match functions Robin Zhang
@ 2021-06-21  6:37   ` Robin Zhang
  5 siblings, 0 replies; 45+ messages in thread
From: Robin Zhang @ 2021-06-21  6:37 UTC (permalink / raw)
  To: dev
  Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, stable,
	Christopher Pau

The status of i40e_read_nvm_word is not checked, so variables set
from this function could be used uninitialized. In this case, preserve
the existing flow that does not block initialization by initializing
these values from the start.

The variable checksum from i40e_calc_nvm_checksum is used before return
value is checked. Fix this logic.

Fixes: 8d6c51fcd24b ("i40e/base: get OEM version")
Fixes: 2db70574247b ("net/i40e/base: limit PF/VF specific code to that driver only")
Fixes: 8db9e2a1b232 ("i40e: base driver")
Fixes: 3ed6c3246f43 ("i40e/base: handle AQ timeout when releasing NVM")
Cc: stable@dpdk.org

Signed-off-by: Christopher Pau <christopher.pau@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_adminq.c | 6 ++++--
 drivers/net/i40e/base/i40e_nvm.c    | 5 +++--
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c
index eafacbdbec..d27ccde29a 100644
--- a/drivers/net/i40e/base/i40e_adminq.c
+++ b/drivers/net/i40e/base/i40e_adminq.c
@@ -648,8 +648,10 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw)
 {
 	struct i40e_adminq_info *aq = &hw->aq;
 	enum i40e_status_code ret_code;
-	u16 cfg_ptr, oem_hi, oem_lo;
-	u16 eetrack_lo, eetrack_hi;
+	u16 oem_hi = 0, oem_lo = 0;
+	u16 eetrack_hi = 0;
+	u16 eetrack_lo = 0;
+	u16 cfg_ptr = 0;
 	int retry = 0;
 
 	/* verify input for valid configuration */
diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c
index 67e58cc195..f385042601 100644
--- a/drivers/net/i40e/base/i40e_nvm.c
+++ b/drivers/net/i40e/base/i40e_nvm.c
@@ -755,10 +755,11 @@ enum i40e_status_code i40e_update_nvm_checksum(struct i40e_hw *hw)
 	DEBUGFUNC("i40e_update_nvm_checksum");
 
 	ret_code = i40e_calc_nvm_checksum(hw, &checksum);
-	le_sum = CPU_TO_LE16(checksum);
-	if (ret_code == I40E_SUCCESS)
+	if (ret_code == I40E_SUCCESS) {
+		le_sum = CPU_TO_LE16(checksum);
 		ret_code = i40e_write_nvm_aq(hw, 0x00, I40E_SR_SW_CHECKSUM_WORD,
 					     1, &le_sum, true);
+	}
 
 	return ret_code;
 }
-- 
2.25.1


^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [dpdk-stable] [PATCH 13/14] net/i40e/base: fix potentially uninitialized variables in NVM code
  2021-06-18  6:38 ` [dpdk-stable] [PATCH 13/14] net/i40e/base: fix potentially uninitialized variables in NVM code Robin Zhang
@ 2021-06-21  6:52   ` Xing, Beilei
  0 siblings, 0 replies; 45+ messages in thread
From: Xing, Beilei @ 2021-06-21  6:52 UTC (permalink / raw)
  To: Zhang, RobinX, dev; +Cc: Guo, Junfeng, Yang, SteveX, stable, Pau, Christopher



> -----Original Message-----
> From: Zhang, RobinX <robinx.zhang@intel.com>
> Sent: Friday, June 18, 2021 2:39 PM
> To: dev@dpdk.org
> Cc: Xing, Beilei <beilei.xing@intel.com>; Guo, Junfeng
> <junfeng.guo@intel.com>; Yang, SteveX <stevex.yang@intel.com>; Zhang,
> RobinX <robinx.zhang@intel.com>; stable@dpdk.org; Pau, Christopher
> <christopher.pau@intel.com>
> Subject: [PATCH 13/14] net/i40e/base: fix potentially uninitialized variables in
> NVM code

Seems there're 2 fixes in the patch, please split them.

> 
> The status of i40e_read_nvm_word is not checked, so variables set from this
> function could be used uninitialized. In this case, preserve the existing flow
> that does not block initialization by initializing these values from the start.
> 
> The variable checksum from i40e_calc_nvm_checksum is used before return
> value is checked. Fix this logic.
> 
> Fixes: 8d6c51fcd24b ("i40e/base: get OEM version")
> Fixes: 2db70574247b ("net/i40e/base: limit PF/VF specific code to that driver
> only")
> Fixes: 8db9e2a1b232 ("i40e: base driver")
> Fixes: 3ed6c3246f43 ("i40e/base: handle AQ timeout when releasing NVM")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Christopher Pau <christopher.pau@intel.com>
> Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
> ---
>  drivers/net/i40e/base/i40e_adminq.c | 6 ++++--
>  drivers/net/i40e/base/i40e_nvm.c    | 5 +++--
>  2 files changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/i40e/base/i40e_adminq.c
> b/drivers/net/i40e/base/i40e_adminq.c
> index eafacbdbec..d27ccde29a 100644
> --- a/drivers/net/i40e/base/i40e_adminq.c
> +++ b/drivers/net/i40e/base/i40e_adminq.c
> @@ -648,8 +648,10 @@ enum i40e_status_code i40e_init_adminq(struct
> i40e_hw *hw)  {
>  	struct i40e_adminq_info *aq = &hw->aq;
>  	enum i40e_status_code ret_code;
> -	u16 cfg_ptr, oem_hi, oem_lo;
> -	u16 eetrack_lo, eetrack_hi;
> +	u16 oem_hi = 0, oem_lo = 0;
> +	u16 eetrack_hi = 0;
> +	u16 eetrack_lo = 0;
> +	u16 cfg_ptr = 0;
>  	int retry = 0;
> 
>  	/* verify input for valid configuration */ diff --git
> a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c
> index 67e58cc195..f385042601 100644
> --- a/drivers/net/i40e/base/i40e_nvm.c
> +++ b/drivers/net/i40e/base/i40e_nvm.c
> @@ -755,10 +755,11 @@ enum i40e_status_code
> i40e_update_nvm_checksum(struct i40e_hw *hw)
>  	DEBUGFUNC("i40e_update_nvm_checksum");
> 
>  	ret_code = i40e_calc_nvm_checksum(hw, &checksum);
> -	le_sum = CPU_TO_LE16(checksum);
> -	if (ret_code == I40E_SUCCESS)
> +	if (ret_code == I40E_SUCCESS) {
> +		le_sum = CPU_TO_LE16(checksum);
>  		ret_code = i40e_write_nvm_aq(hw, 0x00,
> I40E_SR_SW_CHECKSUM_WORD,
>  					     1, &le_sum, true);
> +	}
> 
>  	return ret_code;
>  }
> --
> 2.25.1


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [dpdk-stable] [PATCH v3 06/15] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters
       [not found] ` <20210621075206.4020456-1-robinx.zhang@intel.com>
@ 2021-06-21  7:51   ` Robin Zhang
  2021-06-21  7:51   ` [dpdk-stable] [PATCH v3 07/15] net/i40e/base: fix PF reset failed Robin Zhang
                     ` (5 subsequent siblings)
  6 siblings, 0 replies; 45+ messages in thread
From: Robin Zhang @ 2021-06-21  7:51 UTC (permalink / raw)
  To: dev
  Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, stable,
	Dawid Lukwinski

Unlike other supported adapters, 2.5G and 5G use different
PHY type identifiers for reading/writing PHY settings
and for reading link status. This commit intruduces
separate PHY identifiers for these two operation types.

Fixes: 988ed63c7441 ("net/i40e/base: add support for Carlsville device")
Cc: stable@dpdk.org

Signed-off-by: Dawid Lukwinski <dawid.lukwinski@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_adminq_cmd.h | 6 ++++--
 drivers/net/i40e/base/i40e_common.c     | 4 ++--
 drivers/net/i40e/base/i40e_type.h       | 8 ++------
 3 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
index a73a08aae6..1aafe1de38 100644
--- a/drivers/net/i40e/base/i40e_adminq_cmd.h
+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
@@ -1947,8 +1947,10 @@ enum i40e_aq_phy_type {
 	I40E_PHY_TYPE_25GBASE_LR		= 0x22,
 	I40E_PHY_TYPE_25GBASE_AOC		= 0x23,
 	I40E_PHY_TYPE_25GBASE_ACC		= 0x24,
-	I40E_PHY_TYPE_2_5GBASE_T		= 0x30,
-	I40E_PHY_TYPE_5GBASE_T			= 0x31,
+	I40E_PHY_TYPE_2_5GBASE_T		= 0x26,
+	I40E_PHY_TYPE_5GBASE_T			= 0x27,
+	I40E_PHY_TYPE_2_5GBASE_T_LINK_STATUS	= 0x30,
+	I40E_PHY_TYPE_5GBASE_T_LINK_STATUS	= 0x31,
 	I40E_PHY_TYPE_MAX,
 	I40E_PHY_TYPE_NOT_SUPPORTED_HIGH_TEMP	= 0xFD,
 	I40E_PHY_TYPE_EMPTY			= 0xFE,
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 32642f3e2b..ceedec68bf 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1280,8 +1280,8 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw)
 		break;
 	case I40E_PHY_TYPE_100BASE_TX:
 	case I40E_PHY_TYPE_1000BASE_T:
-	case I40E_PHY_TYPE_2_5GBASE_T:
-	case I40E_PHY_TYPE_5GBASE_T:
+	case I40E_PHY_TYPE_2_5GBASE_T_LINK_STATUS:
+	case I40E_PHY_TYPE_5GBASE_T_LINK_STATUS:
 	case I40E_PHY_TYPE_10GBASE_T:
 		media = I40E_MEDIA_TYPE_BASET;
 		break;
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index e5a3729183..0323887550 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -329,12 +329,8 @@ struct i40e_phy_info {
 					     I40E_PHY_TYPE_OFFSET)
 #define I40E_CAP_PHY_TYPE_25GBASE_ACC BIT_ULL(I40E_PHY_TYPE_25GBASE_ACC + \
 					     I40E_PHY_TYPE_OFFSET)
-/* Offset for 2.5G/5G PHY Types value to bit number conversion */
-#define I40E_PHY_TYPE_OFFSET2 (-10)
-#define I40E_CAP_PHY_TYPE_2_5GBASE_T BIT_ULL(I40E_PHY_TYPE_2_5GBASE_T + \
-					     I40E_PHY_TYPE_OFFSET2)
-#define I40E_CAP_PHY_TYPE_5GBASE_T BIT_ULL(I40E_PHY_TYPE_5GBASE_T + \
-					     I40E_PHY_TYPE_OFFSET2)
+#define I40E_CAP_PHY_TYPE_2_5GBASE_T BIT_ULL(I40E_PHY_TYPE_2_5GBASE_T)
+#define I40E_CAP_PHY_TYPE_5GBASE_T BIT_ULL(I40E_PHY_TYPE_5GBASE_T)
 #define I40E_HW_CAP_MAX_GPIO			30
 #define I40E_HW_CAP_MDIO_PORT_MODE_MDIO		0
 #define I40E_HW_CAP_MDIO_PORT_MODE_I2C		1
-- 
2.25.1


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [dpdk-stable] [PATCH v3 07/15] net/i40e/base: fix PF reset failed
       [not found] ` <20210621075206.4020456-1-robinx.zhang@intel.com>
  2021-06-21  7:51   ` [dpdk-stable] [PATCH v3 06/15] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters Robin Zhang
@ 2021-06-21  7:51   ` Robin Zhang
  2021-06-21  7:51   ` [dpdk-stable] [PATCH v3 08/15] net/i40e/base: fix update link data for X722 Robin Zhang
                     ` (4 subsequent siblings)
  6 siblings, 0 replies; 45+ messages in thread
From: Robin Zhang @ 2021-06-21  7:51 UTC (permalink / raw)
  To: dev
  Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, stable,
	Sylwester Dziedziuch

PF has to delete all the filters during reset.
If it is fully loaded with filters then it is possible
that it will take more than 200 ms to finish the reset
resulting in timeout during pf_reset and
PF reset failed, -15 error indication.
Increasing the timeout value for PF reset from 200 to 1000
to give PF more time to finish reset if it is loaded with filters.

Fixes: 1e32378f0774 ("i40e/base: increase PF reset max loop limit")
Cc: stable@dpdk.org

Signed-off-by: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index ceedec68bf..aa424e6010 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1341,7 +1341,7 @@ STATIC enum i40e_status_code i40e_poll_globr(struct i40e_hw *hw,
 	return I40E_ERR_RESET_FAILED;
 }
 
-#define I40E_PF_RESET_WAIT_COUNT	200
+#define I40E_PF_RESET_WAIT_COUNT	1000
 /**
  * i40e_pf_reset - Reset the PF
  * @hw: pointer to the hardware structure
-- 
2.25.1


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [dpdk-stable] [PATCH v3 08/15] net/i40e/base: fix update link data for X722
       [not found] ` <20210621075206.4020456-1-robinx.zhang@intel.com>
  2021-06-21  7:51   ` [dpdk-stable] [PATCH v3 06/15] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters Robin Zhang
  2021-06-21  7:51   ` [dpdk-stable] [PATCH v3 07/15] net/i40e/base: fix PF reset failed Robin Zhang
@ 2021-06-21  7:51   ` Robin Zhang
  2021-06-21  7:52   ` [dpdk-stable] [PATCH v3 09/15] net/i40e/base: fix AOC media type reported by ethtool Robin Zhang
                     ` (3 subsequent siblings)
  6 siblings, 0 replies; 45+ messages in thread
From: Robin Zhang @ 2021-06-21  7:51 UTC (permalink / raw)
  To: dev
  Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, stable,
	Jaroslaw Gawin

The X722 card has 'Link Type' information elsewhere than the X710.
Previously, for all cards, the 'Link Type' information was retrieved by
opcode 0x0607 and this value was wrong for all X722 cards.
Now this information for X722 only is taken by opcode 0x0600
(function: i40e_aq_get_phy_capabilities) instead of an opcode
0x0607 (function: i40e_aq_get_link_info).
All other parameters read by opcode 0x0607 unchanged.

Fixes: e6691b428eb1 ("i40e/base: fix PHY NVM interaction")
Fixes: 75c3de654ead ("net/i40e/base: fix long link down notification time")
Cc: stable@dpdk.org

Signed-off-by: Jaroslaw Gawin <jaroslawx.gawin@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_common.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index aa424e6010..ef061a6b63 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -2078,6 +2078,9 @@ enum i40e_status_code i40e_aq_get_link_info(struct i40e_hw *hw,
 	     hw->aq.fw_min_ver < 40)) && hw_link_info->phy_type == 0xE)
 		hw_link_info->phy_type = I40E_PHY_TYPE_10GBASE_SFPP_CU;
 
+	/* 'Get Link Status' response data structure from X722 FW has
+	 * different format and does not contain this information
+	 */
 	if (hw->flags & I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE &&
 	    hw->mac.type != I40E_MAC_X722) {
 		__le32 tmp;
@@ -2948,10 +2951,13 @@ enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw)
 		return status;
 
 	/* extra checking needed to ensure link info to user is timely */
-	if ((hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) &&
-	    ((hw->phy.link_info.link_info & I40E_AQ_LINK_UP) ||
-	     !(hw->phy.link_info_old.link_info & I40E_AQ_LINK_UP))) {
-		status = i40e_aq_get_phy_capabilities(hw, false, false,
+	if (((hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) &&
+	     ((hw->phy.link_info.link_info & I40E_AQ_LINK_UP) ||
+	      !(hw->phy.link_info_old.link_info & I40E_AQ_LINK_UP))) ||
+		hw->mac.type == I40E_MAC_X722) {
+		status = i40e_aq_get_phy_capabilities(hw, false,
+						      hw->mac.type ==
+						      I40E_MAC_X722,
 						      &abilities, NULL);
 		if (status)
 			return status;
-- 
2.25.1


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [dpdk-stable] [PATCH v3 09/15] net/i40e/base: fix AOC media type reported by ethtool
       [not found] ` <20210621075206.4020456-1-robinx.zhang@intel.com>
                     ` (2 preceding siblings ...)
  2021-06-21  7:51   ` [dpdk-stable] [PATCH v3 08/15] net/i40e/base: fix update link data for X722 Robin Zhang
@ 2021-06-21  7:52   ` Robin Zhang
  2021-06-21  7:52   ` [dpdk-stable] [PATCH v3 12/15] net/i40e/base: fix headers to match functions Robin Zhang
                     ` (2 subsequent siblings)
  6 siblings, 0 replies; 45+ messages in thread
From: Robin Zhang @ 2021-06-21  7:52 UTC (permalink / raw)
  To: dev
  Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, stable,
	Dawid Lukwinski

For Active Optical Cable (AOC) the correct media type is "Fibre",
not "Direct Attach Copper".

Fixes: d749d4d89969 ("i40e/base: add AOC PHY types")
Fixes: aa153cc89ff0 ("net/i40e/base: add new PHY types for 25G AOC and
ACC")
Cc: stable@dpdk.org

Signed-off-by: Dawid Lukwinski <dawid.lukwinski@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_common.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index ef061a6b63..2ca6a13e79 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1276,6 +1276,9 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw)
 	case I40E_PHY_TYPE_40GBASE_LR4:
 	case I40E_PHY_TYPE_25GBASE_LR:
 	case I40E_PHY_TYPE_25GBASE_SR:
+	case I40E_PHY_TYPE_10GBASE_AOC:
+	case I40E_PHY_TYPE_25GBASE_AOC:
+	case I40E_PHY_TYPE_40GBASE_AOC:
 		media = I40E_MEDIA_TYPE_FIBER;
 		break;
 	case I40E_PHY_TYPE_100BASE_TX:
@@ -1290,10 +1293,7 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw)
 	case I40E_PHY_TYPE_10GBASE_CR1:
 	case I40E_PHY_TYPE_40GBASE_CR4:
 	case I40E_PHY_TYPE_10GBASE_SFPP_CU:
-	case I40E_PHY_TYPE_40GBASE_AOC:
-	case I40E_PHY_TYPE_10GBASE_AOC:
 	case I40E_PHY_TYPE_25GBASE_CR:
-	case I40E_PHY_TYPE_25GBASE_AOC:
 	case I40E_PHY_TYPE_25GBASE_ACC:
 		media = I40E_MEDIA_TYPE_DA;
 		break;
-- 
2.25.1


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [dpdk-stable] [PATCH v3 12/15] net/i40e/base: fix headers to match functions
       [not found] ` <20210621075206.4020456-1-robinx.zhang@intel.com>
                     ` (3 preceding siblings ...)
  2021-06-21  7:52   ` [dpdk-stable] [PATCH v3 09/15] net/i40e/base: fix AOC media type reported by ethtool Robin Zhang
@ 2021-06-21  7:52   ` Robin Zhang
  2021-06-21  7:52   ` [dpdk-stable] [PATCH v3 13/15] net/i40e/base: fix potentially uninitialized variables in NVM code Robin Zhang
  2021-06-21  7:52   ` [dpdk-stable] [PATCH v3 14/15] net/i40e/base: fix checksum is used before return value is checked Robin Zhang
  6 siblings, 0 replies; 45+ messages in thread
From: Robin Zhang @ 2021-06-21  7:52 UTC (permalink / raw)
  To: dev
  Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, stable,
	Jesse Brandeburg

Fix several kernel-doc warnings when building with W=1. These changes
are only to comments.

Fixes: 8db9e2a1b232 ("i40e: base driver")
Fixes: 842ea1996335 ("i40e/base: save link module type")
Fixes: fd72a2284a89 ("i40e/base: support LED blinking with new PHY")
Fixes: 788fc17b2dec ("i40e/base: support proxy config for X722")
Cc: stable@dpdk.org

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_common.c  | 10 +++++-----
 drivers/net/i40e/base/i40e_dcb.c     |  2 +-
 drivers/net/i40e/base/i40e_lan_hmc.c |  2 +-
 drivers/net/i40e/base/i40e_nvm.c     |  2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index e077bf8fd3..3f3896aea4 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -2678,7 +2678,7 @@ enum i40e_status_code i40e_aq_set_vsi_vlan_promisc(struct i40e_hw *hw,
 }
 
 /**
- * i40e_get_vsi_params - get VSI configuration info
+ * i40e_aq_get_vsi_params - get VSI configuration info
  * @hw: pointer to the hw struct
  * @vsi_ctx: pointer to a vsi context struct
  * @cmd_details: pointer to command details structure or NULL
@@ -2939,7 +2939,7 @@ enum i40e_status_code i40e_get_link_status(struct i40e_hw *hw, bool *link_up)
 }
 
 /**
- * i40e_updatelink_status - update status of the HW network link
+ * i40e_update_link_info - update status of the HW network link
  * @hw: pointer to the hw struct
  **/
 enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw)
@@ -4831,7 +4831,7 @@ enum i40e_status_code i40e_aq_del_udp_tunnel(struct i40e_hw *hw, u8 index,
 }
 
 /**
- * i40e_aq_get_switch_resource_alloc (0x0204)
+ * i40e_aq_get_switch_resource_alloc - command (0x0204) to get allocations
  * @hw: pointer to the hw struct
  * @num_entries: pointer to u8 to store the number of resource entries returned
  * @buf: pointer to a user supplied buffer.  This buffer must be large enough
@@ -6978,7 +6978,7 @@ u8 i40e_get_phy_address(struct i40e_hw *hw, u8 dev_num)
 }
 
 /**
- * i40e_blink_phy_led
+ * i40e_blink_phy_link_led
  * @hw: pointer to the HW structure
  * @time: time how long led will blinks in secs
  * @interval: gap between LED on and off in msecs
@@ -7825,7 +7825,7 @@ enum i40e_status_code i40e_aq_set_arp_proxy_config(struct i40e_hw *hw,
 }
 
 /**
- * i40e_aq_opc_set_ns_proxy_table_entry
+ * i40e_aq_set_ns_proxy_table_entry
  * @hw: pointer to the HW structure
  * @ns_proxy_table_entry: pointer to NS table entry command struct
  * @cmd_details: pointer to command details
diff --git a/drivers/net/i40e/base/i40e_dcb.c b/drivers/net/i40e/base/i40e_dcb.c
index 27b52bc365..8f9b7e823f 100644
--- a/drivers/net/i40e/base/i40e_dcb.c
+++ b/drivers/net/i40e/base/i40e_dcb.c
@@ -235,7 +235,7 @@ static void i40e_parse_ieee_app_tlv(struct i40e_lldp_org_tlv *tlv,
 }
 
 /**
- * i40e_parse_ieee_etsrec_tlv
+ * i40e_parse_ieee_tlv
  * @tlv: IEEE 802.1Qaz TLV
  * @dcbcfg: Local store to update ETS REC data
  *
diff --git a/drivers/net/i40e/base/i40e_lan_hmc.c b/drivers/net/i40e/base/i40e_lan_hmc.c
index d3969396f0..d3bd683ff3 100644
--- a/drivers/net/i40e/base/i40e_lan_hmc.c
+++ b/drivers/net/i40e/base/i40e_lan_hmc.c
@@ -516,7 +516,7 @@ enum i40e_status_code i40e_configure_lan_hmc(struct i40e_hw *hw,
 }
 
 /**
- * i40e_delete_hmc_object - remove hmc objects
+ * i40e_delete_lan_hmc_object - remove hmc objects
  * @hw: pointer to the HW structure
  * @info: pointer to i40e_hmc_delete_obj_info struct
  *
diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c
index 561ed21136..67e58cc195 100644
--- a/drivers/net/i40e/base/i40e_nvm.c
+++ b/drivers/net/i40e/base/i40e_nvm.c
@@ -7,7 +7,7 @@
 #include "i40e_prototype.h"
 
 /**
- * i40e_init_nvm_ops - Initialize NVM function pointers
+ * i40e_init_nvm - Initialize NVM function pointers
  * @hw: pointer to the HW structure
  *
  * Setup the function pointers and the NVM info structure. Should be called
-- 
2.25.1


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [dpdk-stable] [PATCH v3 13/15] net/i40e/base: fix potentially uninitialized variables in NVM code
       [not found] ` <20210621075206.4020456-1-robinx.zhang@intel.com>
                     ` (4 preceding siblings ...)
  2021-06-21  7:52   ` [dpdk-stable] [PATCH v3 12/15] net/i40e/base: fix headers to match functions Robin Zhang
@ 2021-06-21  7:52   ` Robin Zhang
  2021-06-21  7:52   ` [dpdk-stable] [PATCH v3 14/15] net/i40e/base: fix checksum is used before return value is checked Robin Zhang
  6 siblings, 0 replies; 45+ messages in thread
From: Robin Zhang @ 2021-06-21  7:52 UTC (permalink / raw)
  To: dev
  Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, stable,
	Christopher Pau

The status of i40e_read_nvm_word is not checked, so variables set
from this function could be used uninitialized. In this case, preserve
the existing flow that does not block initialization by initializing
these values from the start.

Fixes: 8d6c51fcd24b ("i40e/base: get OEM version")
Fixes: 2db70574247b ("net/i40e/base: limit PF/VF specific code to that driver only")
Cc: stable@dpdk.org

Signed-off-by: Christopher Pau <christopher.pau@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_adminq.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c
index eafacbdbec..d27ccde29a 100644
--- a/drivers/net/i40e/base/i40e_adminq.c
+++ b/drivers/net/i40e/base/i40e_adminq.c
@@ -648,8 +648,10 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw)
 {
 	struct i40e_adminq_info *aq = &hw->aq;
 	enum i40e_status_code ret_code;
-	u16 cfg_ptr, oem_hi, oem_lo;
-	u16 eetrack_lo, eetrack_hi;
+	u16 oem_hi = 0, oem_lo = 0;
+	u16 eetrack_hi = 0;
+	u16 eetrack_lo = 0;
+	u16 cfg_ptr = 0;
 	int retry = 0;
 
 	/* verify input for valid configuration */
-- 
2.25.1


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [dpdk-stable] [PATCH v3 14/15] net/i40e/base: fix checksum is used before return value is checked
       [not found] ` <20210621075206.4020456-1-robinx.zhang@intel.com>
                     ` (5 preceding siblings ...)
  2021-06-21  7:52   ` [dpdk-stable] [PATCH v3 13/15] net/i40e/base: fix potentially uninitialized variables in NVM code Robin Zhang
@ 2021-06-21  7:52   ` Robin Zhang
  6 siblings, 0 replies; 45+ messages in thread
From: Robin Zhang @ 2021-06-21  7:52 UTC (permalink / raw)
  To: dev
  Cc: beilei.xing, junfeng.guo, stevex.yang, Robin Zhang, stable,
	Christopher Pau

The variable checksum from i40e_calc_nvm_checksum is used before return
value is checked. Fix this logic.

Fixes: 8db9e2a1b232 ("i40e: base driver")
Fixes: 3ed6c3246f43 ("i40e/base: handle AQ timeout when releasing NVM")
Cc: stable@dpdk.org

Signed-off-by: Christopher Pau <christopher.pau@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_nvm.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c
index 67e58cc195..f385042601 100644
--- a/drivers/net/i40e/base/i40e_nvm.c
+++ b/drivers/net/i40e/base/i40e_nvm.c
@@ -755,10 +755,11 @@ enum i40e_status_code i40e_update_nvm_checksum(struct i40e_hw *hw)
 	DEBUGFUNC("i40e_update_nvm_checksum");
 
 	ret_code = i40e_calc_nvm_checksum(hw, &checksum);
-	le_sum = CPU_TO_LE16(checksum);
-	if (ret_code == I40E_SUCCESS)
+	if (ret_code == I40E_SUCCESS) {
+		le_sum = CPU_TO_LE16(checksum);
 		ret_code = i40e_write_nvm_aq(hw, 0x00, I40E_SR_SW_CHECKSUM_WORD,
 					     1, &le_sum, true);
+	}
 
 	return ret_code;
 }
-- 
2.25.1


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [dpdk-stable] [PATCH v4 05/18] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters
       [not found] ` <20210906020258.1291688-1-robinx.zhang@intel.com>
@ 2021-09-06  2:02   ` Robin Zhang
  2021-09-29 16:21     ` Ferruh Yigit
  2021-09-06  2:02   ` [dpdk-stable] [PATCH v4 06/18] net/i40e/base: fix PF reset failed Robin Zhang
                     ` (5 subsequent siblings)
  6 siblings, 1 reply; 45+ messages in thread
From: Robin Zhang @ 2021-09-06  2:02 UTC (permalink / raw)
  To: dev
  Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton,
	jijiang.liu, jing.d.chen, heqing.zhu, cunming.liang, wenzhuo.lu,
	roy.fan.zhang, andrey.chilikin, echaudro, junfeng.guo,
	stevex.yang, Robin Zhang, stable, Dawid Lukwinski

Unlike other supported adapters, 2.5G and 5G use different
PHY type identifiers for reading/writing PHY settings
and for reading link status. This commit intruduces
separate PHY identifiers for these two operation types.

Fixes: 988ed63c7441 ("net/i40e/base: add support for Carlsville device")
Cc: stable@dpdk.org

Signed-off-by: Dawid Lukwinski <dawid.lukwinski@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_adminq_cmd.h | 6 ++++--
 drivers/net/i40e/base/i40e_common.c     | 4 ++--
 drivers/net/i40e/base/i40e_type.h       | 8 ++------
 3 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
index a96527f31c..af9dec1d7f 100644
--- a/drivers/net/i40e/base/i40e_adminq_cmd.h
+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
@@ -1947,8 +1947,10 @@ enum i40e_aq_phy_type {
 	I40E_PHY_TYPE_25GBASE_LR		= 0x22,
 	I40E_PHY_TYPE_25GBASE_AOC		= 0x23,
 	I40E_PHY_TYPE_25GBASE_ACC		= 0x24,
-	I40E_PHY_TYPE_2_5GBASE_T		= 0x30,
-	I40E_PHY_TYPE_5GBASE_T			= 0x31,
+	I40E_PHY_TYPE_2_5GBASE_T		= 0x26,
+	I40E_PHY_TYPE_5GBASE_T			= 0x27,
+	I40E_PHY_TYPE_2_5GBASE_T_LINK_STATUS	= 0x30,
+	I40E_PHY_TYPE_5GBASE_T_LINK_STATUS	= 0x31,
 	I40E_PHY_TYPE_MAX,
 	I40E_PHY_TYPE_NOT_SUPPORTED_HIGH_TEMP	= 0xFD,
 	I40E_PHY_TYPE_EMPTY			= 0xFE,
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 32642f3e2b..ceedec68bf 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1280,8 +1280,8 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw)
 		break;
 	case I40E_PHY_TYPE_100BASE_TX:
 	case I40E_PHY_TYPE_1000BASE_T:
-	case I40E_PHY_TYPE_2_5GBASE_T:
-	case I40E_PHY_TYPE_5GBASE_T:
+	case I40E_PHY_TYPE_2_5GBASE_T_LINK_STATUS:
+	case I40E_PHY_TYPE_5GBASE_T_LINK_STATUS:
 	case I40E_PHY_TYPE_10GBASE_T:
 		media = I40E_MEDIA_TYPE_BASET;
 		break;
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index e5a3729183..0323887550 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -329,12 +329,8 @@ struct i40e_phy_info {
 					     I40E_PHY_TYPE_OFFSET)
 #define I40E_CAP_PHY_TYPE_25GBASE_ACC BIT_ULL(I40E_PHY_TYPE_25GBASE_ACC + \
 					     I40E_PHY_TYPE_OFFSET)
-/* Offset for 2.5G/5G PHY Types value to bit number conversion */
-#define I40E_PHY_TYPE_OFFSET2 (-10)
-#define I40E_CAP_PHY_TYPE_2_5GBASE_T BIT_ULL(I40E_PHY_TYPE_2_5GBASE_T + \
-					     I40E_PHY_TYPE_OFFSET2)
-#define I40E_CAP_PHY_TYPE_5GBASE_T BIT_ULL(I40E_PHY_TYPE_5GBASE_T + \
-					     I40E_PHY_TYPE_OFFSET2)
+#define I40E_CAP_PHY_TYPE_2_5GBASE_T BIT_ULL(I40E_PHY_TYPE_2_5GBASE_T)
+#define I40E_CAP_PHY_TYPE_5GBASE_T BIT_ULL(I40E_PHY_TYPE_5GBASE_T)
 #define I40E_HW_CAP_MAX_GPIO			30
 #define I40E_HW_CAP_MDIO_PORT_MODE_MDIO		0
 #define I40E_HW_CAP_MDIO_PORT_MODE_I2C		1
-- 
2.25.1


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [dpdk-stable] [PATCH v4 06/18] net/i40e/base: fix PF reset failed
       [not found] ` <20210906020258.1291688-1-robinx.zhang@intel.com>
  2021-09-06  2:02   ` [dpdk-stable] [PATCH v4 05/18] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters Robin Zhang
@ 2021-09-06  2:02   ` Robin Zhang
  2021-09-29 16:21     ` Ferruh Yigit
  2021-09-06  2:02   ` [dpdk-stable] [PATCH v4 07/18] net/i40e/base: fix update link data for X722 Robin Zhang
                     ` (4 subsequent siblings)
  6 siblings, 1 reply; 45+ messages in thread
From: Robin Zhang @ 2021-09-06  2:02 UTC (permalink / raw)
  To: dev
  Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton,
	jijiang.liu, jing.d.chen, heqing.zhu, cunming.liang, wenzhuo.lu,
	roy.fan.zhang, andrey.chilikin, echaudro, junfeng.guo,
	stevex.yang, Robin Zhang, stable, Sylwester Dziedziuch

PF has to delete all the filters during reset.
If it is fully loaded with filters then it is possible
that it will take more than 200 ms to finish the reset
resulting in timeout during pf_reset and
PF reset failed, -15 error indication.
Increasing the timeout value for PF reset from 200 to 1000
to give PF more time to finish reset if it is loaded with filters.

Fixes: 1e32378f0774 ("i40e/base: increase PF reset max loop limit")
Cc: stable@dpdk.org

Signed-off-by: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index ceedec68bf..aa424e6010 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1341,7 +1341,7 @@ STATIC enum i40e_status_code i40e_poll_globr(struct i40e_hw *hw,
 	return I40E_ERR_RESET_FAILED;
 }
 
-#define I40E_PF_RESET_WAIT_COUNT	200
+#define I40E_PF_RESET_WAIT_COUNT	1000
 /**
  * i40e_pf_reset - Reset the PF
  * @hw: pointer to the hardware structure
-- 
2.25.1


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [dpdk-stable] [PATCH v4 07/18] net/i40e/base: fix update link data for X722
       [not found] ` <20210906020258.1291688-1-robinx.zhang@intel.com>
  2021-09-06  2:02   ` [dpdk-stable] [PATCH v4 05/18] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters Robin Zhang
  2021-09-06  2:02   ` [dpdk-stable] [PATCH v4 06/18] net/i40e/base: fix PF reset failed Robin Zhang
@ 2021-09-06  2:02   ` Robin Zhang
  2021-09-06  2:02   ` [dpdk-stable] [PATCH v4 08/18] net/i40e/base: fix AOC media type reported by ethtool Robin Zhang
                     ` (3 subsequent siblings)
  6 siblings, 0 replies; 45+ messages in thread
From: Robin Zhang @ 2021-09-06  2:02 UTC (permalink / raw)
  To: dev
  Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton,
	jijiang.liu, jing.d.chen, heqing.zhu, cunming.liang, wenzhuo.lu,
	roy.fan.zhang, andrey.chilikin, echaudro, junfeng.guo,
	stevex.yang, Robin Zhang, stable, Jaroslaw Gawin

The X722 card has 'Link Type' information elsewhere than the X710.
Previously, for all cards, the 'Link Type' information was retrieved by
opcode 0x0607 and this value was wrong for all X722 cards.
Now this information for X722 only is taken by opcode 0x0600
(function: i40e_aq_get_phy_capabilities) instead of an opcode
0x0607 (function: i40e_aq_get_link_info).
All other parameters read by opcode 0x0607 unchanged.

Fixes: e6691b428eb1 ("i40e/base: fix PHY NVM interaction")
Fixes: 75c3de654ead ("net/i40e/base: fix long link down notification time")
Cc: stable@dpdk.org

Signed-off-by: Jaroslaw Gawin <jaroslawx.gawin@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_common.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index aa424e6010..ef061a6b63 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -2078,6 +2078,9 @@ enum i40e_status_code i40e_aq_get_link_info(struct i40e_hw *hw,
 	     hw->aq.fw_min_ver < 40)) && hw_link_info->phy_type == 0xE)
 		hw_link_info->phy_type = I40E_PHY_TYPE_10GBASE_SFPP_CU;
 
+	/* 'Get Link Status' response data structure from X722 FW has
+	 * different format and does not contain this information
+	 */
 	if (hw->flags & I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE &&
 	    hw->mac.type != I40E_MAC_X722) {
 		__le32 tmp;
@@ -2948,10 +2951,13 @@ enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw)
 		return status;
 
 	/* extra checking needed to ensure link info to user is timely */
-	if ((hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) &&
-	    ((hw->phy.link_info.link_info & I40E_AQ_LINK_UP) ||
-	     !(hw->phy.link_info_old.link_info & I40E_AQ_LINK_UP))) {
-		status = i40e_aq_get_phy_capabilities(hw, false, false,
+	if (((hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) &&
+	     ((hw->phy.link_info.link_info & I40E_AQ_LINK_UP) ||
+	      !(hw->phy.link_info_old.link_info & I40E_AQ_LINK_UP))) ||
+		hw->mac.type == I40E_MAC_X722) {
+		status = i40e_aq_get_phy_capabilities(hw, false,
+						      hw->mac.type ==
+						      I40E_MAC_X722,
 						      &abilities, NULL);
 		if (status)
 			return status;
-- 
2.25.1


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [dpdk-stable] [PATCH v4 08/18] net/i40e/base: fix AOC media type reported by ethtool
       [not found] ` <20210906020258.1291688-1-robinx.zhang@intel.com>
                     ` (2 preceding siblings ...)
  2021-09-06  2:02   ` [dpdk-stable] [PATCH v4 07/18] net/i40e/base: fix update link data for X722 Robin Zhang
@ 2021-09-06  2:02   ` Robin Zhang
  2021-09-29 16:21     ` [dpdk-stable] [dpdk-dev] " Ferruh Yigit
  2021-09-06  2:02   ` [dpdk-stable] [PATCH v4 10/18] net/i40e/base: fix headers to match functions Robin Zhang
                     ` (2 subsequent siblings)
  6 siblings, 1 reply; 45+ messages in thread
From: Robin Zhang @ 2021-09-06  2:02 UTC (permalink / raw)
  To: dev
  Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton,
	jijiang.liu, jing.d.chen, heqing.zhu, cunming.liang, wenzhuo.lu,
	roy.fan.zhang, andrey.chilikin, echaudro, junfeng.guo,
	stevex.yang, Robin Zhang, stable, Dawid Lukwinski

For Active Optical Cable (AOC) the correct media type is "Fibre",
not "Direct Attach Copper".

Fixes: d749d4d89969 ("i40e/base: add AOC PHY types")
Fixes: aa153cc89ff0 ("net/i40e/base: add new PHY types for 25G AOC and
ACC")
Cc: stable@dpdk.org

Signed-off-by: Dawid Lukwinski <dawid.lukwinski@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_common.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index ef061a6b63..2ca6a13e79 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1276,6 +1276,9 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw)
 	case I40E_PHY_TYPE_40GBASE_LR4:
 	case I40E_PHY_TYPE_25GBASE_LR:
 	case I40E_PHY_TYPE_25GBASE_SR:
+	case I40E_PHY_TYPE_10GBASE_AOC:
+	case I40E_PHY_TYPE_25GBASE_AOC:
+	case I40E_PHY_TYPE_40GBASE_AOC:
 		media = I40E_MEDIA_TYPE_FIBER;
 		break;
 	case I40E_PHY_TYPE_100BASE_TX:
@@ -1290,10 +1293,7 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw)
 	case I40E_PHY_TYPE_10GBASE_CR1:
 	case I40E_PHY_TYPE_40GBASE_CR4:
 	case I40E_PHY_TYPE_10GBASE_SFPP_CU:
-	case I40E_PHY_TYPE_40GBASE_AOC:
-	case I40E_PHY_TYPE_10GBASE_AOC:
 	case I40E_PHY_TYPE_25GBASE_CR:
-	case I40E_PHY_TYPE_25GBASE_AOC:
 	case I40E_PHY_TYPE_25GBASE_ACC:
 		media = I40E_MEDIA_TYPE_DA;
 		break;
-- 
2.25.1


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [dpdk-stable] [PATCH v4 10/18] net/i40e/base: fix headers to match functions
       [not found] ` <20210906020258.1291688-1-robinx.zhang@intel.com>
                     ` (3 preceding siblings ...)
  2021-09-06  2:02   ` [dpdk-stable] [PATCH v4 08/18] net/i40e/base: fix AOC media type reported by ethtool Robin Zhang
@ 2021-09-06  2:02   ` Robin Zhang
  2021-09-29 15:59     ` [dpdk-stable] [dpdk-dev] " Ferruh Yigit
  2021-09-06  2:02   ` [dpdk-stable] [PATCH v4 11/18] net/i40e/base: fix potentially uninitialized variables in NVM code Robin Zhang
  2021-09-06  2:02   ` [dpdk-stable] [PATCH v4 12/18] net/i40e/base: fix checksum is used before return value is checked Robin Zhang
  6 siblings, 1 reply; 45+ messages in thread
From: Robin Zhang @ 2021-09-06  2:02 UTC (permalink / raw)
  To: dev
  Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton,
	jijiang.liu, jing.d.chen, heqing.zhu, cunming.liang, wenzhuo.lu,
	roy.fan.zhang, andrey.chilikin, echaudro, junfeng.guo,
	stevex.yang, Robin Zhang, stable, Jesse Brandeburg

Fix several kernel-doc warnings when building with W=1. These changes
are only to comments.

Fixes: 8db9e2a1b232 ("i40e: base driver")
Fixes: 842ea1996335 ("i40e/base: save link module type")
Fixes: fd72a2284a89 ("i40e/base: support LED blinking with new PHY")
Fixes: 788fc17b2dec ("i40e/base: support proxy config for X722")
Cc: stable@dpdk.org

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_common.c  | 10 +++++-----
 drivers/net/i40e/base/i40e_dcb.c     |  2 +-
 drivers/net/i40e/base/i40e_lan_hmc.c |  2 +-
 drivers/net/i40e/base/i40e_nvm.c     |  2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 2ca6a13e79..baa51e1396 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -2677,7 +2677,7 @@ enum i40e_status_code i40e_aq_set_vsi_vlan_promisc(struct i40e_hw *hw,
 }
 
 /**
- * i40e_get_vsi_params - get VSI configuration info
+ * i40e_aq_get_vsi_params - get VSI configuration info
  * @hw: pointer to the hw struct
  * @vsi_ctx: pointer to a vsi context struct
  * @cmd_details: pointer to command details structure or NULL
@@ -2938,7 +2938,7 @@ enum i40e_status_code i40e_get_link_status(struct i40e_hw *hw, bool *link_up)
 }
 
 /**
- * i40e_updatelink_status - update status of the HW network link
+ * i40e_update_link_info - update status of the HW network link
  * @hw: pointer to the hw struct
  **/
 enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw)
@@ -4830,7 +4830,7 @@ enum i40e_status_code i40e_aq_del_udp_tunnel(struct i40e_hw *hw, u8 index,
 }
 
 /**
- * i40e_aq_get_switch_resource_alloc (0x0204)
+ * i40e_aq_get_switch_resource_alloc - command (0x0204) to get allocations
  * @hw: pointer to the hw struct
  * @num_entries: pointer to u8 to store the number of resource entries returned
  * @buf: pointer to a user supplied buffer.  This buffer must be large enough
@@ -6977,7 +6977,7 @@ u8 i40e_get_phy_address(struct i40e_hw *hw, u8 dev_num)
 }
 
 /**
- * i40e_blink_phy_led
+ * i40e_blink_phy_link_led
  * @hw: pointer to the HW structure
  * @time: time how long led will blinks in secs
  * @interval: gap between LED on and off in msecs
@@ -7824,7 +7824,7 @@ enum i40e_status_code i40e_aq_set_arp_proxy_config(struct i40e_hw *hw,
 }
 
 /**
- * i40e_aq_opc_set_ns_proxy_table_entry
+ * i40e_aq_set_ns_proxy_table_entry
  * @hw: pointer to the HW structure
  * @ns_proxy_table_entry: pointer to NS table entry command struct
  * @cmd_details: pointer to command details
diff --git a/drivers/net/i40e/base/i40e_dcb.c b/drivers/net/i40e/base/i40e_dcb.c
index 27b52bc365..8f9b7e823f 100644
--- a/drivers/net/i40e/base/i40e_dcb.c
+++ b/drivers/net/i40e/base/i40e_dcb.c
@@ -235,7 +235,7 @@ static void i40e_parse_ieee_app_tlv(struct i40e_lldp_org_tlv *tlv,
 }
 
 /**
- * i40e_parse_ieee_etsrec_tlv
+ * i40e_parse_ieee_tlv
  * @tlv: IEEE 802.1Qaz TLV
  * @dcbcfg: Local store to update ETS REC data
  *
diff --git a/drivers/net/i40e/base/i40e_lan_hmc.c b/drivers/net/i40e/base/i40e_lan_hmc.c
index d3969396f0..d3bd683ff3 100644
--- a/drivers/net/i40e/base/i40e_lan_hmc.c
+++ b/drivers/net/i40e/base/i40e_lan_hmc.c
@@ -516,7 +516,7 @@ enum i40e_status_code i40e_configure_lan_hmc(struct i40e_hw *hw,
 }
 
 /**
- * i40e_delete_hmc_object - remove hmc objects
+ * i40e_delete_lan_hmc_object - remove hmc objects
  * @hw: pointer to the HW structure
  * @info: pointer to i40e_hmc_delete_obj_info struct
  *
diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c
index 561ed21136..67e58cc195 100644
--- a/drivers/net/i40e/base/i40e_nvm.c
+++ b/drivers/net/i40e/base/i40e_nvm.c
@@ -7,7 +7,7 @@
 #include "i40e_prototype.h"
 
 /**
- * i40e_init_nvm_ops - Initialize NVM function pointers
+ * i40e_init_nvm - Initialize NVM function pointers
  * @hw: pointer to the HW structure
  *
  * Setup the function pointers and the NVM info structure. Should be called
-- 
2.25.1


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [dpdk-stable] [PATCH v4 11/18] net/i40e/base: fix potentially uninitialized variables in NVM code
       [not found] ` <20210906020258.1291688-1-robinx.zhang@intel.com>
                     ` (4 preceding siblings ...)
  2021-09-06  2:02   ` [dpdk-stable] [PATCH v4 10/18] net/i40e/base: fix headers to match functions Robin Zhang
@ 2021-09-06  2:02   ` Robin Zhang
  2021-09-06  2:02   ` [dpdk-stable] [PATCH v4 12/18] net/i40e/base: fix checksum is used before return value is checked Robin Zhang
  6 siblings, 0 replies; 45+ messages in thread
From: Robin Zhang @ 2021-09-06  2:02 UTC (permalink / raw)
  To: dev
  Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton,
	jijiang.liu, jing.d.chen, heqing.zhu, cunming.liang, wenzhuo.lu,
	roy.fan.zhang, andrey.chilikin, echaudro, junfeng.guo,
	stevex.yang, Robin Zhang, stable, Christopher Pau

The status of i40e_read_nvm_word is not checked, so variables set
from this function could be used uninitialized. In this case, preserve
the existing flow that does not block initialization by initializing
these values from the start.

Fixes: 8d6c51fcd24b ("i40e/base: get OEM version")
Fixes: 2db70574247b ("net/i40e/base: limit PF/VF specific code to that driver only")
Cc: stable@dpdk.org

Signed-off-by: Christopher Pau <christopher.pau@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_adminq.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c
index eafacbdbec..d27ccde29a 100644
--- a/drivers/net/i40e/base/i40e_adminq.c
+++ b/drivers/net/i40e/base/i40e_adminq.c
@@ -648,8 +648,10 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw)
 {
 	struct i40e_adminq_info *aq = &hw->aq;
 	enum i40e_status_code ret_code;
-	u16 cfg_ptr, oem_hi, oem_lo;
-	u16 eetrack_lo, eetrack_hi;
+	u16 oem_hi = 0, oem_lo = 0;
+	u16 eetrack_hi = 0;
+	u16 eetrack_lo = 0;
+	u16 cfg_ptr = 0;
 	int retry = 0;
 
 	/* verify input for valid configuration */
-- 
2.25.1


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [dpdk-stable] [PATCH v4 12/18] net/i40e/base: fix checksum is used before return value is checked
       [not found] ` <20210906020258.1291688-1-robinx.zhang@intel.com>
                     ` (5 preceding siblings ...)
  2021-09-06  2:02   ` [dpdk-stable] [PATCH v4 11/18] net/i40e/base: fix potentially uninitialized variables in NVM code Robin Zhang
@ 2021-09-06  2:02   ` Robin Zhang
  6 siblings, 0 replies; 45+ messages in thread
From: Robin Zhang @ 2021-09-06  2:02 UTC (permalink / raw)
  To: dev
  Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton,
	jijiang.liu, jing.d.chen, heqing.zhu, cunming.liang, wenzhuo.lu,
	roy.fan.zhang, andrey.chilikin, echaudro, junfeng.guo,
	stevex.yang, Robin Zhang, stable, Christopher Pau

The variable checksum from i40e_calc_nvm_checksum is used before return
value is checked. Fix this logic.

Fixes: 8db9e2a1b232 ("i40e: base driver")
Fixes: 3ed6c3246f43 ("i40e/base: handle AQ timeout when releasing NVM")
Cc: stable@dpdk.org

Signed-off-by: Christopher Pau <christopher.pau@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_nvm.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c
index 67e58cc195..f385042601 100644
--- a/drivers/net/i40e/base/i40e_nvm.c
+++ b/drivers/net/i40e/base/i40e_nvm.c
@@ -755,10 +755,11 @@ enum i40e_status_code i40e_update_nvm_checksum(struct i40e_hw *hw)
 	DEBUGFUNC("i40e_update_nvm_checksum");
 
 	ret_code = i40e_calc_nvm_checksum(hw, &checksum);
-	le_sum = CPU_TO_LE16(checksum);
-	if (ret_code == I40E_SUCCESS)
+	if (ret_code == I40E_SUCCESS) {
+		le_sum = CPU_TO_LE16(checksum);
 		ret_code = i40e_write_nvm_aq(hw, 0x00, I40E_SR_SW_CHECKSUM_WORD,
 					     1, &le_sum, true);
+	}
 
 	return ret_code;
 }
-- 
2.25.1


^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH v4 10/18] net/i40e/base: fix headers to match functions
  2021-09-06  2:02   ` [dpdk-stable] [PATCH v4 10/18] net/i40e/base: fix headers to match functions Robin Zhang
@ 2021-09-29 15:59     ` Ferruh Yigit
  0 siblings, 0 replies; 45+ messages in thread
From: Ferruh Yigit @ 2021-09-29 15:59 UTC (permalink / raw)
  To: Robin Zhang, dev, Stillwell Jr, Paul M
  Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton,
	jijiang.liu, jing.d.chen, heqing.zhu, cunming.liang, wenzhuo.lu,
	roy.fan.zhang, andrey.chilikin, echaudro, junfeng.guo,
	stevex.yang, stable, Jesse Brandeburg

On 9/6/2021 3:02 AM, Robin Zhang wrote:
> Fix several kernel-doc warnings when building with W=1. These changes
> are only to comments.
> 

Same here, why shared code drop has Linux kernel specific updates?

> Fixes: 8db9e2a1b232 ("i40e: base driver")
> Fixes: 842ea1996335 ("i40e/base: save link module type")
> Fixes: fd72a2284a89 ("i40e/base: support LED blinking with new PHY")
> Fixes: 788fc17b2dec ("i40e/base: support proxy config for X722")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
> Signed-off-by: Robin Zhang <robinx.zhang@intel.com>


^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [dpdk-stable] [PATCH v4 05/18] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters
  2021-09-06  2:02   ` [dpdk-stable] [PATCH v4 05/18] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters Robin Zhang
@ 2021-09-29 16:21     ` Ferruh Yigit
  0 siblings, 0 replies; 45+ messages in thread
From: Ferruh Yigit @ 2021-09-29 16:21 UTC (permalink / raw)
  To: Robin Zhang, dev
  Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton,
	jijiang.liu, jing.d.chen, heqing.zhu, cunming.liang, wenzhuo.lu,
	roy.fan.zhang, andrey.chilikin, echaudro, junfeng.guo,
	stevex.yang, stable, Dawid Lukwinski

On 9/6/2021 3:02 AM, Robin Zhang wrote:
> Unlike other supported adapters, 2.5G and 5G use different
> PHY type identifiers for reading/writing PHY settings
> and for reading link status. This commit intruduces

s/intruduces/introduces/

> separate PHY identifiers for these two operation types.
> 
> Fixes: 988ed63c7441 ("net/i40e/base: add support for Carlsville device")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Dawid Lukwinski <dawid.lukwinski@intel.com>
> Signed-off-by: Robin Zhang <robinx.zhang@intel.com>


^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [dpdk-stable] [PATCH v4 06/18] net/i40e/base: fix PF reset failed
  2021-09-06  2:02   ` [dpdk-stable] [PATCH v4 06/18] net/i40e/base: fix PF reset failed Robin Zhang
@ 2021-09-29 16:21     ` Ferruh Yigit
  0 siblings, 0 replies; 45+ messages in thread
From: Ferruh Yigit @ 2021-09-29 16:21 UTC (permalink / raw)
  To: Robin Zhang, dev
  Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton,
	jijiang.liu, jing.d.chen, heqing.zhu, cunming.liang, wenzhuo.lu,
	roy.fan.zhang, andrey.chilikin, echaudro, junfeng.guo,
	stevex.yang, stable, Sylwester Dziedziuch

On 9/6/2021 3:02 AM, Robin Zhang wrote:
> PF has to delete all the filters during reset.
> If it is fully loaded with filters then it is possible
> that it will take more than 200 ms to finish the reset
> resulting in timeout during pf_reset and
> PF reset failed, -15 error indication.
> Increasing the timeout value for PF reset from 200 to 1000
> to give PF more time to finish reset if it is loaded with filters.
> 
> Fixes: 1e32378f0774 ("i40e/base: increase PF reset max loop limit")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com>
> Signed-off-by: Robin Zhang <robinx.zhang@intel.com>

What do you think updating patch title as:
 net/i40e/base: fix PF reset

^ permalink raw reply	[flat|nested] 45+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH v4 08/18] net/i40e/base: fix AOC media type reported by ethtool
  2021-09-06  2:02   ` [dpdk-stable] [PATCH v4 08/18] net/i40e/base: fix AOC media type reported by ethtool Robin Zhang
@ 2021-09-29 16:21     ` Ferruh Yigit
  0 siblings, 0 replies; 45+ messages in thread
From: Ferruh Yigit @ 2021-09-29 16:21 UTC (permalink / raw)
  To: Robin Zhang, dev
  Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton,
	jijiang.liu, jing.d.chen, heqing.zhu, cunming.liang, wenzhuo.lu,
	roy.fan.zhang, andrey.chilikin, echaudro, junfeng.guo,
	stevex.yang, stable, Dawid Lukwinski

On 9/6/2021 3:02 AM, Robin Zhang wrote:
> For Active Optical Cable (AOC) the correct media type is "Fibre",
> not "Direct Attach Copper".
> 
> Fixes: d749d4d89969 ("i40e/base: add AOC PHY types")
> Fixes: aa153cc89ff0 ("net/i40e/base: add new PHY types for 25G AOC and
> ACC")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Dawid Lukwinski <dawid.lukwinski@intel.com>
> Signed-off-by: Robin Zhang <robinx.zhang@intel.com>

I don't think the update in the dpdk is related to the ethtool, can you please
update the patch title accordingly?

^ permalink raw reply	[flat|nested] 45+ messages in thread

* [dpdk-stable] [PATCH v5 05/17] net/i40e/base: fix PHY identifiers for 2.5G and 5G adapters
       [not found] ` <20211009012648.64838-1-robinx.zhang@intel.com>
@ 2021-10-09  1:26   ` Robin Zhang
  2021-10-09  1:26   ` [dpdk-stable] [PATCH v5 06/17] net/i40e/base: fix PF reset Robin Zhang
                     ` (5 subsequent siblings)
  6 siblings, 0 replies; 45+ messages in thread
From: Robin Zhang @ 2021-10-09  1:26 UTC (permalink / raw)
  To: dev
  Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton,
	jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo,
	stevex.yang, Robin Zhang, stable, Dawid Lukwinski

Unlike other supported adapters, 2.5G and 5G use different PHY type
identifiers for reading/writing PHY settings and for reading link status.
This commit introduces separate PHY identifiers for these two operation
types.

Fixes: 988ed63c7441 ("net/i40e/base: add support for Carlsville device")
Cc: stable@dpdk.org

Signed-off-by: Dawid Lukwinski <dawid.lukwinski@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_adminq_cmd.h | 6 ++++--
 drivers/net/i40e/base/i40e_common.c     | 4 ++--
 drivers/net/i40e/base/i40e_type.h       | 8 ++------
 3 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
index a96527f31c..af9dec1d7f 100644
--- a/drivers/net/i40e/base/i40e_adminq_cmd.h
+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
@@ -1947,8 +1947,10 @@ enum i40e_aq_phy_type {
 	I40E_PHY_TYPE_25GBASE_LR		= 0x22,
 	I40E_PHY_TYPE_25GBASE_AOC		= 0x23,
 	I40E_PHY_TYPE_25GBASE_ACC		= 0x24,
-	I40E_PHY_TYPE_2_5GBASE_T		= 0x30,
-	I40E_PHY_TYPE_5GBASE_T			= 0x31,
+	I40E_PHY_TYPE_2_5GBASE_T		= 0x26,
+	I40E_PHY_TYPE_5GBASE_T			= 0x27,
+	I40E_PHY_TYPE_2_5GBASE_T_LINK_STATUS	= 0x30,
+	I40E_PHY_TYPE_5GBASE_T_LINK_STATUS	= 0x31,
 	I40E_PHY_TYPE_MAX,
 	I40E_PHY_TYPE_NOT_SUPPORTED_HIGH_TEMP	= 0xFD,
 	I40E_PHY_TYPE_EMPTY			= 0xFE,
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 32642f3e2b..ceedec68bf 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1280,8 +1280,8 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw)
 		break;
 	case I40E_PHY_TYPE_100BASE_TX:
 	case I40E_PHY_TYPE_1000BASE_T:
-	case I40E_PHY_TYPE_2_5GBASE_T:
-	case I40E_PHY_TYPE_5GBASE_T:
+	case I40E_PHY_TYPE_2_5GBASE_T_LINK_STATUS:
+	case I40E_PHY_TYPE_5GBASE_T_LINK_STATUS:
 	case I40E_PHY_TYPE_10GBASE_T:
 		media = I40E_MEDIA_TYPE_BASET;
 		break;
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index e5a3729183..0323887550 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -329,12 +329,8 @@ struct i40e_phy_info {
 					     I40E_PHY_TYPE_OFFSET)
 #define I40E_CAP_PHY_TYPE_25GBASE_ACC BIT_ULL(I40E_PHY_TYPE_25GBASE_ACC + \
 					     I40E_PHY_TYPE_OFFSET)
-/* Offset for 2.5G/5G PHY Types value to bit number conversion */
-#define I40E_PHY_TYPE_OFFSET2 (-10)
-#define I40E_CAP_PHY_TYPE_2_5GBASE_T BIT_ULL(I40E_PHY_TYPE_2_5GBASE_T + \
-					     I40E_PHY_TYPE_OFFSET2)
-#define I40E_CAP_PHY_TYPE_5GBASE_T BIT_ULL(I40E_PHY_TYPE_5GBASE_T + \
-					     I40E_PHY_TYPE_OFFSET2)
+#define I40E_CAP_PHY_TYPE_2_5GBASE_T BIT_ULL(I40E_PHY_TYPE_2_5GBASE_T)
+#define I40E_CAP_PHY_TYPE_5GBASE_T BIT_ULL(I40E_PHY_TYPE_5GBASE_T)
 #define I40E_HW_CAP_MAX_GPIO			30
 #define I40E_HW_CAP_MDIO_PORT_MODE_MDIO		0
 #define I40E_HW_CAP_MDIO_PORT_MODE_I2C		1
-- 
2.25.1


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [dpdk-stable] [PATCH v5 06/17] net/i40e/base: fix PF reset
       [not found] ` <20211009012648.64838-1-robinx.zhang@intel.com>
  2021-10-09  1:26   ` [dpdk-stable] [PATCH v5 05/17] net/i40e/base: fix PHY identifiers for 2.5G and 5G adapters Robin Zhang
@ 2021-10-09  1:26   ` Robin Zhang
  2021-10-09  1:26   ` [dpdk-stable] [PATCH v5 07/17] net/i40e/base: fix update link data for X722 Robin Zhang
                     ` (4 subsequent siblings)
  6 siblings, 0 replies; 45+ messages in thread
From: Robin Zhang @ 2021-10-09  1:26 UTC (permalink / raw)
  To: dev
  Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton,
	jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo,
	stevex.yang, Robin Zhang, stable, Sylwester Dziedziuch

PF has to delete all the filters during reset.
If it is fully loaded with filters then it is possible that it will take
more than 200 ms to finish the reset resulting in timeout during pf_reset
and PF reset failed, -15 error indication.

Increasing the timeout value for PF reset from 200 to 1000 to give PF
more time to finish reset if it is loaded with filters.

Fixes: 1e32378f0774 ("i40e/base: increase PF reset max loop limit")
Cc: stable@dpdk.org

Signed-off-by: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index ceedec68bf..aa424e6010 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1341,7 +1341,7 @@ STATIC enum i40e_status_code i40e_poll_globr(struct i40e_hw *hw,
 	return I40E_ERR_RESET_FAILED;
 }
 
-#define I40E_PF_RESET_WAIT_COUNT	200
+#define I40E_PF_RESET_WAIT_COUNT	1000
 /**
  * i40e_pf_reset - Reset the PF
  * @hw: pointer to the hardware structure
-- 
2.25.1


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [dpdk-stable] [PATCH v5 07/17] net/i40e/base: fix update link data for X722
       [not found] ` <20211009012648.64838-1-robinx.zhang@intel.com>
  2021-10-09  1:26   ` [dpdk-stable] [PATCH v5 05/17] net/i40e/base: fix PHY identifiers for 2.5G and 5G adapters Robin Zhang
  2021-10-09  1:26   ` [dpdk-stable] [PATCH v5 06/17] net/i40e/base: fix PF reset Robin Zhang
@ 2021-10-09  1:26   ` Robin Zhang
  2021-10-09  1:26   ` [dpdk-stable] [PATCH v5 08/17] net/i40e/base: fix AOC media type Robin Zhang
                     ` (3 subsequent siblings)
  6 siblings, 0 replies; 45+ messages in thread
From: Robin Zhang @ 2021-10-09  1:26 UTC (permalink / raw)
  To: dev
  Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton,
	jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo,
	stevex.yang, Robin Zhang, stable, Jaroslaw Gawin

The X722 card has 'Link Type' information elsewhere than the X710.
Previously, for all cards, the 'Link Type' information was retrieved by
opcode 0x0607 and this value was wrong for all X722 cards.
Now this information for X722 only is taken by opcode 0x0600
(function: i40e_aq_get_phy_capabilities) instead of an opcode
0x0607 (function: i40e_aq_get_link_info).
All other parameters read by opcode 0x0607 unchanged.

Fixes: e6691b428eb1 ("i40e/base: fix PHY NVM interaction")
Fixes: 75c3de654ead ("net/i40e/base: fix long link down notification time")
Cc: stable@dpdk.org

Signed-off-by: Jaroslaw Gawin <jaroslawx.gawin@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_common.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index aa424e6010..ef061a6b63 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -2078,6 +2078,9 @@ enum i40e_status_code i40e_aq_get_link_info(struct i40e_hw *hw,
 	     hw->aq.fw_min_ver < 40)) && hw_link_info->phy_type == 0xE)
 		hw_link_info->phy_type = I40E_PHY_TYPE_10GBASE_SFPP_CU;
 
+	/* 'Get Link Status' response data structure from X722 FW has
+	 * different format and does not contain this information
+	 */
 	if (hw->flags & I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE &&
 	    hw->mac.type != I40E_MAC_X722) {
 		__le32 tmp;
@@ -2948,10 +2951,13 @@ enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw)
 		return status;
 
 	/* extra checking needed to ensure link info to user is timely */
-	if ((hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) &&
-	    ((hw->phy.link_info.link_info & I40E_AQ_LINK_UP) ||
-	     !(hw->phy.link_info_old.link_info & I40E_AQ_LINK_UP))) {
-		status = i40e_aq_get_phy_capabilities(hw, false, false,
+	if (((hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) &&
+	     ((hw->phy.link_info.link_info & I40E_AQ_LINK_UP) ||
+	      !(hw->phy.link_info_old.link_info & I40E_AQ_LINK_UP))) ||
+		hw->mac.type == I40E_MAC_X722) {
+		status = i40e_aq_get_phy_capabilities(hw, false,
+						      hw->mac.type ==
+						      I40E_MAC_X722,
 						      &abilities, NULL);
 		if (status)
 			return status;
-- 
2.25.1


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [dpdk-stable] [PATCH v5 08/17] net/i40e/base: fix AOC media type
       [not found] ` <20211009012648.64838-1-robinx.zhang@intel.com>
                     ` (2 preceding siblings ...)
  2021-10-09  1:26   ` [dpdk-stable] [PATCH v5 07/17] net/i40e/base: fix update link data for X722 Robin Zhang
@ 2021-10-09  1:26   ` Robin Zhang
  2021-10-09  1:26   ` [dpdk-stable] [PATCH v5 10/17] net/i40e/base: fix headers to match functions Robin Zhang
                     ` (2 subsequent siblings)
  6 siblings, 0 replies; 45+ messages in thread
From: Robin Zhang @ 2021-10-09  1:26 UTC (permalink / raw)
  To: dev
  Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton,
	jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo,
	stevex.yang, Robin Zhang, stable, Dawid Lukwinski

For Active Optical Cable (AOC) the correct media type is "Fibre",
not "Direct Attach Copper".

Fixes: d749d4d89969 ("i40e/base: add AOC PHY types")
Fixes: aa153cc89ff0 ("net/i40e/base: add new PHY types for 25G AOC and ACC")
Cc: stable@dpdk.org

Signed-off-by: Dawid Lukwinski <dawid.lukwinski@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_common.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index ef061a6b63..2ca6a13e79 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1276,6 +1276,9 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw)
 	case I40E_PHY_TYPE_40GBASE_LR4:
 	case I40E_PHY_TYPE_25GBASE_LR:
 	case I40E_PHY_TYPE_25GBASE_SR:
+	case I40E_PHY_TYPE_10GBASE_AOC:
+	case I40E_PHY_TYPE_25GBASE_AOC:
+	case I40E_PHY_TYPE_40GBASE_AOC:
 		media = I40E_MEDIA_TYPE_FIBER;
 		break;
 	case I40E_PHY_TYPE_100BASE_TX:
@@ -1290,10 +1293,7 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw)
 	case I40E_PHY_TYPE_10GBASE_CR1:
 	case I40E_PHY_TYPE_40GBASE_CR4:
 	case I40E_PHY_TYPE_10GBASE_SFPP_CU:
-	case I40E_PHY_TYPE_40GBASE_AOC:
-	case I40E_PHY_TYPE_10GBASE_AOC:
 	case I40E_PHY_TYPE_25GBASE_CR:
-	case I40E_PHY_TYPE_25GBASE_AOC:
 	case I40E_PHY_TYPE_25GBASE_ACC:
 		media = I40E_MEDIA_TYPE_DA;
 		break;
-- 
2.25.1


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [dpdk-stable] [PATCH v5 10/17] net/i40e/base: fix headers to match functions
       [not found] ` <20211009012648.64838-1-robinx.zhang@intel.com>
                     ` (3 preceding siblings ...)
  2021-10-09  1:26   ` [dpdk-stable] [PATCH v5 08/17] net/i40e/base: fix AOC media type Robin Zhang
@ 2021-10-09  1:26   ` Robin Zhang
  2021-10-09  1:26   ` [dpdk-stable] [PATCH v5 11/17] net/i40e/base: fix potentially uninitialized variables Robin Zhang
  2021-10-09  1:26   ` [dpdk-stable] [PATCH v5 12/17] net/i40e/base: fix checksum is used incorrectly Robin Zhang
  6 siblings, 0 replies; 45+ messages in thread
From: Robin Zhang @ 2021-10-09  1:26 UTC (permalink / raw)
  To: dev
  Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton,
	jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo,
	stevex.yang, Robin Zhang, stable, Jesse Brandeburg

Fix several kernel-doc warnings when building with W=1. These changes
are only to comments.

Fixes: 8db9e2a1b232 ("i40e: base driver")
Fixes: 842ea1996335 ("i40e/base: save link module type")
Fixes: fd72a2284a89 ("i40e/base: support LED blinking with new PHY")
Fixes: 788fc17b2dec ("i40e/base: support proxy config for X722")
Cc: stable@dpdk.org

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_common.c  | 10 +++++-----
 drivers/net/i40e/base/i40e_dcb.c     |  2 +-
 drivers/net/i40e/base/i40e_lan_hmc.c |  2 +-
 drivers/net/i40e/base/i40e_nvm.c     |  2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 2ca6a13e79..baa51e1396 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -2677,7 +2677,7 @@ enum i40e_status_code i40e_aq_set_vsi_vlan_promisc(struct i40e_hw *hw,
 }
 
 /**
- * i40e_get_vsi_params - get VSI configuration info
+ * i40e_aq_get_vsi_params - get VSI configuration info
  * @hw: pointer to the hw struct
  * @vsi_ctx: pointer to a vsi context struct
  * @cmd_details: pointer to command details structure or NULL
@@ -2938,7 +2938,7 @@ enum i40e_status_code i40e_get_link_status(struct i40e_hw *hw, bool *link_up)
 }
 
 /**
- * i40e_updatelink_status - update status of the HW network link
+ * i40e_update_link_info - update status of the HW network link
  * @hw: pointer to the hw struct
  **/
 enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw)
@@ -4830,7 +4830,7 @@ enum i40e_status_code i40e_aq_del_udp_tunnel(struct i40e_hw *hw, u8 index,
 }
 
 /**
- * i40e_aq_get_switch_resource_alloc (0x0204)
+ * i40e_aq_get_switch_resource_alloc - command (0x0204) to get allocations
  * @hw: pointer to the hw struct
  * @num_entries: pointer to u8 to store the number of resource entries returned
  * @buf: pointer to a user supplied buffer.  This buffer must be large enough
@@ -6977,7 +6977,7 @@ u8 i40e_get_phy_address(struct i40e_hw *hw, u8 dev_num)
 }
 
 /**
- * i40e_blink_phy_led
+ * i40e_blink_phy_link_led
  * @hw: pointer to the HW structure
  * @time: time how long led will blinks in secs
  * @interval: gap between LED on and off in msecs
@@ -7824,7 +7824,7 @@ enum i40e_status_code i40e_aq_set_arp_proxy_config(struct i40e_hw *hw,
 }
 
 /**
- * i40e_aq_opc_set_ns_proxy_table_entry
+ * i40e_aq_set_ns_proxy_table_entry
  * @hw: pointer to the HW structure
  * @ns_proxy_table_entry: pointer to NS table entry command struct
  * @cmd_details: pointer to command details
diff --git a/drivers/net/i40e/base/i40e_dcb.c b/drivers/net/i40e/base/i40e_dcb.c
index 27b52bc365..8f9b7e823f 100644
--- a/drivers/net/i40e/base/i40e_dcb.c
+++ b/drivers/net/i40e/base/i40e_dcb.c
@@ -235,7 +235,7 @@ static void i40e_parse_ieee_app_tlv(struct i40e_lldp_org_tlv *tlv,
 }
 
 /**
- * i40e_parse_ieee_etsrec_tlv
+ * i40e_parse_ieee_tlv
  * @tlv: IEEE 802.1Qaz TLV
  * @dcbcfg: Local store to update ETS REC data
  *
diff --git a/drivers/net/i40e/base/i40e_lan_hmc.c b/drivers/net/i40e/base/i40e_lan_hmc.c
index d3969396f0..d3bd683ff3 100644
--- a/drivers/net/i40e/base/i40e_lan_hmc.c
+++ b/drivers/net/i40e/base/i40e_lan_hmc.c
@@ -516,7 +516,7 @@ enum i40e_status_code i40e_configure_lan_hmc(struct i40e_hw *hw,
 }
 
 /**
- * i40e_delete_hmc_object - remove hmc objects
+ * i40e_delete_lan_hmc_object - remove hmc objects
  * @hw: pointer to the HW structure
  * @info: pointer to i40e_hmc_delete_obj_info struct
  *
diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c
index 561ed21136..67e58cc195 100644
--- a/drivers/net/i40e/base/i40e_nvm.c
+++ b/drivers/net/i40e/base/i40e_nvm.c
@@ -7,7 +7,7 @@
 #include "i40e_prototype.h"
 
 /**
- * i40e_init_nvm_ops - Initialize NVM function pointers
+ * i40e_init_nvm - Initialize NVM function pointers
  * @hw: pointer to the HW structure
  *
  * Setup the function pointers and the NVM info structure. Should be called
-- 
2.25.1


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [dpdk-stable] [PATCH v5 11/17] net/i40e/base: fix potentially uninitialized variables
       [not found] ` <20211009012648.64838-1-robinx.zhang@intel.com>
                     ` (4 preceding siblings ...)
  2021-10-09  1:26   ` [dpdk-stable] [PATCH v5 10/17] net/i40e/base: fix headers to match functions Robin Zhang
@ 2021-10-09  1:26   ` Robin Zhang
  2021-10-09  1:26   ` [dpdk-stable] [PATCH v5 12/17] net/i40e/base: fix checksum is used incorrectly Robin Zhang
  6 siblings, 0 replies; 45+ messages in thread
From: Robin Zhang @ 2021-10-09  1:26 UTC (permalink / raw)
  To: dev
  Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton,
	jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo,
	stevex.yang, Robin Zhang, stable, Christopher Pau

The status of i40e_read_nvm_word is not checked, so variables set
from this function could be used uninitialized. In this case, preserve
the existing flow that does not block initialization by initializing
these values from the start.

Fixes: 8d6c51fcd24b ("i40e/base: get OEM version")
Fixes: 2db70574247b ("net/i40e/base: limit PF/VF specific code to that driver only")
Cc: stable@dpdk.org

Signed-off-by: Christopher Pau <christopher.pau@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_adminq.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c
index 38d3429e5b..27c82d9b44 100644
--- a/drivers/net/i40e/base/i40e_adminq.c
+++ b/drivers/net/i40e/base/i40e_adminq.c
@@ -652,8 +652,10 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw)
 {
 	struct i40e_adminq_info *aq = &hw->aq;
 	enum i40e_status_code ret_code;
-	u16 cfg_ptr, oem_hi, oem_lo;
-	u16 eetrack_lo, eetrack_hi;
+	u16 oem_hi = 0, oem_lo = 0;
+	u16 eetrack_hi = 0;
+	u16 eetrack_lo = 0;
+	u16 cfg_ptr = 0;
 	int retry = 0;
 
 	/* verify input for valid configuration */
-- 
2.25.1


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [dpdk-stable] [PATCH v5 12/17] net/i40e/base: fix checksum is used incorrectly
       [not found] ` <20211009012648.64838-1-robinx.zhang@intel.com>
                     ` (5 preceding siblings ...)
  2021-10-09  1:26   ` [dpdk-stable] [PATCH v5 11/17] net/i40e/base: fix potentially uninitialized variables Robin Zhang
@ 2021-10-09  1:26   ` Robin Zhang
  6 siblings, 0 replies; 45+ messages in thread
From: Robin Zhang @ 2021-10-09  1:26 UTC (permalink / raw)
  To: dev
  Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton,
	jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo,
	stevex.yang, Robin Zhang, stable, Christopher Pau

The variable checksum from i40e_calc_nvm_checksum is used before return
value is checked. Fix this logic.

Fixes: 8db9e2a1b232 ("i40e: base driver")
Fixes: 3ed6c3246f43 ("i40e/base: handle AQ timeout when releasing NVM")
Cc: stable@dpdk.org

Signed-off-by: Christopher Pau <christopher.pau@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_nvm.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c
index 67e58cc195..f385042601 100644
--- a/drivers/net/i40e/base/i40e_nvm.c
+++ b/drivers/net/i40e/base/i40e_nvm.c
@@ -755,10 +755,11 @@ enum i40e_status_code i40e_update_nvm_checksum(struct i40e_hw *hw)
 	DEBUGFUNC("i40e_update_nvm_checksum");
 
 	ret_code = i40e_calc_nvm_checksum(hw, &checksum);
-	le_sum = CPU_TO_LE16(checksum);
-	if (ret_code == I40E_SUCCESS)
+	if (ret_code == I40E_SUCCESS) {
+		le_sum = CPU_TO_LE16(checksum);
 		ret_code = i40e_write_nvm_aq(hw, 0x00, I40E_SR_SW_CHECKSUM_WORD,
 					     1, &le_sum, true);
+	}
 
 	return ret_code;
 }
-- 
2.25.1


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [dpdk-stable] [PATCH v6 05/17] net/i40e/base: fix PHY identifiers for 2.5G and 5G adapters
       [not found] ` <20211009013956.70937-1-robinx.zhang@intel.com>
@ 2021-10-09  1:39   ` Robin Zhang
  2021-10-09  1:39   ` [dpdk-stable] [PATCH v6 06/17] net/i40e/base: fix PF reset Robin Zhang
                     ` (5 subsequent siblings)
  6 siblings, 0 replies; 45+ messages in thread
From: Robin Zhang @ 2021-10-09  1:39 UTC (permalink / raw)
  To: dev
  Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton,
	jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo,
	stevex.yang, Robin Zhang, stable, Dawid Lukwinski

Unlike other supported adapters, 2.5G and 5G use different PHY type
identifiers for reading/writing PHY settings and for reading link status.
This commit introduces separate PHY identifiers for these two operation
types.

Fixes: 988ed63c7441 ("net/i40e/base: add support for Carlsville device")
Cc: stable@dpdk.org

Signed-off-by: Dawid Lukwinski <dawid.lukwinski@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_adminq_cmd.h | 6 ++++--
 drivers/net/i40e/base/i40e_common.c     | 4 ++--
 drivers/net/i40e/base/i40e_type.h       | 8 ++------
 3 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_adminq_cmd.h b/drivers/net/i40e/base/i40e_adminq_cmd.h
index a96527f31c..af9dec1d7f 100644
--- a/drivers/net/i40e/base/i40e_adminq_cmd.h
+++ b/drivers/net/i40e/base/i40e_adminq_cmd.h
@@ -1947,8 +1947,10 @@ enum i40e_aq_phy_type {
 	I40E_PHY_TYPE_25GBASE_LR		= 0x22,
 	I40E_PHY_TYPE_25GBASE_AOC		= 0x23,
 	I40E_PHY_TYPE_25GBASE_ACC		= 0x24,
-	I40E_PHY_TYPE_2_5GBASE_T		= 0x30,
-	I40E_PHY_TYPE_5GBASE_T			= 0x31,
+	I40E_PHY_TYPE_2_5GBASE_T		= 0x26,
+	I40E_PHY_TYPE_5GBASE_T			= 0x27,
+	I40E_PHY_TYPE_2_5GBASE_T_LINK_STATUS	= 0x30,
+	I40E_PHY_TYPE_5GBASE_T_LINK_STATUS	= 0x31,
 	I40E_PHY_TYPE_MAX,
 	I40E_PHY_TYPE_NOT_SUPPORTED_HIGH_TEMP	= 0xFD,
 	I40E_PHY_TYPE_EMPTY			= 0xFE,
diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 32642f3e2b..ceedec68bf 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1280,8 +1280,8 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw)
 		break;
 	case I40E_PHY_TYPE_100BASE_TX:
 	case I40E_PHY_TYPE_1000BASE_T:
-	case I40E_PHY_TYPE_2_5GBASE_T:
-	case I40E_PHY_TYPE_5GBASE_T:
+	case I40E_PHY_TYPE_2_5GBASE_T_LINK_STATUS:
+	case I40E_PHY_TYPE_5GBASE_T_LINK_STATUS:
 	case I40E_PHY_TYPE_10GBASE_T:
 		media = I40E_MEDIA_TYPE_BASET;
 		break;
diff --git a/drivers/net/i40e/base/i40e_type.h b/drivers/net/i40e/base/i40e_type.h
index e5a3729183..0323887550 100644
--- a/drivers/net/i40e/base/i40e_type.h
+++ b/drivers/net/i40e/base/i40e_type.h
@@ -329,12 +329,8 @@ struct i40e_phy_info {
 					     I40E_PHY_TYPE_OFFSET)
 #define I40E_CAP_PHY_TYPE_25GBASE_ACC BIT_ULL(I40E_PHY_TYPE_25GBASE_ACC + \
 					     I40E_PHY_TYPE_OFFSET)
-/* Offset for 2.5G/5G PHY Types value to bit number conversion */
-#define I40E_PHY_TYPE_OFFSET2 (-10)
-#define I40E_CAP_PHY_TYPE_2_5GBASE_T BIT_ULL(I40E_PHY_TYPE_2_5GBASE_T + \
-					     I40E_PHY_TYPE_OFFSET2)
-#define I40E_CAP_PHY_TYPE_5GBASE_T BIT_ULL(I40E_PHY_TYPE_5GBASE_T + \
-					     I40E_PHY_TYPE_OFFSET2)
+#define I40E_CAP_PHY_TYPE_2_5GBASE_T BIT_ULL(I40E_PHY_TYPE_2_5GBASE_T)
+#define I40E_CAP_PHY_TYPE_5GBASE_T BIT_ULL(I40E_PHY_TYPE_5GBASE_T)
 #define I40E_HW_CAP_MAX_GPIO			30
 #define I40E_HW_CAP_MDIO_PORT_MODE_MDIO		0
 #define I40E_HW_CAP_MDIO_PORT_MODE_I2C		1
-- 
2.25.1


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [dpdk-stable] [PATCH v6 06/17] net/i40e/base: fix PF reset
       [not found] ` <20211009013956.70937-1-robinx.zhang@intel.com>
  2021-10-09  1:39   ` [dpdk-stable] [PATCH v6 05/17] net/i40e/base: fix PHY identifiers for 2.5G and 5G adapters Robin Zhang
@ 2021-10-09  1:39   ` Robin Zhang
  2021-10-09  1:39   ` [dpdk-stable] [PATCH v6 07/17] net/i40e/base: fix update link data for X722 Robin Zhang
                     ` (4 subsequent siblings)
  6 siblings, 0 replies; 45+ messages in thread
From: Robin Zhang @ 2021-10-09  1:39 UTC (permalink / raw)
  To: dev
  Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton,
	jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo,
	stevex.yang, Robin Zhang, stable, Sylwester Dziedziuch

PF has to delete all the filters during reset.
If it is fully loaded with filters then it is possible that it will take
more than 200 ms to finish the reset resulting in timeout during pf_reset
and PF reset failed, -15 error indication.

Increasing the timeout value for PF reset from 200 to 1000 to give PF
more time to finish reset if it is loaded with filters.

Fixes: 1e32378f0774 ("i40e/base: increase PF reset max loop limit")
Cc: stable@dpdk.org

Signed-off-by: Sylwester Dziedziuch <sylwesterx.dziedziuch@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_common.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index ceedec68bf..aa424e6010 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1341,7 +1341,7 @@ STATIC enum i40e_status_code i40e_poll_globr(struct i40e_hw *hw,
 	return I40E_ERR_RESET_FAILED;
 }
 
-#define I40E_PF_RESET_WAIT_COUNT	200
+#define I40E_PF_RESET_WAIT_COUNT	1000
 /**
  * i40e_pf_reset - Reset the PF
  * @hw: pointer to the hardware structure
-- 
2.25.1


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [dpdk-stable] [PATCH v6 07/17] net/i40e/base: fix update link data for X722
       [not found] ` <20211009013956.70937-1-robinx.zhang@intel.com>
  2021-10-09  1:39   ` [dpdk-stable] [PATCH v6 05/17] net/i40e/base: fix PHY identifiers for 2.5G and 5G adapters Robin Zhang
  2021-10-09  1:39   ` [dpdk-stable] [PATCH v6 06/17] net/i40e/base: fix PF reset Robin Zhang
@ 2021-10-09  1:39   ` Robin Zhang
  2021-10-09  1:39   ` [dpdk-stable] [PATCH v6 08/17] net/i40e/base: fix AOC media type Robin Zhang
                     ` (3 subsequent siblings)
  6 siblings, 0 replies; 45+ messages in thread
From: Robin Zhang @ 2021-10-09  1:39 UTC (permalink / raw)
  To: dev
  Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton,
	jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo,
	stevex.yang, Robin Zhang, stable, Jaroslaw Gawin

The X722 card has 'Link Type' information elsewhere than the X710.
Previously, for all cards, the 'Link Type' information was retrieved by
opcode 0x0607 and this value was wrong for all X722 cards.
Now this information for X722 only is taken by opcode 0x0600
(function: i40e_aq_get_phy_capabilities) instead of an opcode
0x0607 (function: i40e_aq_get_link_info).
All other parameters read by opcode 0x0607 unchanged.

Fixes: e6691b428eb1 ("i40e/base: fix PHY NVM interaction")
Fixes: 75c3de654ead ("net/i40e/base: fix long link down notification time")
Cc: stable@dpdk.org

Signed-off-by: Jaroslaw Gawin <jaroslawx.gawin@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_common.c | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index aa424e6010..ef061a6b63 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -2078,6 +2078,9 @@ enum i40e_status_code i40e_aq_get_link_info(struct i40e_hw *hw,
 	     hw->aq.fw_min_ver < 40)) && hw_link_info->phy_type == 0xE)
 		hw_link_info->phy_type = I40E_PHY_TYPE_10GBASE_SFPP_CU;
 
+	/* 'Get Link Status' response data structure from X722 FW has
+	 * different format and does not contain this information
+	 */
 	if (hw->flags & I40E_HW_FLAG_AQ_PHY_ACCESS_CAPABLE &&
 	    hw->mac.type != I40E_MAC_X722) {
 		__le32 tmp;
@@ -2948,10 +2951,13 @@ enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw)
 		return status;
 
 	/* extra checking needed to ensure link info to user is timely */
-	if ((hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) &&
-	    ((hw->phy.link_info.link_info & I40E_AQ_LINK_UP) ||
-	     !(hw->phy.link_info_old.link_info & I40E_AQ_LINK_UP))) {
-		status = i40e_aq_get_phy_capabilities(hw, false, false,
+	if (((hw->phy.link_info.link_info & I40E_AQ_MEDIA_AVAILABLE) &&
+	     ((hw->phy.link_info.link_info & I40E_AQ_LINK_UP) ||
+	      !(hw->phy.link_info_old.link_info & I40E_AQ_LINK_UP))) ||
+		hw->mac.type == I40E_MAC_X722) {
+		status = i40e_aq_get_phy_capabilities(hw, false,
+						      hw->mac.type ==
+						      I40E_MAC_X722,
 						      &abilities, NULL);
 		if (status)
 			return status;
-- 
2.25.1


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [dpdk-stable] [PATCH v6 08/17] net/i40e/base: fix AOC media type
       [not found] ` <20211009013956.70937-1-robinx.zhang@intel.com>
                     ` (2 preceding siblings ...)
  2021-10-09  1:39   ` [dpdk-stable] [PATCH v6 07/17] net/i40e/base: fix update link data for X722 Robin Zhang
@ 2021-10-09  1:39   ` Robin Zhang
  2021-10-09  1:39   ` [dpdk-stable] [PATCH v6 10/17] net/i40e/base: fix headers to match functions Robin Zhang
                     ` (2 subsequent siblings)
  6 siblings, 0 replies; 45+ messages in thread
From: Robin Zhang @ 2021-10-09  1:39 UTC (permalink / raw)
  To: dev
  Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton,
	jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo,
	stevex.yang, Robin Zhang, stable, Dawid Lukwinski

For Active Optical Cable (AOC) the correct media type is "Fibre",
not "Direct Attach Copper".

Fixes: d749d4d89969 ("i40e/base: add AOC PHY types")
Fixes: aa153cc89ff0 ("net/i40e/base: add new PHY types for 25G AOC and ACC")
Cc: stable@dpdk.org

Signed-off-by: Dawid Lukwinski <dawid.lukwinski@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_common.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index ef061a6b63..2ca6a13e79 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -1276,6 +1276,9 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw)
 	case I40E_PHY_TYPE_40GBASE_LR4:
 	case I40E_PHY_TYPE_25GBASE_LR:
 	case I40E_PHY_TYPE_25GBASE_SR:
+	case I40E_PHY_TYPE_10GBASE_AOC:
+	case I40E_PHY_TYPE_25GBASE_AOC:
+	case I40E_PHY_TYPE_40GBASE_AOC:
 		media = I40E_MEDIA_TYPE_FIBER;
 		break;
 	case I40E_PHY_TYPE_100BASE_TX:
@@ -1290,10 +1293,7 @@ STATIC enum i40e_media_type i40e_get_media_type(struct i40e_hw *hw)
 	case I40E_PHY_TYPE_10GBASE_CR1:
 	case I40E_PHY_TYPE_40GBASE_CR4:
 	case I40E_PHY_TYPE_10GBASE_SFPP_CU:
-	case I40E_PHY_TYPE_40GBASE_AOC:
-	case I40E_PHY_TYPE_10GBASE_AOC:
 	case I40E_PHY_TYPE_25GBASE_CR:
-	case I40E_PHY_TYPE_25GBASE_AOC:
 	case I40E_PHY_TYPE_25GBASE_ACC:
 		media = I40E_MEDIA_TYPE_DA;
 		break;
-- 
2.25.1


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [dpdk-stable] [PATCH v6 10/17] net/i40e/base: fix headers to match functions
       [not found] ` <20211009013956.70937-1-robinx.zhang@intel.com>
                     ` (3 preceding siblings ...)
  2021-10-09  1:39   ` [dpdk-stable] [PATCH v6 08/17] net/i40e/base: fix AOC media type Robin Zhang
@ 2021-10-09  1:39   ` Robin Zhang
  2021-10-09  1:39   ` [dpdk-stable] [PATCH v6 11/17] net/i40e/base: fix potentially uninitialized variables Robin Zhang
  2021-10-09  1:39   ` [dpdk-stable] [PATCH v6 12/17] net/i40e/base: fix checksum is used incorrectly Robin Zhang
  6 siblings, 0 replies; 45+ messages in thread
From: Robin Zhang @ 2021-10-09  1:39 UTC (permalink / raw)
  To: dev
  Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton,
	jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo,
	stevex.yang, Robin Zhang, stable, Jesse Brandeburg

Fix several kernel-doc warnings when building with W=1. These changes
are only to comments.

Fixes: 8db9e2a1b232 ("i40e: base driver")
Fixes: 842ea1996335 ("i40e/base: save link module type")
Fixes: fd72a2284a89 ("i40e/base: support LED blinking with new PHY")
Fixes: 788fc17b2dec ("i40e/base: support proxy config for X722")
Cc: stable@dpdk.org

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_common.c  | 10 +++++-----
 drivers/net/i40e/base/i40e_dcb.c     |  2 +-
 drivers/net/i40e/base/i40e_lan_hmc.c |  2 +-
 drivers/net/i40e/base/i40e_nvm.c     |  2 +-
 4 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_common.c b/drivers/net/i40e/base/i40e_common.c
index 2ca6a13e79..baa51e1396 100644
--- a/drivers/net/i40e/base/i40e_common.c
+++ b/drivers/net/i40e/base/i40e_common.c
@@ -2677,7 +2677,7 @@ enum i40e_status_code i40e_aq_set_vsi_vlan_promisc(struct i40e_hw *hw,
 }
 
 /**
- * i40e_get_vsi_params - get VSI configuration info
+ * i40e_aq_get_vsi_params - get VSI configuration info
  * @hw: pointer to the hw struct
  * @vsi_ctx: pointer to a vsi context struct
  * @cmd_details: pointer to command details structure or NULL
@@ -2938,7 +2938,7 @@ enum i40e_status_code i40e_get_link_status(struct i40e_hw *hw, bool *link_up)
 }
 
 /**
- * i40e_updatelink_status - update status of the HW network link
+ * i40e_update_link_info - update status of the HW network link
  * @hw: pointer to the hw struct
  **/
 enum i40e_status_code i40e_update_link_info(struct i40e_hw *hw)
@@ -4830,7 +4830,7 @@ enum i40e_status_code i40e_aq_del_udp_tunnel(struct i40e_hw *hw, u8 index,
 }
 
 /**
- * i40e_aq_get_switch_resource_alloc (0x0204)
+ * i40e_aq_get_switch_resource_alloc - command (0x0204) to get allocations
  * @hw: pointer to the hw struct
  * @num_entries: pointer to u8 to store the number of resource entries returned
  * @buf: pointer to a user supplied buffer.  This buffer must be large enough
@@ -6977,7 +6977,7 @@ u8 i40e_get_phy_address(struct i40e_hw *hw, u8 dev_num)
 }
 
 /**
- * i40e_blink_phy_led
+ * i40e_blink_phy_link_led
  * @hw: pointer to the HW structure
  * @time: time how long led will blinks in secs
  * @interval: gap between LED on and off in msecs
@@ -7824,7 +7824,7 @@ enum i40e_status_code i40e_aq_set_arp_proxy_config(struct i40e_hw *hw,
 }
 
 /**
- * i40e_aq_opc_set_ns_proxy_table_entry
+ * i40e_aq_set_ns_proxy_table_entry
  * @hw: pointer to the HW structure
  * @ns_proxy_table_entry: pointer to NS table entry command struct
  * @cmd_details: pointer to command details
diff --git a/drivers/net/i40e/base/i40e_dcb.c b/drivers/net/i40e/base/i40e_dcb.c
index 27b52bc365..8f9b7e823f 100644
--- a/drivers/net/i40e/base/i40e_dcb.c
+++ b/drivers/net/i40e/base/i40e_dcb.c
@@ -235,7 +235,7 @@ static void i40e_parse_ieee_app_tlv(struct i40e_lldp_org_tlv *tlv,
 }
 
 /**
- * i40e_parse_ieee_etsrec_tlv
+ * i40e_parse_ieee_tlv
  * @tlv: IEEE 802.1Qaz TLV
  * @dcbcfg: Local store to update ETS REC data
  *
diff --git a/drivers/net/i40e/base/i40e_lan_hmc.c b/drivers/net/i40e/base/i40e_lan_hmc.c
index d3969396f0..d3bd683ff3 100644
--- a/drivers/net/i40e/base/i40e_lan_hmc.c
+++ b/drivers/net/i40e/base/i40e_lan_hmc.c
@@ -516,7 +516,7 @@ enum i40e_status_code i40e_configure_lan_hmc(struct i40e_hw *hw,
 }
 
 /**
- * i40e_delete_hmc_object - remove hmc objects
+ * i40e_delete_lan_hmc_object - remove hmc objects
  * @hw: pointer to the HW structure
  * @info: pointer to i40e_hmc_delete_obj_info struct
  *
diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c
index 561ed21136..67e58cc195 100644
--- a/drivers/net/i40e/base/i40e_nvm.c
+++ b/drivers/net/i40e/base/i40e_nvm.c
@@ -7,7 +7,7 @@
 #include "i40e_prototype.h"
 
 /**
- * i40e_init_nvm_ops - Initialize NVM function pointers
+ * i40e_init_nvm - Initialize NVM function pointers
  * @hw: pointer to the HW structure
  *
  * Setup the function pointers and the NVM info structure. Should be called
-- 
2.25.1


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [dpdk-stable] [PATCH v6 11/17] net/i40e/base: fix potentially uninitialized variables
       [not found] ` <20211009013956.70937-1-robinx.zhang@intel.com>
                     ` (4 preceding siblings ...)
  2021-10-09  1:39   ` [dpdk-stable] [PATCH v6 10/17] net/i40e/base: fix headers to match functions Robin Zhang
@ 2021-10-09  1:39   ` Robin Zhang
  2021-10-09  1:39   ` [dpdk-stable] [PATCH v6 12/17] net/i40e/base: fix checksum is used incorrectly Robin Zhang
  6 siblings, 0 replies; 45+ messages in thread
From: Robin Zhang @ 2021-10-09  1:39 UTC (permalink / raw)
  To: dev
  Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton,
	jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo,
	stevex.yang, Robin Zhang, stable, Christopher Pau

The status of i40e_read_nvm_word is not checked, so variables set
from this function could be used uninitialized. In this case, preserve
the existing flow that does not block initialization by initializing
these values from the start.

Fixes: 8d6c51fcd24b ("i40e/base: get OEM version")
Fixes: 2db70574247b ("net/i40e/base: limit PF/VF specific code to that driver only")
Cc: stable@dpdk.org

Signed-off-by: Christopher Pau <christopher.pau@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_adminq.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_adminq.c b/drivers/net/i40e/base/i40e_adminq.c
index 38d3429e5b..27c82d9b44 100644
--- a/drivers/net/i40e/base/i40e_adminq.c
+++ b/drivers/net/i40e/base/i40e_adminq.c
@@ -652,8 +652,10 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw)
 {
 	struct i40e_adminq_info *aq = &hw->aq;
 	enum i40e_status_code ret_code;
-	u16 cfg_ptr, oem_hi, oem_lo;
-	u16 eetrack_lo, eetrack_hi;
+	u16 oem_hi = 0, oem_lo = 0;
+	u16 eetrack_hi = 0;
+	u16 eetrack_lo = 0;
+	u16 cfg_ptr = 0;
 	int retry = 0;
 
 	/* verify input for valid configuration */
-- 
2.25.1


^ permalink raw reply	[flat|nested] 45+ messages in thread

* [dpdk-stable] [PATCH v6 12/17] net/i40e/base: fix checksum is used incorrectly
       [not found] ` <20211009013956.70937-1-robinx.zhang@intel.com>
                     ` (5 preceding siblings ...)
  2021-10-09  1:39   ` [dpdk-stable] [PATCH v6 11/17] net/i40e/base: fix potentially uninitialized variables Robin Zhang
@ 2021-10-09  1:39   ` Robin Zhang
  6 siblings, 0 replies; 45+ messages in thread
From: Robin Zhang @ 2021-10-09  1:39 UTC (permalink / raw)
  To: dev
  Cc: beilei.xing, qi.z.zhang, helin.zhang, jingjing.wu, remy.horton,
	jijiang.liu, jing.d.chen, cunming.liang, wenzhuo.lu, junfeng.guo,
	stevex.yang, Robin Zhang, stable, Christopher Pau

The variable checksum from i40e_calc_nvm_checksum is used before return
value is checked. Fix this logic.

Fixes: 8db9e2a1b232 ("i40e: base driver")
Fixes: 3ed6c3246f43 ("i40e/base: handle AQ timeout when releasing NVM")
Cc: stable@dpdk.org

Signed-off-by: Christopher Pau <christopher.pau@intel.com>
Signed-off-by: Robin Zhang <robinx.zhang@intel.com>
---
 drivers/net/i40e/base/i40e_nvm.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/i40e/base/i40e_nvm.c b/drivers/net/i40e/base/i40e_nvm.c
index 67e58cc195..f385042601 100644
--- a/drivers/net/i40e/base/i40e_nvm.c
+++ b/drivers/net/i40e/base/i40e_nvm.c
@@ -755,10 +755,11 @@ enum i40e_status_code i40e_update_nvm_checksum(struct i40e_hw *hw)
 	DEBUGFUNC("i40e_update_nvm_checksum");
 
 	ret_code = i40e_calc_nvm_checksum(hw, &checksum);
-	le_sum = CPU_TO_LE16(checksum);
-	if (ret_code == I40E_SUCCESS)
+	if (ret_code == I40E_SUCCESS) {
+		le_sum = CPU_TO_LE16(checksum);
 		ret_code = i40e_write_nvm_aq(hw, 0x00, I40E_SR_SW_CHECKSUM_WORD,
 					     1, &le_sum, true);
+	}
 
 	return ret_code;
 }
-- 
2.25.1


^ permalink raw reply	[flat|nested] 45+ messages in thread

end of thread, other threads:[~2021-10-09  1:55 UTC | newest]

Thread overview: 45+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20210618063851.3694702-1-robinx.zhang@intel.com>
2021-06-18  6:38 ` [dpdk-stable] [PATCH 06/14] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters Robin Zhang
2021-06-18  6:38 ` [dpdk-stable] [PATCH 07/14] net/i40e/base: fix PF reset failed Robin Zhang
2021-06-18  6:38 ` [dpdk-stable] [PATCH 08/14] net/i40e/base: fix update link data for X722 Robin Zhang
2021-06-18  6:38 ` [dpdk-stable] [PATCH 09/14] net/i40e/base: fix AOC media type reported by ethtool Robin Zhang
2021-06-18  6:38 ` [dpdk-stable] [PATCH 12/14] net/i40e/base: fix headers to match functions Robin Zhang
2021-06-18  6:38 ` [dpdk-stable] [PATCH 13/14] net/i40e/base: fix potentially uninitialized variables in NVM code Robin Zhang
2021-06-21  6:52   ` Xing, Beilei
     [not found] ` <20210621063708.4014937-1-robinx.zhang@intel.com>
2021-06-21  6:37   ` [dpdk-stable] [PATCH v2 06/14] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters Robin Zhang
2021-06-21  6:37   ` [dpdk-stable] [PATCH v2 07/14] net/i40e/base: fix PF reset failed Robin Zhang
2021-06-21  6:37   ` [dpdk-stable] [PATCH v2 08/14] net/i40e/base: fix update link data for X722 Robin Zhang
2021-06-21  6:37   ` [dpdk-stable] [PATCH v2 09/14] net/i40e/base: fix AOC media type reported by ethtool Robin Zhang
2021-06-21  6:37   ` [dpdk-stable] [PATCH v2 12/14] net/i40e/base: fix headers to match functions Robin Zhang
2021-06-21  6:37   ` [dpdk-stable] [PATCH v2 13/14] net/i40e/base: fix potentially uninitialized variables in NVM code Robin Zhang
     [not found] ` <20210621075206.4020456-1-robinx.zhang@intel.com>
2021-06-21  7:51   ` [dpdk-stable] [PATCH v3 06/15] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters Robin Zhang
2021-06-21  7:51   ` [dpdk-stable] [PATCH v3 07/15] net/i40e/base: fix PF reset failed Robin Zhang
2021-06-21  7:51   ` [dpdk-stable] [PATCH v3 08/15] net/i40e/base: fix update link data for X722 Robin Zhang
2021-06-21  7:52   ` [dpdk-stable] [PATCH v3 09/15] net/i40e/base: fix AOC media type reported by ethtool Robin Zhang
2021-06-21  7:52   ` [dpdk-stable] [PATCH v3 12/15] net/i40e/base: fix headers to match functions Robin Zhang
2021-06-21  7:52   ` [dpdk-stable] [PATCH v3 13/15] net/i40e/base: fix potentially uninitialized variables in NVM code Robin Zhang
2021-06-21  7:52   ` [dpdk-stable] [PATCH v3 14/15] net/i40e/base: fix checksum is used before return value is checked Robin Zhang
     [not found] ` <20210906020258.1291688-1-robinx.zhang@intel.com>
2021-09-06  2:02   ` [dpdk-stable] [PATCH v4 05/18] net/i40e/base: fix PHY type identifiers for 2.5G and 5G adapters Robin Zhang
2021-09-29 16:21     ` Ferruh Yigit
2021-09-06  2:02   ` [dpdk-stable] [PATCH v4 06/18] net/i40e/base: fix PF reset failed Robin Zhang
2021-09-29 16:21     ` Ferruh Yigit
2021-09-06  2:02   ` [dpdk-stable] [PATCH v4 07/18] net/i40e/base: fix update link data for X722 Robin Zhang
2021-09-06  2:02   ` [dpdk-stable] [PATCH v4 08/18] net/i40e/base: fix AOC media type reported by ethtool Robin Zhang
2021-09-29 16:21     ` [dpdk-stable] [dpdk-dev] " Ferruh Yigit
2021-09-06  2:02   ` [dpdk-stable] [PATCH v4 10/18] net/i40e/base: fix headers to match functions Robin Zhang
2021-09-29 15:59     ` [dpdk-stable] [dpdk-dev] " Ferruh Yigit
2021-09-06  2:02   ` [dpdk-stable] [PATCH v4 11/18] net/i40e/base: fix potentially uninitialized variables in NVM code Robin Zhang
2021-09-06  2:02   ` [dpdk-stable] [PATCH v4 12/18] net/i40e/base: fix checksum is used before return value is checked Robin Zhang
     [not found] ` <20211009012648.64838-1-robinx.zhang@intel.com>
2021-10-09  1:26   ` [dpdk-stable] [PATCH v5 05/17] net/i40e/base: fix PHY identifiers for 2.5G and 5G adapters Robin Zhang
2021-10-09  1:26   ` [dpdk-stable] [PATCH v5 06/17] net/i40e/base: fix PF reset Robin Zhang
2021-10-09  1:26   ` [dpdk-stable] [PATCH v5 07/17] net/i40e/base: fix update link data for X722 Robin Zhang
2021-10-09  1:26   ` [dpdk-stable] [PATCH v5 08/17] net/i40e/base: fix AOC media type Robin Zhang
2021-10-09  1:26   ` [dpdk-stable] [PATCH v5 10/17] net/i40e/base: fix headers to match functions Robin Zhang
2021-10-09  1:26   ` [dpdk-stable] [PATCH v5 11/17] net/i40e/base: fix potentially uninitialized variables Robin Zhang
2021-10-09  1:26   ` [dpdk-stable] [PATCH v5 12/17] net/i40e/base: fix checksum is used incorrectly Robin Zhang
     [not found] ` <20211009013956.70937-1-robinx.zhang@intel.com>
2021-10-09  1:39   ` [dpdk-stable] [PATCH v6 05/17] net/i40e/base: fix PHY identifiers for 2.5G and 5G adapters Robin Zhang
2021-10-09  1:39   ` [dpdk-stable] [PATCH v6 06/17] net/i40e/base: fix PF reset Robin Zhang
2021-10-09  1:39   ` [dpdk-stable] [PATCH v6 07/17] net/i40e/base: fix update link data for X722 Robin Zhang
2021-10-09  1:39   ` [dpdk-stable] [PATCH v6 08/17] net/i40e/base: fix AOC media type Robin Zhang
2021-10-09  1:39   ` [dpdk-stable] [PATCH v6 10/17] net/i40e/base: fix headers to match functions Robin Zhang
2021-10-09  1:39   ` [dpdk-stable] [PATCH v6 11/17] net/i40e/base: fix potentially uninitialized variables Robin Zhang
2021-10-09  1:39   ` [dpdk-stable] [PATCH v6 12/17] net/i40e/base: fix checksum is used incorrectly Robin Zhang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).