File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed
drivers/net/ethernet/mellanox/mlx5/core Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -1295,12 +1295,15 @@ mlx5_eswitch_enable_pf_vf_vports(struct mlx5_eswitch *esw,
1295
1295
ret = mlx5_eswitch_load_pf_vf_vport (esw , MLX5_VPORT_ECPF , enabled_events );
1296
1296
if (ret )
1297
1297
goto ecpf_err ;
1298
- if (mlx5_core_ec_sriov_enabled (esw -> dev )) {
1299
- ret = mlx5_eswitch_load_ec_vf_vports (esw , esw -> esw_funcs .num_ec_vfs ,
1300
- enabled_events );
1301
- if (ret )
1302
- goto ec_vf_err ;
1303
- }
1298
+ }
1299
+
1300
+ /* Enable ECVF vports */
1301
+ if (mlx5_core_ec_sriov_enabled (esw -> dev )) {
1302
+ ret = mlx5_eswitch_load_ec_vf_vports (esw ,
1303
+ esw -> esw_funcs .num_ec_vfs ,
1304
+ enabled_events );
1305
+ if (ret )
1306
+ goto ec_vf_err ;
1304
1307
}
1305
1308
1306
1309
/* Enable VF vports */
@@ -1331,9 +1334,11 @@ void mlx5_eswitch_disable_pf_vf_vports(struct mlx5_eswitch *esw)
1331
1334
{
1332
1335
mlx5_eswitch_unload_vf_vports (esw , esw -> esw_funcs .num_vfs );
1333
1336
1337
+ if (mlx5_core_ec_sriov_enabled (esw -> dev ))
1338
+ mlx5_eswitch_unload_ec_vf_vports (esw ,
1339
+ esw -> esw_funcs .num_ec_vfs );
1340
+
1334
1341
if (mlx5_ecpf_vport_exists (esw -> dev )) {
1335
- if (mlx5_core_ec_sriov_enabled (esw -> dev ))
1336
- mlx5_eswitch_unload_ec_vf_vports (esw , esw -> esw_funcs .num_vfs );
1337
1342
mlx5_eswitch_unload_pf_vf_vport (esw , MLX5_VPORT_ECPF );
1338
1343
}
1339
1344
You can’t perform that action at this time.
0 commit comments