Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2016-10-25 12:58:20 +0200
committerHannes Reinecke <hare@suse.de>2016-10-25 12:58:20 +0200
commit75cb41bc9b39171c02b80c542003456170f7e20b (patch)
tree717750a3d25143ff366334578a50731da94970fb
parente3daeea7f6e2aab18232822588f644af991973a6 (diff)
mlx4: Do not BUG_ON() if device reset failed (bsc#1001888).rpm-4.4.21-69
-rw-r--r--drivers/net/ethernet/mellanox/mlx4/catas.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/catas.c b/drivers/net/ethernet/mellanox/mlx4/catas.c
index c7e939945259..b4ec016713f4 100644
--- a/drivers/net/ethernet/mellanox/mlx4/catas.c
+++ b/drivers/net/ethernet/mellanox/mlx4/catas.c
@@ -183,17 +183,19 @@ void mlx4_enter_error_state(struct mlx4_dev_persistent *persist)
else
err = mlx4_reset_master(dev);
+ dev->persist->state |= MLX4_DEVICE_STATE_INTERNAL_ERROR;
+ mutex_unlock(&persist->device_state_mutex);
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);
+ if (!pci_channel_offline(dev->persist->pdev)) {
+ mlx4_err(dev, "device reset failed with err %d\n", err);
+ return;
+ }
}
- dev->persist->state |= MLX4_DEVICE_STATE_INTERNAL_ERROR;
- mutex_unlock(&persist->device_state_mutex);
/* At that step HW was already reset, now notify clients */
mlx4_dispatch_event(dev, MLX4_DEV_EVENT_CATASTROPHIC_ERROR, 0);