net/mlx5: Split the load/unload flow into hardware and software flows
authorMohamad Haj Yahia <mohamad@mellanox.com>
Fri, 9 Sep 2016 14:35:20 +0000 (17:35 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sun, 11 Sep 2016 04:21:49 +0000 (21:21 -0700)
commit59211bd3b6329c3e5f4a90ac3d7f87ffa7867073
tree782750f06a1da5eb35fff85d15f0d6c232f1894b
parent737a234bb6384800a5b632be85c6b0ad6221d137
net/mlx5: Split the load/unload flow into hardware and software flows

Gather all software context creating/destroying in one function and call
it once in the first load and in the last unload.
load/unload functions will now receive indication if we need to
create/destroy the software contexts.
In internal/pci error do the unload/load flows without releasing the
software objects.
In this way we perserve the sw core state and it help us restoring old
driver state after PCI error/shutdown.

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>
drivers/net/ethernet/mellanox/mlx5/core/main.c