summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2019-01-31 19:37:54 +0000
committerGerrit Code Review <review@openstack.org>2019-01-31 19:37:54 +0000
commit920a5e2e5db339631216af7bc6352d2a395d3bae (patch)
treee667c9ea16e2f334eddef8cd88e848ede3c1983b
parent729a8e7f360079313e99bc049db79faca9ca4a96 (diff)
parent0641b4a44e38ca3fbb004aeda96a8493ac7699a7 (diff)
Merge "Fix h/w subsystem duplicated initialization"
-rw-r--r--service-mgmt/sm-1.0.0/centos/build_srpm.data2
-rw-r--r--service-mgmt/sm-1.0.0/src/sm_failover.c33
-rw-r--r--service-mgmt/sm-1.0.0/src/sm_process.c15
3 files changed, 23 insertions, 27 deletions
diff --git a/service-mgmt/sm-1.0.0/centos/build_srpm.data b/service-mgmt/sm-1.0.0/centos/build_srpm.data
index 918657b..b91c16c 100644
--- a/service-mgmt/sm-1.0.0/centos/build_srpm.data
+++ b/service-mgmt/sm-1.0.0/centos/build_srpm.data
@@ -2,4 +2,4 @@ SRC_DIR=$PKG_BASE
2COPY_LIST="$PKG_BASE/LICENSE" 2COPY_LIST="$PKG_BASE/LICENSE"
3TAR_NAME=sm 3TAR_NAME=sm
4VERSION=1.0.0 4VERSION=1.0.0
5TIS_PATCH_VER=28 5TIS_PATCH_VER=29
diff --git a/service-mgmt/sm-1.0.0/src/sm_failover.c b/service-mgmt/sm-1.0.0/src/sm_failover.c
index f9f0cf4..08f8ac8 100644
--- a/service-mgmt/sm-1.0.0/src/sm_failover.c
+++ b/service-mgmt/sm-1.0.0/src/sm_failover.c
@@ -1213,17 +1213,6 @@ SmErrorT sm_failover_initialize( void )
1213 return SM_FAILED; 1213 return SM_FAILED;
1214 } 1214 }
1215 1215
1216 SmHwCallbacksT callbacks;
1217 memset( &callbacks, 0, sizeof(callbacks) );
1218 callbacks.interface_change = sm_failover_interface_change_callback;
1219 error = sm_hw_initialize( &callbacks );
1220 if( SM_OKAY != error )
1221 {
1222 DPRINTFE( "Failed to initialize hardware module, error=%s.",
1223 sm_error_str( error ) );
1224 return( error );
1225 }
1226
1227 error = SmFailoverFSM::initialize(); 1216 error = SmFailoverFSM::initialize();
1228 if( SM_OKAY != error ) 1217 if( SM_OKAY != error )
1229 { 1218 {
@@ -1338,6 +1327,17 @@ SmErrorT sm_failover_initialize( void )
1338 DPRINTFE("Failed to initialize cluster hbs info messaging"); 1327 DPRINTFE("Failed to initialize cluster hbs info messaging");
1339 } 1328 }
1340 1329
1330 SmHwCallbacksT callbacks;
1331 memset( &callbacks, 0, sizeof(callbacks) );
1332 callbacks.interface_change = sm_failover_interface_change_callback;
1333 error = sm_hw_initialize( &callbacks );
1334 if( SM_OKAY != error )
1335 {
1336 DPRINTFE( "Failed to initialize hardware module, error=%s.",
1337 sm_error_str( error ) );
1338 return( error );
1339 }
1340
1341 return SM_OKAY; 1341 return SM_OKAY;
1342} 1342}
1343// **************************************************************************** 1343// ****************************************************************************
@@ -1350,6 +1350,17 @@ SmErrorT sm_failover_finalize( void )
1350 _total_interfaces = 0; 1350 _total_interfaces = 0;
1351 1351
1352 SmErrorT error; 1352 SmErrorT error;
1353 SmHwCallbacksT callbacks;
1354 memset( &callbacks, 0, sizeof(callbacks) );
1355 callbacks.interface_change = sm_failover_interface_change_callback;
1356 error = sm_hw_initialize( &callbacks );
1357 if( SM_OKAY != error )
1358 {
1359 DPRINTFE( "Failed to initialize hardware module, error=%s.",
1360 sm_error_str( error ) );
1361 return( error );
1362 }
1363
1353 error = SmClusterHbsInfoMsg::finalize(); 1364 error = SmClusterHbsInfoMsg::finalize();
1354 if(SM_OKAY != error) 1365 if(SM_OKAY != error)
1355 { 1366 {
diff --git a/service-mgmt/sm-1.0.0/src/sm_process.c b/service-mgmt/sm-1.0.0/src/sm_process.c
index 52022ec..9a2e81a 100644
--- a/service-mgmt/sm-1.0.0/src/sm_process.c
+++ b/service-mgmt/sm-1.0.0/src/sm_process.c
@@ -184,14 +184,6 @@ static SmErrorT sm_process_initialize( void )
184 return( SM_FAILED ); 184 return( SM_FAILED );
185 } 185 }
186 186
187 error = sm_hw_initialize( NULL );
188 if( SM_OKAY != error )
189 {
190 DPRINTFE( "Failed to initialize hardware module, error=%s.",
191 sm_error_str( error ) );
192 return( SM_FAILED );
193 }
194
195 error = SmWorkerThread::initialize(); 187 error = SmWorkerThread::initialize();
196 if( SM_OKAY != error ) 188 if( SM_OKAY != error )
197 { 189 {
@@ -511,13 +503,6 @@ static SmErrorT sm_process_finalize( void )
511 sm_error_str( error ) ); 503 sm_error_str( error ) );
512 } 504 }
513 505
514 error = sm_hw_finalize();
515 if( SM_OKAY != error )
516 {
517 DPRINTFE( "Failed to finalize hardware module, error=%s.",
518 sm_error_str( error ) );
519 }
520
521 error = sm_timer_finalize(); 506 error = sm_timer_finalize();
522 if( SM_OKAY != error ) 507 if( SM_OKAY != error )
523 { 508 {