net/mlx5: Don't save PCI state when PCI error is detected
authorDaniel Jurgens <danielj@mellanox.com>
Fri, 10 Mar 2017 12:33:02 +0000 (14:33 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Dec 2017 09:07:19 +0000 (10:07 +0100)
commit721c136ac2780e519cd44940ba47f08cdeafec9d
treeff424f31f391a91f58326a7d4da3487a6e408a9c
parent248cbd97be813adfa675d48e1e702f9d5e7ffca8
net/mlx5: Don't save PCI state when PCI error is detected

[ Upstream commit 5d47f6c89d568ab61712d8c40676fbb020b68752 ]

When a PCI error is detected the PCI state could be corrupt, don't save
it in that flow. Save the state after initialization. After restoring the
PCI state during slot reset save it again, restoring the state destroys
the previously saved state info.

Fixes: 05ac2c0b7438 ('net/mlx5: Fix race between PCI error handlers and
health work')
Signed-off-by: Daniel Jurgens <danielj@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/main.c