]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit965f7a2a41d27fe43a4017097f3acc5853a62aa2
tree1fcadd8fa956bddef4496c558599d3c693542565
parent446703d0ff87f3d078947832cfcc7292fa12ab37
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