]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
net/mlx5: Reduce dependency on enabled_vfs counter and num_vfs
authorParav Pandit <parav@mellanox.com>
Fri, 28 Jun 2019 22:36:06 +0000 (22:36 +0000)
committerSaeed Mahameed <saeedm@mellanox.com>
Mon, 1 Jul 2019 23:40:30 +0000 (16:40 -0700)
commitd886aba677a0a75ad7fdb06e08418b481e09b036
tree494fc66837231ec2e1e43f538ee1e0423c717191
parent5ccf2770e83bf8739f0a7c8bed9186d7e5d2ecbc
net/mlx5: Reduce dependency on enabled_vfs counter and num_vfs

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().

Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/sriov.c
include/linux/mlx5/driver.h