Merge "Fix h/w subsystem duplicated initialization"

This commit is contained in:
Zuul 2019-01-31 19:37:54 +00:00 committed by Gerrit Code Review
commit 920a5e2e5d
3 changed files with 23 additions and 27 deletions

View File

@ -2,4 +2,4 @@ SRC_DIR=$PKG_BASE
COPY_LIST="$PKG_BASE/LICENSE"
TAR_NAME=sm
VERSION=1.0.0
TIS_PATCH_VER=28
TIS_PATCH_VER=29

View File

@ -1213,17 +1213,6 @@ SmErrorT sm_failover_initialize( void )
return SM_FAILED;
}
SmHwCallbacksT callbacks;
memset( &callbacks, 0, sizeof(callbacks) );
callbacks.interface_change = sm_failover_interface_change_callback;
error = sm_hw_initialize( &callbacks );
if( SM_OKAY != error )
{
DPRINTFE( "Failed to initialize hardware module, error=%s.",
sm_error_str( error ) );
return( error );
}
error = SmFailoverFSM::initialize();
if( SM_OKAY != error )
{
@ -1338,6 +1327,17 @@ SmErrorT sm_failover_initialize( void )
DPRINTFE("Failed to initialize cluster hbs info messaging");
}
SmHwCallbacksT callbacks;
memset( &callbacks, 0, sizeof(callbacks) );
callbacks.interface_change = sm_failover_interface_change_callback;
error = sm_hw_initialize( &callbacks );
if( SM_OKAY != error )
{
DPRINTFE( "Failed to initialize hardware module, error=%s.",
sm_error_str( error ) );
return( error );
}
return SM_OKAY;
}
// ****************************************************************************
@ -1350,6 +1350,17 @@ SmErrorT sm_failover_finalize( void )
_total_interfaces = 0;
SmErrorT error;
SmHwCallbacksT callbacks;
memset( &callbacks, 0, sizeof(callbacks) );
callbacks.interface_change = sm_failover_interface_change_callback;
error = sm_hw_initialize( &callbacks );
if( SM_OKAY != error )
{
DPRINTFE( "Failed to initialize hardware module, error=%s.",
sm_error_str( error ) );
return( error );
}
error = SmClusterHbsInfoMsg::finalize();
if(SM_OKAY != error)
{

View File

@ -184,14 +184,6 @@ static SmErrorT sm_process_initialize( void )
return( SM_FAILED );
}
error = sm_hw_initialize( NULL );
if( SM_OKAY != error )
{
DPRINTFE( "Failed to initialize hardware module, error=%s.",
sm_error_str( error ) );
return( SM_FAILED );
}
error = SmWorkerThread::initialize();
if( SM_OKAY != error )
{
@ -511,13 +503,6 @@ static SmErrorT sm_process_finalize( void )
sm_error_str( error ) );
}
error = sm_hw_finalize();
if( SM_OKAY != error )
{
DPRINTFE( "Failed to finalize hardware module, error=%s.",
sm_error_str( error ) );
}
error = sm_timer_finalize();
if( SM_OKAY != error )
{