While enabling SR-IOV, PCI core already checks that if SR-IOV is already enabled, it returns failure error code. Hence, remove such duplicate check from mlx5_core driver. While at it, make mlx5_device_disable_sriov() to perform cleanup of VFs in reverse order of mlx5_device_enable_sriov().
Showing the changes to include/linux (1 of 2 files). Show all
Unified · Split
| @@ -468,7 +468,6 @@ struct mlx5_vf_context { · 467 unmodified lines | ||
| 468 | 468 | struct mlx5_core_sriov { |
| 469 | 469 | struct mlx5_vf_context *vfs_ctx; |
| 470 | 470 | int num_vfs; |
| 471 | − int enabled_vfs; | |
| 472 | 471 | u16 max_vfs; |
| 473 | 472 | }; |
| 474 | 473 | |