mlx4_core: adjust catas operation for SRIOV mode
[firefly-linux-kernel-4.4.55.git] / drivers / net / ethernet / mellanox / mlx4 / catas.c
index 45aea9c3ae2c3f0825771a9a216ee1ccfa5765d7..915e947b422d63888dfd65522b7d14a3fa4162ff 100644 (file)
@@ -48,7 +48,8 @@ static struct work_struct catas_work;
 static int internal_err_reset = 1;
 module_param(internal_err_reset, int, 0644);
 MODULE_PARM_DESC(internal_err_reset,
-                "Reset device on internal errors if non-zero (default 1)");
+                "Reset device on internal errors if non-zero"
+                " (default 1, in SRIOV mode default is 0)");
 
 static void dump_err_buf(struct mlx4_dev *dev)
 {
@@ -116,6 +117,10 @@ void mlx4_start_catas_poll(struct mlx4_dev *dev)
        struct mlx4_priv *priv = mlx4_priv(dev);
        phys_addr_t addr;
 
+       /*If we are in SRIOV the default of the module param must be 0*/
+       if (mlx4_is_mfunc(dev))
+               internal_err_reset = 0;
+
        INIT_LIST_HEAD(&priv->catas_err.list);
        init_timer(&priv->catas_err.timer);
        priv->catas_err.map = NULL;