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)
committerDavid S. Miller <davem@davemloft.net>
Fri, 10 Mar 2017 18:03:26 +0000 (10:03 -0800)
commit5d47f6c89d568ab61712d8c40676fbb020b68752
tree3e0325c2e79f7e95551761d0f34103934faac68d
parentaf36370569eb37420e1e78a2e60c277b781fcd00
net/mlx5: Don't save PCI state when PCI error is detected

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>
drivers/net/ethernet/mellanox/mlx5/core/main.c