diff options
author | Parav Pandit <parav@mellanox.com> | 2019-10-28 21:29:17 +0300 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2019-11-14 01:25:03 +0300 |
commit | a7cba0a4d508d2d78f2932ee944feadd38c97c2c (patch) | |
tree | 041a2021d6db577aed7ad60958e6efd4b1f29e4d /drivers/fpga/Kconfig | |
parent | 86bb811b08086f98744ecc600907673af7f2aec5 (diff) | |
download | linux-a7cba0a4d508d2d78f2932ee944feadd38c97c2c.tar.xz |
net/mlx5: Read num_vfs before disabling SR-IOV
mlx5_device_disable_sriov() currently reads num_vfs from the PCI core.
However when mlx5_device_disable_sriov() is executed, SR-IOV is
already disabled at the PCI level.
Due to this disable_hca() cleanup is not done during SR-IOV disable
flow.
mlx5_sriov_disable()
pci_enable_sriov()
mlx5_device_disable_sriov() <- num_vfs is zero here.
When SR-IOV enablement fails during mlx5_sriov_enable(), HCA's are left
in enabled stage because mlx5_device_disable_sriov() relies on num_vfs
from PCI core.
mlx5_sriov_enable()
mlx5_device_enable_sriov()
pci_enable_sriov() <- Fails
Hence, to overcome above issues,
(a) Read num_vfs before disabling SR-IOV and use it.
(b) Use num_vfs given when enabling sriov in error unwinding path.
Fixes: d886aba677a0 ("net/mlx5: Reduce dependency on enabled_vfs counter and num_vfs")
Signed-off-by: Parav Pandit <parav@mellanox.com>
Reviewed-by: Daniel Jurgens <danielj@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/fpga/Kconfig')
0 files changed, 0 insertions, 0 deletions