Fix h/w subsystem duplicated initialization
h/w subsystem is mistakenly initialized twice. It causes the interface operational state changed events not being passed to the listener. In the event an interface operational state changed, i.e, cable is pulled, the system could not react to it. Change-Id: I014d25befda536265c9c588a156ce411d01147cf Closes-Bug: 1812019 Signed-off-by: Bin Qian <bin.qian@windriver.com>
This commit is contained in:
parent
6306f76223
commit
0641b4a44e
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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 )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue