diff options
author | Mohamad Haj Yahia <mohamad@mellanox.com> | 2016-09-09 17:35:23 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-09-11 07:21:50 +0300 |
commit | c2d6e31a0008f8188f935f8dd81c81c44697b256 (patch) | |
tree | ec18128ae7485db8b7b03f859585f4558eb672b5 /drivers/net/ethernet/mellanox/mlx5/core/sriov.c | |
parent | 62a9b90ad83ebe584bf22a2e716a96e75f82e137 (diff) | |
download | linux-c2d6e31a0008f8188f935f8dd81c81c44697b256.tar.xz |
net/mlx5: Align sriov/eswitch modules with the new load/unload flow.
Init/cleanup sriov/eswitch in the core software context init/cleanup
flows.
Attach/detach sriov/eswitch in the core load/unload flows.
Signed-off-by: Mohamad Haj Yahia <mohamad@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/sriov.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/sriov.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/sriov.c b/drivers/net/ethernet/mellanox/mlx5/core/sriov.c index f4f02b64f552..e08627785590 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/sriov.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/sriov.c @@ -222,7 +222,7 @@ int mlx5_sriov_init(struct mlx5_core_dev *dev) if (!sriov->vfs_ctx) return -ENOMEM; - return mlx5_sriov_attach(dev); + return 0; } void mlx5_sriov_cleanup(struct mlx5_core_dev *dev) @@ -231,6 +231,6 @@ void mlx5_sriov_cleanup(struct mlx5_core_dev *dev) if (!mlx5_core_is_pf(dev)) return; - mlx5_sriov_detach(dev); + kfree(sriov->vfs_ctx); } |