[PATCH v1] net/ice/base: fix ddp pkg loaded failed
Steve Yang
stevex.yang at intel.com
Wed Sep 7 11:10:01 CEST 2022
When DDP package state is 'ICE_DDP_PKG_SAME_VERSION_ALREADY_LOADED',
it should be treated as success state, otherwise, the wrong state will
be used within 'ice_load_pkg'.
Fixes: 58e9fd55be0e ("net/ice/base: refactor DDP code")
Signed-off-by: Steve Yang <stevex.yang at intel.com>
---
drivers/net/ice/base/ice_ddp.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ice/base/ice_ddp.c b/drivers/net/ice/base/ice_ddp.c
index d1cae48047..284b58a6b1 100644
--- a/drivers/net/ice/base/ice_ddp.c
+++ b/drivers/net/ice/base/ice_ddp.c
@@ -1378,8 +1378,11 @@ enum ice_ddp_state ice_init_pkg(struct ice_hw *hw, u8 *buf, u32 len)
*/
if (!state || state == ICE_DDP_PKG_ALREADY_LOADED) {
state = ice_get_pkg_info(hw);
- if (!state)
+ if (!state) {
state = ice_get_ddp_pkg_state(hw, already_loaded);
+ if (state == ICE_DDP_PKG_SAME_VERSION_ALREADY_LOADED)
+ state = ICE_SUCCESS;
+ }
}
if (ice_is_init_pkg_successful(state)) {
--
2.25.1
More information about the dev
mailing list