]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commita80765cc8d4f78872af521b3f568ee3613c7558b
tree782750f06a1da5eb35fff85d15f0d6c232f1894b
parent947fab68fe974aac4270bdf43cc9bbefcd0d3993
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