@@ -1205,24 +1205,24 @@ static int mlx5_function_enable(struct mlx5_core_dev *dev, bool boot, u64 timeou
1205
1205
dev -> caps .embedded_cpu = mlx5_read_embedded_cpu (dev );
1206
1206
mlx5_cmd_set_state (dev , MLX5_CMDIF_STATE_UP );
1207
1207
1208
- mlx5_start_health_poll (dev );
1209
-
1210
1208
err = mlx5_core_enable_hca (dev , 0 );
1211
1209
if (err ) {
1212
1210
mlx5_core_err (dev , "enable hca failed\n" );
1213
- goto stop_health_poll ;
1211
+ goto err_cmd_cleanup ;
1214
1212
}
1215
1213
1214
+ mlx5_start_health_poll (dev );
1215
+
1216
1216
err = mlx5_core_set_issi (dev );
1217
1217
if (err ) {
1218
1218
mlx5_core_err (dev , "failed to set issi\n" );
1219
- goto err_disable_hca ;
1219
+ goto stop_health_poll ;
1220
1220
}
1221
1221
1222
1222
err = mlx5_satisfy_startup_pages (dev , 1 );
1223
1223
if (err ) {
1224
1224
mlx5_core_err (dev , "failed to allocate boot pages\n" );
1225
- goto err_disable_hca ;
1225
+ goto stop_health_poll ;
1226
1226
}
1227
1227
1228
1228
err = mlx5_tout_query_dtor (dev );
@@ -1235,10 +1235,9 @@ static int mlx5_function_enable(struct mlx5_core_dev *dev, bool boot, u64 timeou
1235
1235
1236
1236
reclaim_boot_pages :
1237
1237
mlx5_reclaim_startup_pages (dev );
1238
- err_disable_hca :
1239
- mlx5_core_disable_hca (dev , 0 );
1240
1238
stop_health_poll :
1241
1239
mlx5_stop_health_poll (dev , boot );
1240
+ mlx5_core_disable_hca (dev , 0 );
1242
1241
err_cmd_cleanup :
1243
1242
mlx5_cmd_set_state (dev , MLX5_CMDIF_STATE_DOWN );
1244
1243
mlx5_cmd_disable (dev );
@@ -1249,8 +1248,8 @@ static int mlx5_function_enable(struct mlx5_core_dev *dev, bool boot, u64 timeou
1249
1248
static void mlx5_function_disable (struct mlx5_core_dev * dev , bool boot )
1250
1249
{
1251
1250
mlx5_reclaim_startup_pages (dev );
1252
- mlx5_core_disable_hca (dev , 0 );
1253
1251
mlx5_stop_health_poll (dev , boot );
1252
+ mlx5_core_disable_hca (dev , 0 );
1254
1253
mlx5_cmd_set_state (dev , MLX5_CMDIF_STATE_DOWN );
1255
1254
mlx5_cmd_disable (dev );
1256
1255
}
0 commit comments