@@ -980,8 +980,9 @@ def reset_app_code_and_reinit_all_lanes(self, api):
980
980
"""
981
981
api .set_application (0xff , 0 , 0 )
982
982
api .set_datapath_deinit (0xff )
983
- api .scs_apply_datapath_init (0xff )
984
- return
983
+ if not api .scs_apply_datapath_init (0xff ):
984
+ return False
985
+ return True
985
986
986
987
def is_cmis_app_code_reset_required (self , api , app_new ):
987
988
"""
@@ -992,9 +993,8 @@ def is_cmis_app_code_reset_required(self, api, app_new):
992
993
if app_cur != 0 and app_cur != app_new :
993
994
self .log_notice ("Changing from default AppSel {} to non default AppSel code {}. Reset AppSel "
994
995
"code for all lanes" .format (app_cur , app_new ))
995
- self .reset_app_code_and_reinit_all_lanes (api )
996
- break
997
- return
996
+ return self .reset_app_code_and_reinit_all_lanes (api )
997
+ return True
998
998
999
999
def is_cmis_application_update_required (self , api , app_new , host_lanes_mask ):
1000
1000
"""
@@ -1442,8 +1442,11 @@ def task_worker(self):
1442
1442
else :
1443
1443
self .log_notice ("{} Successfully configured Tx power = {}" .format (lport , tx_power ))
1444
1444
1445
- # Reset and DP Init when non default app code needs to be configured
1446
- self .is_cmis_app_code_reset_required (api , appl )
1445
+ # Reset and DP Init when non default app code needs to be configured
1446
+ if not self .is_cmis_app_code_reset_required (api , appl ):
1447
+ self .log_notice ("{}: unable to reset application and DP reinit" .format (lport ))
1448
+ self .force_cmis_reinit (lport , retries + 1 )
1449
+ continue
1447
1450
1448
1451
need_update = self .is_cmis_application_update_required (api , appl , host_lanes_mask )
1449
1452
0 commit comments