net/ice: fix DDP package init
ICE_DDP_PKG_SAME_VERSION_ALREADY_LOADED and ICE_DDP_PKG_COMPATIBLE_ALREADY_LOADED should not be treated as a DDP package init failure. Use ice_is_init_pkg_successful to check return value of ice_copy_and_init_pkg. Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Tested-by: Zhimin Huang <zhiminx.huang@intel.com>
This commit is contained in:
parent
1eb1846b1a
commit
27b7bdae1d
@ -1841,17 +1841,17 @@ load_fw:
|
||||
PMD_INIT_LOG(DEBUG, "DDP package name: %s", pkg_file);
|
||||
|
||||
err = ice_copy_and_init_pkg(hw, buf, bufsz);
|
||||
if (err) {
|
||||
if (!ice_is_init_pkg_successful(err)) {
|
||||
PMD_INIT_LOG(ERR, "ice_copy_and_init_hw failed: %d\n", err);
|
||||
goto out;
|
||||
free(buf);
|
||||
return -1;
|
||||
}
|
||||
|
||||
/* store the loaded pkg type info */
|
||||
adapter->active_pkg_type = ice_load_pkg_type(hw);
|
||||
|
||||
out:
|
||||
free(buf);
|
||||
return err;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
|
Loading…
x
Reference in New Issue
Block a user