]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5: Add fast unload support in shutdown flow
authorMajd Dibbiny <majd@mellanox.com>
Thu, 9 Feb 2017 12:20:12 +0000 (14:20 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 15 Jun 2017 21:19:44 +0000 (00:19 +0300)
commit18fca24d064aacf67e2c64f608634ca83a3e64a5
tree31d20563fba8998ad57027662299ccc41bc44a77
parent54ddbdf2ad869991d6a88e8fe3471d622c3596f4
net/mlx5: Add fast unload support in shutdown flow

Adding a support to flush all HW resources with one FW command and
skip all the heavy unload flows of the driver on kernel shutdown.
There's no need to free all the SW context since a new fresh kernel
will be loaded afterwards.

Regarding the FW resources, they should be closed, otherwise we will
have leakage in the FW. To accelerate this flow, we execute one command
in the beginning that tells the FW that the driver isn't going to close
any of the FW resources and asks the FW to clean up everything.
Once the commands complete, it's safe to close the PCI resources and
finish the routine.

Signed-off-by: Majd Dibbiny <majd@mellanox.com>
Signed-off-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/fw.c
drivers/net/ethernet/mellanox/mlx5/core/health.c
drivers/net/ethernet/mellanox/mlx5/core/main.c
drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h
include/linux/mlx5/mlx5_ifc.h