]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
net/mlx5_core: New init and exit flow for mlx5_core
authorMajd Dibbiny <majd@mellanox.com>
Fri, 25 Sep 2015 07:49:14 +0000 (10:49 +0300)
committerDavid S. Miller <davem@davemloft.net>
Tue, 29 Sep 2015 05:19:50 +0000 (22:19 -0700)
commita31208b1e11df334d443ec8cace7636150bb8ce2
treeb9f80bf6f7af8beacb37ca2ed3944d1604ec9d9f
parenta8ffe63e60dde2f2f05fa92dad48f6106d62f9a3
net/mlx5_core: New init and exit flow for mlx5_core

In the new flow, we separate the pci initialization and teardown from the
initialization and teardown of the other resources.

init_one calls mlx5_pci_init that handles the pci resources initialization.
It then calls mlx5_load_one to initialize the remainder of the resources.

When removing a device, remove_one is invoked. However, now remove_one
calls mlx5_unload_one to free all the resources except the pci resources.
When mlx5_unload_one returns, mlx5_pci_close is called to free the pci
resources.

The above separation will allow us to implement the pci error handlers and
suspend and resume callbacks.

Signed-off-by: Majd Dibbiny <majd@mellanox.com>
Signed-off-by: Eli Cohen <eli@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/cmd.c
drivers/net/ethernet/mellanox/mlx5/core/cq.c
drivers/net/ethernet/mellanox/mlx5/core/eq.c
drivers/net/ethernet/mellanox/mlx5/core/main.c
drivers/net/ethernet/mellanox/mlx5/core/mr.c
drivers/net/ethernet/mellanox/mlx5/core/qp.c
drivers/net/ethernet/mellanox/mlx5/core/srq.c