diff options
author | Aya Levin <ayal@mellanox.com> | 2019-08-07 15:59:06 +0300 |
---|---|---|
committer | Sasha Levin <sashal@kernel.org> | 2019-08-25 10:10:38 -0400 |
commit | 0fd12075148352e3948819cc96c3f3f262b0d075 (patch) | |
tree | c8e23aaaf315601cace2e3bfc779aaed7dc70c58 /drivers/net/ethernet | |
parent | c02f176650560dceb79e3939a88fd12b0fde9e91 (diff) | |
download | linux-stable-0fd12075148352e3948819cc96c3f3f262b0d075.tar.gz linux-stable-0fd12075148352e3948819cc96c3f3f262b0d075.tar.bz2 linux-stable-0fd12075148352e3948819cc96c3f3f262b0d075.zip |
net/mlx5e: Fix false negative indication on tx reporter CQE recovery
[ Upstream commit d9a2fcf53c76a7edb2bcf99e94507935561a83d5 ]
Remove wrong error return value when SQ is not in error state.
CQE recovery on TX reporter queries the sq state. If the sq is not in
error state, the sq is either in ready or reset state. Ready state is
good state which doesn't require recovery and reset state is a temporal
state which ends in ready state. With this patch, CQE recovery in this
scenario is successful.
Fixes: de8650a82071 ("net/mlx5e: Add tx reporter support")
Signed-off-by: Aya Levin <ayal@mellanox.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c b/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c index f3d98748b211..b307234b4e05 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c @@ -86,10 +86,8 @@ static int mlx5e_tx_reporter_err_cqe_recover(struct mlx5e_txqsq *sq) return err; } - if (state != MLX5_SQC_STATE_ERR) { - netdev_err(dev, "SQ 0x%x not in ERROR state\n", sq->sqn); - return -EINVAL; - } + if (state != MLX5_SQC_STATE_ERR) + return 0; mlx5e_tx_disable_queue(sq->txq); |