net/mlx5: Move fw reset unload to mlx5_fw_reset_complete_reload
authorMoshe Shemesh <moshe@nvidia.com>
Thu, 28 Jul 2022 15:53:44 +0000 (18:53 +0300)
committerJakub Kicinski <kuba@kernel.org>
Fri, 29 Jul 2022 04:58:46 +0000 (21:58 -0700)
commitc12f4c6ac3b49bdf38b31f7362cfde5ed63ea7cb
treead857f300cfb99a3e07940b54e100e3edc45eb4e
parent2dec18ad826f52658f7781ee995d236cc449b678
net/mlx5: Move fw reset unload to mlx5_fw_reset_complete_reload

Refactor fw reset code to have the unload driver part done on
mlx5_fw_reset_complete_reload(), so if it was called by the PF which
initiated the reload fw activate flow, the unload part will be handled
by the mlx5_devlink_reload_fw_activate() callback itself and not by the
reset event work.

This will be used by the downstream patch to invoke devlink reload
callbacks with devlink lock held.

Signed-off-by: Moshe Shemesh <moshe@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/devlink.c
drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c