aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/net/ethernet/mellanox/mlx5/core/main.c
diff options
context:
space:
mode:
authorFeras Daoud <ferasda@mellanox.com>2018-11-12 16:40:17 +0200
committerSaeed Mahameed <saeedm@mellanox.com>2019-06-13 13:23:18 -0700
commit3e5b72ac2f298423902169db7893fef43365e0a6 (patch)
tree487a9d600ecebf121ea6c79fd915e78386539410 /drivers/net/ethernet/mellanox/mlx5/core/main.c
parentnet/mlx5: Control CR-space access by different PFs (diff)
downloadwireguard-linux-3e5b72ac2f298423902169db7893fef43365e0a6.tar.xz
wireguard-linux-3e5b72ac2f298423902169db7893fef43365e0a6.zip
net/mlx5: Issue SW reset on FW assert
If a FW assert is considered fatal, indicated by a new bit in the health buffer, reset the FW. After the reset go through the normal recovery flow. Only one PF needs to issue the reset, so an attempt is made to prevent the 2nd function from also issuing the reset. It's not an error if that happens, it just slows recovery. Signed-off-by: Feras Daoud <ferasda@mellanox.com> Signed-off-by: Alex Vesker <valex@mellanox.com> Signed-off-by: Moshe Shemesh <moshe@mellanox.com> Signed-off-by: Daniel Jurgens <danielj@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/main.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/main.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c
index fd0e2949c4f2..ec5287c51825 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c
@@ -1361,6 +1361,7 @@ static pci_ers_result_t mlx5_pci_err_detected(struct pci_dev *pdev,
mlx5_core_info(dev, "%s was called\n", __func__);
mlx5_enter_error_state(dev, false);
+ mlx5_error_sw_reset(dev);
mlx5_unload_one(dev, false);
/* In case of kernel call drain the health wq */
if (state) {