mlxsw: core: Add support for reload
authorArkadi Sharshevsky <arkadis@mellanox.com>
Mon, 15 Jan 2018 07:59:11 +0000 (08:59 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 16 Jan 2018 19:15:35 +0000 (14:15 -0500)
commit24cc68ad6c46f04f0206b41359e7af84e6dbde98
tree1fcadd8fa956bddef4496c558599d3c693542565
parente21d21ca31f2fec31f9359a2209929a32a5faf9f
mlxsw: core: Add support for reload

Add support for hot reload. First, all the driver/core resources are
released but the PCI and devlink instances, then reset is performed
through the PCI interface. Finally the driver performs initialization.

In case of reload failure the driver is left in a partially initialized
state. Special care is taken during the driver removal in order to
properly handle this state.

Signed-off-by: Arkadi Sharshevsky <arkadis@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/core.c
drivers/net/ethernet/mellanox/mlxsw/core.h
drivers/net/ethernet/mellanox/mlxsw/i2c.c
drivers/net/ethernet/mellanox/mlxsw/pci.c