The NVM image version has useful data but it is a per image version,
and every image can have a different one. While for the dev starter
version, all the images for release will have the same version. So
it would be better to use dev starter version number.

Signed-off-by: Helin Zhang <helin.zhang at intel.com>
---
 lib/librte_pmd_i40e/i40e/i40e_adminq.c | 3 ++-
 lib/librte_pmd_i40e/i40e/i40e_type.h   | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/librte_pmd_i40e/i40e/i40e_adminq.c 
b/lib/librte_pmd_i40e/i40e/i40e_adminq.c
index c91f3ff..7fd20f9 100644
--- a/lib/librte_pmd_i40e/i40e/i40e_adminq.c
+++ b/lib/librte_pmd_i40e/i40e/i40e_adminq.c
@@ -621,7 +621,8 @@ enum i40e_status_code i40e_init_adminq(struct i40e_hw *hw)
                goto init_adminq_free_arq;

        /* get the NVM version info */
-       i40e_read_nvm_word(hw, I40E_SR_NVM_IMAGE_VERSION, &hw->nvm.version);
+       i40e_read_nvm_word(hw, I40E_SR_NVM_DEV_STARTER_VERSION,
+                          &hw->nvm.version);
        i40e_read_nvm_word(hw, I40E_SR_NVM_EETRACK_LO, &eetrack_lo);
        i40e_read_nvm_word(hw, I40E_SR_NVM_EETRACK_HI, &eetrack_hi);
        hw->nvm.eetrack = (eetrack_hi << 16) | eetrack_lo;
diff --git a/lib/librte_pmd_i40e/i40e/i40e_type.h 
b/lib/librte_pmd_i40e/i40e/i40e_type.h
index b081f39..6050e42 100644
--- a/lib/librte_pmd_i40e/i40e/i40e_type.h
+++ b/lib/librte_pmd_i40e/i40e/i40e_type.h
@@ -1276,7 +1276,7 @@ struct i40e_hw_port_stats {
 #define I40E_SR_EMP_MODULE_PTR                 0x0F
 #define I40E_SR_PBA_BLOCK_PTR                  0x16
 #define I40E_SR_BOOT_CONFIG_PTR                        0x17
-#define I40E_SR_NVM_IMAGE_VERSION              0x18
+#define I40E_SR_NVM_DEV_STARTER_VERSION                0x18
 #define I40E_SR_NVM_WAKE_ON_LAN                        0x19
 #define I40E_SR_ALTERNATE_SAN_MAC_ADDRESS_PTR  0x27
 #define I40E_SR_PERMANENT_SAN_MAC_ADDRESS_PTR  0x28
-- 
1.8.1.4

Reply via email to