summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/mellanox/mlx4/catas.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-02 03:38:16 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-03-02 03:38:16 +0300
commit523462df282fc527a01bceca5125017e2259fbf5 (patch)
treeb3cca26b719ce1f46f203e2f86334525a2f50e14 /drivers/net/ethernet/mellanox/mlx4/catas.c
parent35bf7692e765c2275bf93fe573f7ca868ab73453 (diff)
parentfc77dbd34c5c99bce46d40a2491937c3bcbd10af (diff)
downloadlinux-523462df282fc527a01bceca5125017e2259fbf5.tar.xz
Merge 4.5-rc6 into char-misc-next
We want the fixes in here, and others are sending us pull requests based on this kernel tree. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/catas.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/catas.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/catas.c b/drivers/net/ethernet/mellanox/mlx4/catas.c
index 715de8affcc9..c7e939945259 100644
--- a/drivers/net/ethernet/mellanox/mlx4/catas.c
+++ b/drivers/net/ethernet/mellanox/mlx4/catas.c
@@ -182,10 +182,17 @@ void mlx4_enter_error_state(struct mlx4_dev_persistent *persist)
err = mlx4_reset_slave(dev);
else
err = mlx4_reset_master(dev);
- BUG_ON(err != 0);
+ if (!err) {
+ mlx4_err(dev, "device was reset successfully\n");
+ } else {
+ /* EEH could have disabled the PCI channel during reset. That's
+ * recoverable and the PCI error flow will handle it.
+ */
+ if (!pci_channel_offline(dev->persist->pdev))
+ BUG_ON(1);
+ }
dev->persist->state |= MLX4_DEVICE_STATE_INTERNAL_ERROR;
- mlx4_err(dev, "device was reset successfully\n");
mutex_unlock(&persist->device_state_mutex);
/* At that step HW was already reset, now notify clients */