]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net/mlx5e: Always print health reporter message to dmesg
authorEran Ben Elisha <eranbe@mellanox.com>
Wed, 4 Dec 2019 12:34:18 +0000 (14:34 +0200)
committerSaeed Mahameed <saeedm@mellanox.com>
Mon, 6 Jan 2020 23:30:04 +0000 (15:30 -0800)
In case a reporter exists, error message is logged only to the devlink
tracer. The devlink tracer is a visibility utility only, which user can
choose not to monitor.
After cited patch, 3rd party monitoring tools that tracks these error
message will no longer find them in dmesg, causing a regression.

With this patch, error messages are also logged into the dmesg.

Fixes: 9843142574e2 ("net/mlx5e: Generalize tx reporter's functionality")
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en/health.c

index 1d6b58860da6d40d6b2cb0dfebe292b9bc364ade..3a975641f902adbb5da9286e39dbe3bb84c71b61 100644 (file)
@@ -197,9 +197,10 @@ int mlx5e_health_report(struct mlx5e_priv *priv,
                        struct devlink_health_reporter *reporter, char *err_str,
                        struct mlx5e_err_ctx *err_ctx)
 {
-       if (!reporter) {
-               netdev_err(priv->netdev, err_str);
+       netdev_err(priv->netdev, err_str);
+
+       if (!reporter)
                return err_ctx->recover(&err_ctx->ctx);
-       }
+
        return devlink_health_report(reporter, err_str, err_ctx);
 }