]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/net/ethernet/mellanox/mlx5/core/main.c
net/mlx5: Cancel health poll before sending panic teardown command
[mirror_ubuntu-artful-kernel.git] / drivers / net / ethernet / mellanox / mlx5 / core / main.c
index 16885827367bfd9153f96faaf7c2afedc6c6a5b0..553bc230d70dfdc810fee91acac1cb88c75702b7 100644 (file)
@@ -1545,9 +1545,16 @@ static int mlx5_try_fast_unload(struct mlx5_core_dev *dev)
                return -EAGAIN;
        }
 
+       /* Panic tear down fw command will stop the PCI bus communication
+        * with the HCA, so the health polll is no longer needed.
+        */
+       mlx5_drain_health_wq(dev);
+       mlx5_stop_health_poll(dev);
+
        ret = mlx5_cmd_force_teardown_hca(dev);
        if (ret) {
                mlx5_core_dbg(dev, "Firmware couldn't do fast unload error: %d\n", ret);
+               mlx5_start_health_poll(dev);
                return ret;
        }