[dpdk-dev] [PATCH v2 34/63] net/ice/base: initialize driver NVM data earlier

Qi Zhang qi.z.zhang at intel.com
Thu Aug 29 04:36:27 CEST 2019

The driver detects and warns about FW rollback mode before getting the NVM
version (through ice_init_nvm) which results in "0.00 0x0 0.0.0" being
printed. Fix this by calling ice_init_nvm earlier.

This could have been fixed by moving ice_print_rollback_msg as well, but
it made more sense to move ice_init_nvm closer to the flow that gets the
FW version information (i.e. control queue init flow).

Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan at intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr at intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang at intel.com>
 drivers/net/ice/base/ice_common.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c
index 36434ee42..e19ce733c 100644
--- a/drivers/net/ice/base/ice_common.c
+++ b/drivers/net/ice/base/ice_common.c
@@ -759,10 +759,13 @@ enum ice_status ice_init_hw(struct ice_hw *hw)
 	if (status)
 		goto err_unroll_cqinit;
+	status = ice_init_nvm(hw);
+	if (status)
+		goto err_unroll_cqinit;
 	if (ice_get_fw_mode(hw) == ICE_FW_MODE_ROLLBACK)
 	status = ice_clear_pf_cfg(hw);
 	if (status)
 		goto err_unroll_cqinit;
@@ -773,9 +776,6 @@ enum ice_status ice_init_hw(struct ice_hw *hw)
-	status = ice_init_nvm(hw);
-	if (status)
-		goto err_unroll_cqinit;
 	status = ice_get_caps(hw);
 	if (status)

More information about the dev mailing list