net/ice/base: support NVM rollback detection
authorQi Zhang <qi.z.zhang@intel.com>
Thu, 29 Aug 2019 02:35:56 +0000 (10:35 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Mon, 7 Oct 2019 13:00:52 +0000 (15:00 +0200)
commit5b674b57e79a20424f941fce02fce9580b22424e
tree517a24c350b9436d0e29d2b4174409a3aab2e9e6
parent6277fc33e2e066c1afbc2f7e5fe48a050cfec726
net/ice/base: support NVM rollback detection

This patch adds code to detect NVM rollback. The rollback detection
is done as part of the HW init flow. When NVM rollback is detected,
a warning message is printed along with the FW/NVM version data.
To do this, this patch adds a helper function ice_get_nvm_version.

Also, a pointer to hw->nvm is already available in ice_init_nvm. Just use
this instead of &hw->nvm.

Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Xiaolong Ye <xiaolong.ye@intel.com>
drivers/net/ice/base/ice_common.c
drivers/net/ice/base/ice_common.h
drivers/net/ice/base/ice_nvm.c
drivers/net/ice/base/ice_type.h