net/mlx5: Handle sync reset request event
authorMoshe Shemesh <moshe@mellanox.com>
Wed, 7 Oct 2020 06:00:49 +0000 (09:00 +0300)
committerJakub Kicinski <kuba@kernel.org>
Fri, 9 Oct 2020 19:06:52 +0000 (12:06 -0700)
commit38b9f903f22b9baa5c4b9bfb07c8bbc49f5efbba
treea57130d519916f7a0053972287e2803e1f7a07f1
parente7f4d0bcb8dad6eac657e295b562b1a925d4f3ce
net/mlx5: Handle sync reset request event

Once the driver gets sync_reset_request from firmware it prepares for the
coming reset and sends acknowledge.
After getting this event the driver expects device reset, either it will
trigger PCI reset on sync_reset_now event or such PCI reset will be
triggered by another PF of the same device. So it moves to reset
requested mode and if it gets PCI reset triggered by the other PF it
detect the reset and reloads.

Signed-off-by: Moshe Shemesh <moshe@mellanox.com>
Reviewed-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c
drivers/net/ethernet/mellanox/mlx5/core/fw_reset.h
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/driver.h