return 0;
}
+static int mlx5_tx_health_report(struct devlink_health_reporter *tx_reporter,
+ char *err_str,
+ struct mlx5e_tx_err_ctx *err_ctx)
+{
+ if (IS_ERR_OR_NULL(tx_reporter)) {
+ netdev_err(err_ctx->sq->channel->netdev, err_str);
+ return err_ctx->recover(err_ctx->sq);
+ }
+
+ return devlink_health_report(tx_reporter, err_str, err_ctx);
+}
+
void mlx5e_tx_reporter_err_cqe(struct mlx5e_txqsq *sq)
{
char err_str[MLX5E_TX_REPORTER_PER_SQ_MAX_LEN];
err_ctx.recover = mlx5e_tx_reporter_err_cqe_recover;
sprintf(err_str, "ERR CQE on SQ: 0x%x", sq->sqn);
- devlink_health_report(sq->channel->priv->tx_reporter, err_str,
+ mlx5_tx_health_report(sq->channel->priv->tx_reporter, err_str,
&err_ctx);
}
sq->channel->ix, sq->sqn, sq->cq.mcq.cqn, sq->cc, sq->pc,
jiffies_to_usecs(jiffies - sq->txq->trans_start));
- return devlink_health_report(sq->channel->priv->tx_reporter, err_str,
+ return mlx5_tx_health_report(sq->channel->priv->tx_reporter, err_str,
&err_ctx);
}
struct mlx5e_priv *priv = netdev_priv(dev);
netdev_err(dev, "TX timeout detected\n");
-
- if (IS_ERR_OR_NULL(priv->tx_reporter)) {
- netdev_err_once(priv->netdev, "tx timeout will not be handled, no valid tx reporter\n");
- return;
- }
-
queue_work(priv->wq, &priv->tx_timeout_work);
}
&sq->state)) {
mlx5e_dump_error_cqe(sq,
(struct mlx5_err_cqe *)cqe);
- if (!IS_ERR_OR_NULL(cq->channel->priv->tx_reporter))
- queue_work(cq->channel->priv->wq,
- &sq->recover_work);
+ queue_work(cq->channel->priv->wq,
+ &sq->recover_work);
}
stats->cqe_err++;
}