why not just BUG_ON(!pci_channel_offline(dev->persist->pdev))

diff --git a/drivers/net/ethernet/mellanox/mlx4/catas.c b/drivers/net/ethernet/mellanox/mlx4/catas.c

index 715de8a…e866082 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);

Hi,

netdev mailing list - netdev mailing list http://lists.openwall.net/netdev/ might be a better place to raise the question.