i40e/base: grab NVM devstarter version instead of image version
authorHelin Zhang <helin.zhang@intel.com>
Thu, 30 Apr 2015 15:03:24 +0000 (23:03 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Sun, 17 May 2015 21:13:45 +0000 (23:13 +0200)
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.

Test report: http://www.dpdk.org/ml/archives/dev/2015-May/017384.html

Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Jijiang Liu <jijiang.liu@intel.com>
Tested-by: Min Cao <min.cao@intel.com>
lib/librte_pmd_i40e/i40e/i40e_adminq.c
lib/librte_pmd_i40e/i40e/i40e_type.h

index c91f3ff..7fd20f9 100644 (file)
@@ -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;
index b081f39..bc8fd3e 100644 (file)
@@ -1276,10 +1276,13 @@ 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
+#define I40E_SR_NVM_MAP_VERSION                        0x29
+#define I40E_SR_NVM_IMAGE_VERSION              0x2A
+#define I40E_SR_NVM_STRUCTURE_VERSION          0x2B
 #define I40E_SR_NVM_EETRACK_LO                 0x2D
 #define I40E_SR_NVM_EETRACK_HI                 0x2E
 #define I40E_SR_VPD_PTR                                0x2F