Browse Source

Merge "Fix h/w subsystem duplicated initialization"

Zuul 2 months ago
parent
commit
920a5e2e5d

+ 1
- 1
service-mgmt/sm-1.0.0/centos/build_srpm.data View File

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

+ 22
- 11
service-mgmt/sm-1.0.0/src/sm_failover.c View File

@@ -1213,17 +1213,6 @@ SmErrorT sm_failover_initialize( void )
1213 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 1216
     error = SmFailoverFSM::initialize();
1228 1217
     if( SM_OKAY != error )
1229 1218
     {
@@ -1338,6 +1327,17 @@ SmErrorT sm_failover_initialize( void )
1338 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 1341
     return SM_OKAY;
1342 1342
 }
1343 1343
 // ****************************************************************************
@@ -1350,6 +1350,17 @@ SmErrorT sm_failover_finalize( void )
1350 1350
     _total_interfaces = 0;
1351 1351
 
1352 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 1364
     error = SmClusterHbsInfoMsg::finalize();
1354 1365
     if(SM_OKAY != error)
1355 1366
     {

+ 0
- 15
service-mgmt/sm-1.0.0/src/sm_process.c View File

@@ -184,14 +184,6 @@ static SmErrorT sm_process_initialize( void )
184 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 187
     error = SmWorkerThread::initialize();
196 188
     if( SM_OKAY != error )
197 189
     {
@@ -511,13 +503,6 @@ static SmErrorT sm_process_finalize( void )
511 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 506
     error = sm_timer_finalize();
522 507
     if( SM_OKAY != error )
523 508
     {

Loading…
Cancel
Save