From: Saeed Mahameed <saeedm@mellanox.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Aya Levin <ayal@mellanox.com>, Jiri Pirko <jiri@mellanox.com>,
Tariq Toukan <tariqt@mellanox.com>,
Saeed Mahameed <saeedm@mellanox.com>
Subject: [net 4/6] net/mlx5e: Fix return value from timeout recover function
Date: Thu, 11 Jul 2019 18:54:16 +0000 [thread overview]
Message-ID: <20190711185353.5715-5-saeedm@mellanox.com> (raw)
In-Reply-To: <20190711185353.5715-1-saeedm@mellanox.com>
From: Aya Levin <ayal@mellanox.com>
Fix timeout recover function to return a meaningful return value.
When an interrupt was not sent by the FW, return IO error instead of
'true'.
Fixes: c7981bea48fb ("net/mlx5e: Fix return status of TX reporter timeout recover")
Signed-off-by: Aya Levin <ayal@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c | 6 ++----
1 file 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 476dd97f7f2f..a778c15e5324 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c
@@ -142,22 +142,20 @@ static int mlx5e_tx_reporter_timeout_recover(struct mlx5e_txqsq *sq)
{
struct mlx5_eq_comp *eq = sq->cq.mcq.eq;
u32 eqe_count;
- int ret;
netdev_err(sq->channel->netdev, "EQ 0x%x: Cons = 0x%x, irqn = 0x%x\n",
eq->core.eqn, eq->core.cons_index, eq->core.irqn);
eqe_count = mlx5_eq_poll_irq_disabled(eq);
- ret = eqe_count ? false : true;
if (!eqe_count) {
clear_bit(MLX5E_SQ_STATE_ENABLED, &sq->state);
- return ret;
+ return -EIO;
}
netdev_err(sq->channel->netdev, "Recover %d eqes on EQ 0x%x\n",
eqe_count, eq->core.eqn);
sq->channel->stats->eq_rearm++;
- return ret;
+ return 0;
}
int mlx5e_tx_reporter_timeout(struct mlx5e_txqsq *sq)
--
2.21.0
next prev parent reply other threads:[~2019-07-11 18:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-11 18:54 [pull request][net 0/6] Mellanox, mlx5 fixes 2019-07-11 Saeed Mahameed
2019-07-11 18:54 ` [net 1/6] net/mlx5: E-Switch, Fix default encap mode Saeed Mahameed
2019-07-11 18:54 ` [net 2/6] net/mlx5e: Fix port tunnel GRE entropy control Saeed Mahameed
2019-07-11 18:54 ` [net 3/6] net/mlx5e: Rx, Fix checksum calculation for new hardware Saeed Mahameed
2019-07-11 18:54 ` Saeed Mahameed [this message]
2019-07-11 18:54 ` [net 5/6] net/mlx5e: Fix error flow in tx reporter diagnose Saeed Mahameed
2019-07-11 18:54 ` [net 6/6] net/mlx5e: IPoIB, Add error path in mlx5_rdma_setup_rn Saeed Mahameed
2019-07-11 22:08 ` [pull request][net 0/6] Mellanox, mlx5 fixes 2019-07-11 David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190711185353.5715-5-saeedm@mellanox.com \
--to=saeedm@mellanox.com \
--cc=ayal@mellanox.com \
--cc=davem@davemloft.net \
--cc=jiri@mellanox.com \
--cc=netdev@vger.kernel.org \
--cc=tariqt@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox